From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Garnier Subject: Re: [PATCH v3 2/4] x86/syscalls: Specific usage of verify_pre_usermode_state Date: Mon, 13 Mar 2017 08:53:37 -0700 Message-ID: References: <20170311000501.46607-1-thgarnie@google.com> <20170311000501.46607-2-thgarnie@google.com> <20170311094200.GA27700@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: List-Post: List-Help: List-Unsubscribe: List-Subscribe: In-Reply-To: <20170311094200.GA27700@gmail.com> To: Ingo Molnar Cc: Martin Schwidefsky , Heiko Carstens , David Howells , Arnd Bergmann , Al Viro , Dave Hansen , =?UTF-8?Q?Ren=C3=A9_Nyffenegger?= , Andrew Morton , Kees Cook , "Paul E . McKenney" , Andy Lutomirski , Ard Biesheuvel , Nicolas Pitre , Petr Mladek , Sebastian Andrzej Siewior , Sergey Senozhatsky , Helge Deller , Rik van Riel , John Stultz , Thomas Gleixner , Oleg Nesterov , Stephen Smalley List-Id: linux-api@vger.kernel.org On Sat, Mar 11, 2017 at 1:42 AM, Ingo Molnar wrote: > > Ugh, so you call an assembly function just to ... call another function. > The verify_pre_usermode_state function is the architecture independent checker. By default it is added on each syscall handler so calling it here save code size. > Plus why is it in assembly to begin with? Is this some older code that got > written when the x86 entry code was in assembly, and never properly > converted to C? I wrote the assembly to make it faster and save a call on each syscall return. I can just call verify_pre_usermode_state if you prefer. -- Thomas