mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Andi Kleen" <andi@firstfloor.org>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org,
	"Andi Kleen" <ak@linux.intel.com>,
	"David Howells" <dhowells@redhat.com>,
	"James Morris" <jmorris@namei.org>
Subject: Re: [PATCH] Fix security.h compilation with !CONFIG_SECURITY
Date: Mon, 18 Aug 2008 20:58:35 +0200	[thread overview]
Message-ID: <19f34abd0808181158k6eaac7f9hd99d9eceea5114a@mail.gmail.com> (raw)
In-Reply-To: <1219042537-13839-1-git-send-email-andi@firstfloor.org>

On Mon, Aug 18, 2008 at 8:55 AM, Andi Kleen <andi@firstfloor.org> wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> This recent patch
>
> commit 5cd9c58fbe9ec92b45b27e131719af4f2bd9eb40
> Author: David Howells <dhowells@redhat.com>
> Date:   Thu Aug 14 11:37:28 2008 +0100
>
>    security: Fix setting of PF_SUPERPRIV by __capable()
>
> broke compilation with !CONFIG_SECURITY:
>
> linux/include/linux/security.h: In function 'security_ptrace_traceme':
> linux/include/linux/security.h:1760: error: 'parent' undeclared (first use in this function)
>
> Add the obvious fix.
>
> Cc: David Howells <dhowells@redhat.com>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  include/linux/security.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/security.h b/include/linux/security.h
> index 2ee5ecf..0cc23a1 100644
> --- a/include/linux/security.h
> +++ b/include/linux/security.h
> @@ -1757,7 +1757,7 @@ static inline int security_ptrace_may_access(struct task_struct *child,
>
>  static inline int security_ptrace_traceme(struct task_struct *child)
>  {
> -       return cap_ptrace_traceme(parent);
> +       return cap_ptrace_traceme(child);
>  }
>
>  static inline int security_capget(struct task_struct *target,
> --

Oops. I just submitted a similar patch. But I think yours is wrong.

The argument name should be "parent", as in the definition that is
provided when CONFIG_SECURITY=y.

    int security_ptrace_traceme(struct task_struct *parent);

I'm sorry for the double submit.


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036

  reply	other threads:[~2008-08-18 19:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18  6:55 Andi Kleen
2008-08-18 18:58 ` Vegard Nossum [this message]
2008-08-18 19:22 ` David Howells

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=19f34abd0808181158k6eaac7f9hd99d9eceea5114a@mail.gmail.com \
    --to=vegard.nossum@gmail.com \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=dhowells@redhat.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®