From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Kees Cook <keescook@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, mtk.man-pages@gmail.com
Subject: Re: [patch] Fix argument check for PR_SET_MM
Date: Tue, 24 Jan 2012 00:00:34 +0400 [thread overview]
Message-ID: <20120123200034.GJ1907@moon> (raw)
In-Reply-To: <4F1DBA56.7070903@gmail.com>
On Tue, Jan 24, 2012 at 08:51:50AM +1300, Michael Kerrisk wrote:
> From: Michael Kerrisk <mtk.manpages@gmail.com>
>
> Cyrill,
>
> I imagine that the small operator fix below gives the behavior you intended.
> Please apply.
>
> Thanks,
>
> Michael
>
> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
>
> --- kernel/sys.c.orig 2012-01-24 07:26:44.986370466 +1300
> +++ kernel/sys.c 2012-01-24 07:27:52.202703776 +1300
> @@ -1703,7 +1703,7 @@ static int prctl_set_mm(int opt, unsigne
> int error = 0;
> struct mm_struct *mm = current->mm;
>
> - if (arg4 | arg5)
> + if (arg4 || arg5)
> return -EINVAL;
>
> if (!capable(CAP_SYS_ADMIN))
>
Hi Michael, thanks. But actually (arg4 | arg5) will give nonzero result
if any of operands is not a zero ;) So no error here. From readability pov
sure this will be clear. Thanks, I'll update.
Cyrill
parent reply other threads:[~2012-01-23 20:00 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <4F1DBA56.7070903@gmail.com>]
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=20120123200034.GJ1907@moon \
--to=gorcunov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.man-pages@gmail.com \
--cc=mtk.manpages@gmail.com \
--cc=torvalds@linux-foundation.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