From: Tejun Heo <tj@kernel.org>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
linux-kernel@vger.kernel.org, dvlasenk@redhat.com,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 2/2] ptrace: simplify PTRACE_foo constants and PTRACE_SETOPTIONS code
Date: Sun, 11 Sep 2011 08:32:50 +0900 [thread overview]
Message-ID: <20110910233250.GC29319@htj.dyndns.org> (raw)
In-Reply-To: <201109090829.34222.vda.linux@googlemail.com>
On Fri, Sep 09, 2011 at 08:29:34AM +0200, Denys Vlasenko wrote:
> ptrace: simplify PTRACE_foo constants and PTRACE_SETOPTIONS code
>
> Exchange PT_TRACESYSGOOD and PT_PTRACE_CAP bit positions, which makes
> PT_option bits contiguous and therefore makes code in ptrace_setoptions()
> much simpler.
>
> Every PTRACE_O_TRACEevent is defined to (1 << PTRACE_EVENT_event)
> instead of using explicit numeric constants, to ensure we don't
> mess up relationship between bit positions and event ids.
>
> PT_EVENT_FLAG_SHIFT was not particularly useful, PT_OPT_FLAG_SHIFT with
> value of PT_EVENT_FLAG_SHIFT-1 is easier to use.
>
> PT_TRACE_MASK constant is nuked, the only its use is replaced by
> (PTRACE_O_MASK << PT_OPT_FLAG_SHIFT).
>
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
next prev parent reply other threads:[~2011-09-10 23:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 6:22 [PATCH 0/2] Fixes and cleanups in PTRACE_SETOPTIONS Denys Vlasenko
2011-09-09 6:24 ` [PATCH 1/2] ptrace: don't modify flags on PTRACE_SETOPTIONS failure Denys Vlasenko
2011-09-09 6:29 ` [PATCH 2/2] ptrace: simplify PTRACE_foo constants and PTRACE_SETOPTIONS code Denys Vlasenko
2011-09-10 23:32 ` Tejun Heo [this message]
2011-09-09 12:44 ` [PATCH 1/2] ptrace: don't modify flags on PTRACE_SETOPTIONS failure Indan Zupancic
2011-09-09 12:58 ` Denys Vlasenko
2011-09-09 16:22 ` Indan Zupancic
2011-09-10 23:32 ` Tejun Heo
2011-09-09 15:28 ` [PATCH 0/2] Fixes and cleanups in PTRACE_SETOPTIONS Oleg Nesterov
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=20110910233250.GC29319@htj.dyndns.org \
--to=tj@kernel.org \
--cc=dvlasenk@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=vda.linux@googlemail.com \
/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;
as well as URLs for NNTP newsgroup(s).