From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754585AbcIUDdH (ORCPT ); Tue, 20 Sep 2016 23:33:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40182 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753724AbcIUDdG (ORCPT ); Tue, 20 Sep 2016 23:33:06 -0400 Date: Tue, 20 Sep 2016 22:33:04 -0500 From: Josh Poimboeuf To: Brian Gerst Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , the arch/x86 maintainers , Linux Kernel Mailing List , Andy Lutomirski , Linus Torvalds , Peter Zijlstra , Nilay Vaish Subject: Re: [PATCH 3/9] x86/entry/32: fix the end of the stack for newly forked tasks Message-ID: <20160921033304.jm667dzgiftdv2ij@treble> References: <1eabc8a9fb0ad0eb827aab23e03283fc853a5a43.1474400222.git.jpoimboe@redhat.com> <20160921032516.ah3etafe4po4wfxu@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160921032516.ah3etafe4po4wfxu@treble> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 21 Sep 2016 03:33:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 20, 2016 at 10:25:16PM -0500, Josh Poimboeuf 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. > > 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) > ... (But I should note that I'm a complete ia64 neophyte, so I could be misreading that...) -- Josh