From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A321CA9EAD for ; Sun, 20 Oct 2019 11:49:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 537F92089C for ; Sun, 20 Oct 2019 11:49:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726319AbfJTLtS (ORCPT ); Sun, 20 Oct 2019 07:49:18 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:60264 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbfJTLtR (ORCPT ); Sun, 20 Oct 2019 07:49:17 -0400 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iM9hw-00084H-0h; Sun, 20 Oct 2019 13:49:12 +0200 Date: Sun, 20 Oct 2019 13:49:10 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: LKML , X86 ML , Peter Zijlstra , Catalin Marinas , Will Deacon , Mark Rutland , Marc Zyngier , Paolo Bonzini , kvm list , linux-arch Subject: Re: [RFC patch 01/15] entry: Provide generic syscall entry functionality In-Reply-To: Message-ID: References: <20190919150314.054351477@linutronix.de> <20190919150808.521907403@linutronix.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Sep 2019, Andy Lutomirski wrote: > On Thu, Sep 19, 2019 at 8:09 AM Thomas Gleixner wrote: > > +#ifndef _TIF_AUDIT > > +# define _TIF_AUDIT (0) > > +#endif > > I'm wondering if these should be __TIF (double-underscore) or > MAYBE_TIF_ or something to avoid errors where people do flags |= > TIF_WHATEVER and get surprised. That's what exists today already. See arch/*/include/asm/threadinfo.h > > +/** > > + * syscall_enter_from_usermode - Check and handle work before invoking > > + * a syscall > > + * @regs: Pointer to currents pt_regs > > + * @syscall: The syscall number > > + * > > + * Invoked from architecture specific syscall entry code with interrupts > > + * enabled. > > + * > > + * Returns: The original or a modified syscall number > > + */ > > Maybe document that it can return -1 to skip the syscall and that, if > this happens, it may use syscall_set_error() or > syscall_set_return_value() first. If neither of those is called and > -1 is returned, then the syscall will fail with ENOSYS. Sure. Thanks, tglx