Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2608748pxb; Sun, 15 Nov 2020 10:55:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9DvvQGTsaxV5uZluTznqgtTd0NWgvx3SOkBDSWUuPHC+XhBFt7Y1GGM8kG48RXITMT53a X-Received: by 2002:a17:907:2648:: with SMTP id ar8mr11699828ejc.294.1605466523494; Sun, 15 Nov 2020 10:55:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605466523; cv=none; d=google.com; s=arc-20160816; b=PSBy3QEspLTuwRnoaChVRM1x9gRQVzKmFMhjkbnJx6+6lzEKUxK9w4PSH0shf+8a2T bLNOLTirEdNkTT8nvsvQDTQZgSMSVjnSooANHO5zvQtw+KFMRED2b/eSN+cLLz+s963M jituZcutOQ/6IQ/0jwPv5ymbIPxi8w1ACBNSJngnhc3S6xG7jjLqdvPkrLwKofAO5zav NQL7Blg8oEsatjgZNENrQ0i2Zsf5Wn5xh2tGl6I+yBE+03iPGbr3iC+xyrThUisMOXhp YgOJ2xOiUI3ca4aGX191WEjlcnEFX7o/YivvxE8IdmToUTybn79PlgBWmx8f33Dj1oPC 8Rfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=O4mgR0kHkYjGB2CrntfnSMeBIDhzCNl2DmyYq35MLl0=; b=NVgBv1i4ilaT5bA69MXCtOdFm8tPOByhlvJCiC38yoQTyKxUMFOiSykRZ4x+H0jqOC yBkUthzkpJ7StxAMBb32fjYo0gcPomOUZ4NaA2pL+h0AzXfQfzHE+rKPEu0uVFryf6iU Fdns3CMw338HbOj8Otve5nWxjr1yLyM4n1uQNew1aPFzsPrN7YQ/y301yVqjvJuNLcWD DEN00ZhCc6flDw/nfMgzHK36RoAvsCPBvEGwLC3GwoF5D8AV5c/T2soz//yFONAayxOH S+5+BUwp46C7ClGRDke+7M5Z5UgepiPrErfthLI9wVNcSMvkM3bBw/5i7pEFqvPkyETq T49A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=E1SpT58u; dkim=neutral (no key) header.i=@linutronix.de header.b=7jIUMERI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v22si1301603edx.524.2020.11.15.10.54.59; Sun, 15 Nov 2020 10:55:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=E1SpT58u; dkim=neutral (no key) header.i=@linutronix.de header.b=7jIUMERI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727233AbgKOSip (ORCPT + 99 others); Sun, 15 Nov 2020 13:38:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726817AbgKOSio (ORCPT ); Sun, 15 Nov 2020 13:38:44 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA3A9C0613D1; Sun, 15 Nov 2020 10:38:44 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1605465522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=O4mgR0kHkYjGB2CrntfnSMeBIDhzCNl2DmyYq35MLl0=; b=E1SpT58uj57870IoxbMzDovdySlH/UOrN4fG7EVSG+gVuSbdsNqVkiFBGB6qJA5aoYeZSV cTq0eCmRAbc1Fn7XEG2HHod5kbh7LKeeJiMDlYuzWSTSFoDBd8EF8JZj8U/rgr/rZ1Mdps fv+pjyK/V4sOL3zJdB6NyZyk9DoYu9KCM8wm3b96+y46Tai2Zjboy7FAQjkKMnRYyMa1aO 58Zf8bvyMpku3nM5hPVIKRy8TB98aqG9rSOTiWhV+4UE35z1Sl2e4zYXxozv+hWFX/Is5L 5GKCmEpJF+c7Xxfp5yONa36rlbujzmjo69d1Mka6tfTh4+Lm+VnwPPny5LHs9w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1605465522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=O4mgR0kHkYjGB2CrntfnSMeBIDhzCNl2DmyYq35MLl0=; b=7jIUMERIvDFev2Ut8f0IFEa1aGM9KjWKagnilHHX98lIYHtl/FB0+ONh5ZBwqLl9HfLlF/ AF3i5mIxZJM47tCw== To: Gabriel Krisman Bertazi Cc: mingo@redhat.com, keescook@chromium.org, arnd@arndb.de, luto@amacapital.net, wad@chromium.org, rostedt@goodmis.org, paul@paul-moore.com, eparis@redhat.com, oleg@redhat.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, Gabriel Krisman Bertazi , kernel@collabora.com Subject: Re: [PATCH 03/10] kernel: entry: Wire up syscall_work in common entry code In-Reply-To: <20201114032917.1205658-4-krisman@collabora.com> References: <20201114032917.1205658-1-krisman@collabora.com> <20201114032917.1205658-4-krisman@collabora.com> Date: Sun, 15 Nov 2020 19:38:42 +0100 Message-ID: <87v9e68nyl.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 13 2020 at 22:29, Gabriel Krisman Bertazi wrote: "kernel: entry:" is not the right subsystem prefix. git log kernel/entry/ might give you a hint. > Prepares the common entry code to use the SYSCALL_WORK flags. They > will s/Prepares/Prepare/ > be defined in subsequent patches for each type of syscall > work. SYSCALL_WORK_ENTRY/EXIT are defined for the transition, as they > will replace the TIF_ equivalent defines. > > Signed-off-by: Gabriel Krisman Bertazi > --- > include/linux/entry-common.h | 3 +++ > kernel/entry/common.c | 15 +++++++++------ > 2 files changed, 12 insertions(+), 6 deletions(-) > > diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h > index 1a128baf3628..cbc5c702ee4d 100644 > --- a/include/linux/entry-common.h > +++ b/include/linux/entry-common.h > @@ -64,6 +64,9 @@ > (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ > _TIF_SYSCALL_TRACEPOINT | ARCH_SYSCALL_EXIT_WORK) > > +#define SYSCALL_WORK_ENTER (0) > +#define SYSCALL_WORK_EXIT (0) > + > /* > * TIF flags handled in exit_to_user_mode_loop() > */ > diff --git a/kernel/entry/common.c b/kernel/entry/common.c > index bc75c114c1b3..5a4bb72ff28e 100644 > --- a/kernel/entry/common.c > +++ b/kernel/entry/common.c > @@ -42,7 +42,7 @@ static inline void syscall_enter_audit(struct pt_regs *regs, long syscall) > } > > static long syscall_trace_enter(struct pt_regs *regs, long syscall, > - unsigned long ti_work) > + unsigned long ti_work, unsigned long work) > { > long ret = 0; > > @@ -75,10 +75,11 @@ static __always_inline long > __syscall_enter_from_user_work(struct pt_regs *regs, long syscall) > { > unsigned long ti_work; > + unsigned long work = READ_ONCE(current_thread_info()->syscall_work); Even if this is temporary this code uses reverse fir tree ordering of variable declarations: unsigned long work = READ_ONCE(current_thread_info()->syscall_work); unsigned long ti_work; Thanks, tglx