mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge@hallyn.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ifdef struct task_struct::security
Date: Mon, 6 Aug 2007 15:31:12 -0500	[thread overview]
Message-ID: <20070806203112.GA12726@vino.hallyn.com> (raw)
In-Reply-To: <20070806185514.GA5842@martell.zuzino.mipt.ru>

Quoting Alexey Dobriyan (adobriyan@gmail.com):
> For those who don't care about CONFIG_SECURITY.

I'm quite sure we started that way, but the ifdefs were considered
too much of an eyesore.

If this is now acceptable, then the same thing might be considered
for inode->i_security, kern_ipc_perm.security, etc.  Getting rid of
just the task->security seems overly half-hearted.

-serge

> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
>  include/linux/sched.h |    3 ++-
>  kernel/fork.c         |    2 ++
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1086,8 +1086,9 @@ struct task_struct {
>  	int (*notifier)(void *priv);
>  	void *notifier_data;
>  	sigset_t *notifier_mask;
> -	
> +#ifdef CONFIG_SECURITY
>  	void *security;
> +#endif
>  	struct audit_context *audit_context;
>  	seccomp_t seccomp;
>  
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -1066,7 +1066,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
>  	do_posix_clock_monotonic_gettime(&p->start_time);
>  	p->real_start_time = p->start_time;
>  	monotonic_to_bootbased(&p->real_start_time);
> +#ifdef CONFIG_SECURITY
>  	p->security = NULL;
> +#endif
>  	p->io_context = NULL;
>  	p->io_wait = NULL;
>  	p->audit_context = NULL;
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2007-08-06 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-06 18:55 Alexey Dobriyan
2007-08-06 20:31 ` Serge E. Hallyn [this message]
2007-08-07  5:08   ` Andrew Morton
2007-08-07 15:05     ` Serge E. Hallyn
2007-08-07 15:57       ` Casey Schaufler
2007-08-07 16:12         ` Serge E. Hallyn
2007-08-08  0:34           ` Andrew Morton
2007-08-07 19:04       ` Alexey Dobriyan

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=20070806203112.GA12726@vino.hallyn.com \
    --to=serge@hallyn.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@osdl.org \
    --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

all inboxes | Powered by JetHome®