lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 01 Aug 2006 14:53:15 -0400
From:	Stephen Smalley <sds@...ho.nsa.gov>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	Andrew Morton <akpm@...l.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs.h: ifdef security fields

On Tue, 2006-08-01 at 19:53 +0400, Alexey Dobriyan wrote:
> Chop 4 bytes from struct inode et al here.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
> ---
> 
>  fs/inode.c         |    2 ++
>  include/linux/fs.h |    7 ++++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -133,7 +133,9 @@ #endif
>  		inode->i_bdev = NULL;
>  		inode->i_cdev = NULL;
>  		inode->i_rdev = 0;
> +#ifdef CONFIG_SECURITY
>  		inode->i_security = NULL;
> +#endif

Possibly this should just be moved inside the security_inode_alloc
static inlines?

>  		inode->dirtied_when = 0;
>  		if (security_inode_alloc(inode)) {
>  			if (inode->i_sb->s_op->destroy_inode)
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -552,7 +552,9 @@ struct inode {
>  	unsigned int		i_flags;
>  
>  	atomic_t		i_writecount;
> +#ifdef CONFIG_SECURITY
>  	void			*i_security;
> +#endif
>  	union {
>  		void		*generic_ip;
>  	} u;
> @@ -688,8 +690,9 @@ struct file {
>  	struct file_ra_state	f_ra;
>  
>  	unsigned long		f_version;
> +#ifdef CONFIG_SECURITY_SELINUX

This should just be CONFIG_SECURITY.

>  	void			*f_security;
> -
> +#endif
>  	/* needed for tty driver, and maybe others */
>  	void			*private_data;
>  
> @@ -877,7 +880,9 @@ struct super_block {
>  	int			s_syncing;
>  	int			s_need_sync_fs;
>  	atomic_t		s_active;
> +#ifdef CONFIG_SECURITY_SELINUX

Likewise.

>  	void                    *s_security;
> +#endif
>  	struct xattr_handler	**s_xattr;
>  
>  	struct list_head	s_inodes;	/* all inodes */
> 

-- 
Stephen Smalley
National Security Agency

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ