public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Chris Metcalf <cmetcalf@tilera.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 17:27:10 +0100	[thread overview]
Message-ID: <20121213162710.GA20271@redhat.com> (raw)
In-Reply-To: <50C9FF11.2030303@tilera.com>

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;
	}

> > So I'd say it looks fine to me.
>
> Thanks!  Should I convert that to a Reviewed-by or Acked-by on the patch?

Heh ;) Please feel free to add Acked-by: Oleg Nesterov <oleg@redhat.com>

Oleg.


  reply	other threads:[~2012-12-13 16:26 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 [this message]
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           ` [PATCH] arch/tile: provide PT_FLAGS_COMPAT value in pt_regs Chris Metcalf

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=20121213162710.GA20271@redhat.com \
    --to=oleg@redhat.com \
    --cc=cmetcalf@tilera.com \
    --cc=linux-kernel@vger.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