lkml.org 
[lkml]   [2016]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/9] x86/entry/32: fix the end of the stack for newly forked tasks
On Sep 20, 2016 5:25 PM, "Josh Poimboeuf" <jpoimboe@redhat.com> wrote:
>
> On Tue, Sep 20, 2016 at 09:10:55PM -0400, Brian Gerst wrote:
> > Dropping asmlinkage from schedule_tail() would be a better option if possible.
>
> My understanding is that it's still needed for ia64. AFAICT, ia64
> relies on schedule_tail() having the syscall_linkage function attribute.
> From the gcc manual:
>
> This attribute is used to modify the IA64 calling convention by
> marking all input registers as live at all function exits. This makes
> it possible to restart a system call after an interrupt without having
> to save/restore the input registers. This also prevents kernel data
> from leaking into application code.

/me needs to excise this from i386. The amount of BS code involved to
avoid a whopping *six* register saves per syscall was absurd.

>
> And the ia64 entry code has some similar language:
>
> /*
> * Invoke schedule_tail(task) while preserving in0-in7, which may be needed
> * in case a system call gets restarted.
> */
> GLOBAL_ENTRY(ia64_invoke_schedule_tail)
> ...

That comment has to be wrong. What syscall could possibly be
restarted across schedule_tail()? It's a brand new thread and has
literally never done a syscall.

There may be another reason that the registers are live there, but I
generally do my best to never look at ia64 asm code.

\
 
 \ /
  Last update: 2016-09-22 23:58    [W:0.069 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site