From: Chris Metcalf <cmetcalf@tilera.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arch/tile: provide PT_FLAGS_COMPAT value in pt_regs
Date: Thu, 13 Dec 2012 11:41:13 -0500 [thread overview]
Message-ID: <50CA0529.2050506@tilera.com> (raw)
In-Reply-To: <20121213162710.GA20271@redhat.com>
On 12/13/2012 11:27 AM, Oleg Nesterov wrote:
> On 12/13, Chris Metcalf wrote:
>> On 12/13/2012 10:49 AM, Oleg Nesterov wrote:
>>> But ptrace_setoptions() returns EINVAL? it doesn't accept illegal bits.
>> It does return EINVAL - but if it gets both legal and illegal bits,
>> it honors all the legal bits first.
> This was true in the past, but now we have
>
> static int ptrace_setoptions(struct task_struct *child, unsigned long data)
> {
> unsigned flags;
>
> if (data & ~(unsigned long)PTRACE_O_MASK)
> return -EINVAL;
>
> /* Avoid intermediate state when all opts are cleared */
> flags = child->ptrace;
> flags &= ~(PTRACE_O_MASK << PT_OPT_FLAG_SHIFT);
> flags |= (data << PT_OPT_FLAG_SHIFT);
> child->ptrace = flags;
>
> return 0;
> }
Yup, I was looking at an older version of the code by mistake. See patch to follow. Thanks!
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
prev parent reply other threads:[~2012-12-13 16:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 22:24 [PATCH] arch/tile: provide PT_FLAGS_COMPAT value in pt_regs Chris Metcalf
2012-12-12 23:43 ` Oleg Nesterov
2012-12-13 14:58 ` Chris Metcalf
2012-12-13 15:49 ` Oleg Nesterov
2012-12-13 16:15 ` Chris Metcalf
2012-12-13 16:27 ` Oleg Nesterov
2012-12-13 16:34 ` [PATCH] arch/tile: clean up tile-specific PTRACE_SETOPTIONS Chris Metcalf
2012-12-14 17:26 ` Oleg Nesterov
2012-12-13 16:41 ` Chris Metcalf [this message]
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=50CA0529.2050506@tilera.com \
--to=cmetcalf@tilera.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.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