LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Dave Martin <Dave.Martin@arm.com>
Cc: linux-kernel@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
	James Hogan <jhogan@kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	"David S. Miller" <davem@davemloft.net>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Oleg Nesterov <oleg@redhat.com>,
	linux-arch@vger.kernel.org
Subject: Re: [PATCH REPOST 1/5] thread_info: Port core code to use update_thread_flag() helpers
Date: Fri, 11 May 2018 11:33:38 -0400	[thread overview]
Message-ID: <20180511113338.1d828a50@gandalf.local.home> (raw)
In-Reply-To: <1526051104-15995-2-git-send-email-Dave.Martin@arm.com>

On Fri, 11 May 2018 16:05:00 +0100
Dave Martin <Dave.Martin@arm.com> wrote:

> This patch ports a couple of relevant bits of the core kernel to
> use the new update_thread_flag() helpers.
> 
> No functional change.
> 
> Signed-off-by: Dave Martin <Dave.Martin@arm.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Oleg Nesterov <oleg@redhat.com>
> ---
>  include/trace/syscall.h |  6 ++----
>  kernel/ptrace.c         | 13 +++++--------
>  2 files changed, 7 insertions(+), 12 deletions(-)
> 
> diff --git a/include/trace/syscall.h b/include/trace/syscall.h
> index dc8ac27..dcc9bdf 100644
> --- a/include/trace/syscall.h
> +++ b/include/trace/syscall.h
> @@ -37,10 +37,8 @@ struct syscall_metadata {
>  #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
>  static inline void syscall_tracepoint_update(struct task_struct *p)
>  {
> -	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
> -		set_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT);
> -	else
> -		clear_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT);
> +	update_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT,
> +			       test_thread_flag(TIF_SYSCALL_TRACEPOINT));
>  }

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

>  #else
>  static inline void syscall_tracepoint_update(struct task_struct *p)
> diff --git a/kernel/ptrace.c b/kernel/ptrace.c
> index 21fec73..7a2bd8d 100644
> --- a/kernel/ptrace.c
> +++ b/kernel/ptrace.c
> @@ -785,16 +785,13 @@ static int ptrace_resume(struct task_struct *child, long request,
>  	if (!valid_signal(data))
>  		return -EIO;
>  
> -	if (request == PTRACE_SYSCALL)
> -		set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
> -	else
> -		clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
> +	update_tsk_thread_flag(child, TIF_SYSCALL_TRACE,
> +			       request == PTRACE_SYSCALL);
>  
>  #ifdef TIF_SYSCALL_EMU
> -	if (request == PTRACE_SYSEMU || request == PTRACE_SYSEMU_SINGLESTEP)
> -		set_tsk_thread_flag(child, TIF_SYSCALL_EMU);
> -	else
> -		clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
> +	update_tsk_thread_flag(child, TIF_SYSCALL_EMU,
> +			       request == PTRACE_SYSEMU ||
> +			       request == PTRACE_SYSEMU_SINGLESTEP);
>  #endif
>  
>  	if (is_singleblock(request)) {

  reply	other threads:[~2018-05-11 15:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11 15:04 [PATCH REPOST 0/5] Simplify setting thread flags to a particular value Dave Martin
2018-05-11 15:05 ` [PATCH REPOST 1/5] thread_info: Port core code to use update_thread_flag() helpers Dave Martin
2018-05-11 15:33   ` Steven Rostedt [this message]
2018-05-13 16:12   ` Oleg Nesterov
2018-05-11 15:05 ` [PATCH REPOST 2/5] ARM: Use update_thread_flag() Dave Martin
2018-05-11 15:05 ` [PATCH REPOST 3/5] MIPS: Use update{,_tsk}_thread_flag() Dave Martin
2018-05-11 15:05 ` [PATCH REPOST 4/5] powerpc: Use update_thread_flag() Dave Martin
2018-05-15  3:13   ` Michael Ellerman
2018-05-11 15:05 ` [PATCH REPOST 5/5] sparc: " Dave Martin
2018-05-11 15:10   ` David Miller

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=20180511113338.1d828a50@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=Dave.Martin@arm.com \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=jhogan@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=oleg@redhat.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=ralf@linux-mips.org \
    --subject='Re: [PATCH REPOST 1/5] thread_info: Port core code to use update_thread_flag() helpers' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).