public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Gabriel Krisman Bertazi <krisman@collabora.com>
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 <krisman@collabora.com>,
	kernel@collabora.com
Subject: Re: [PATCH 03/10] kernel: entry: Wire up syscall_work in common entry code
Date: Sun, 15 Nov 2020 19:38:42 +0100	[thread overview]
Message-ID: <87v9e68nyl.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20201114032917.1205658-4-krisman@collabora.com>

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 <krisman@collabora.com>
> ---
>  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

  reply	other threads:[~2020-11-15 18:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14  3:29 [PATCH 00/10] Migrate syscall entry/exit work to SYSCALL_WORK flagset Gabriel Krisman Bertazi
2020-11-14  3:29 ` [PATCH 01/10] x86: Expose syscall_work field in thread_info Gabriel Krisman Bertazi
2020-11-14  3:29 ` [PATCH 02/10] kernel: entry: Expose helpers to migrate TIF to SYSCALL_WORK flags Gabriel Krisman Bertazi
2020-11-14 11:22   ` Christoph Hellwig
2020-11-15 18:28     ` Thomas Gleixner
2020-11-14  3:29 ` [PATCH 03/10] kernel: entry: Wire up syscall_work in common entry code Gabriel Krisman Bertazi
2020-11-15 18:38   ` Thomas Gleixner [this message]
2020-11-14  3:29 ` [PATCH 04/10] seccomp: Migrate to use SYSCALL_WORK flag Gabriel Krisman Bertazi
2020-11-15 18:35   ` Thomas Gleixner
2020-11-14  3:29 ` [PATCH 05/10] tracepoints: " Gabriel Krisman Bertazi
2020-11-15 18:41   ` Thomas Gleixner
2020-11-14  3:29 ` [PATCH 06/10] ptrace: Migrate to use SYSCALL_TRACE flag Gabriel Krisman Bertazi
2020-11-14  3:29 ` [PATCH 07/10] ptrace: Migrate TIF_SYSCALL_EMU to use SYSCALL_WORK flag Gabriel Krisman Bertazi
2020-11-14  3:29 ` [PATCH 08/10] audit: Migrate " Gabriel Krisman Bertazi
2020-11-14  3:29 ` [PATCH 09/10] kernel: entry: Drop usage of TIF flags in the generic syscall code Gabriel Krisman Bertazi
2020-11-14  3:29 ` [PATCH 10/10] x86: Reclaim unused x86 TI flags Gabriel Krisman Bertazi
2020-11-15 18:50 ` [PATCH 00/10] Migrate syscall entry/exit work to SYSCALL_WORK flagset Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9e68nyl.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=eparis@redhat.com \
    --cc=keescook@chromium.org \
    --cc=kernel@collabora.com \
    --cc=krisman@collabora.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=rostedt@goodmis.org \
    --cc=wad@chromium.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox