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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1290815880.11971.323.camel@Joe-Laptop>
Date:	Fri, 26 Nov 2010 15:58:00 -0800
From:	Joe Perches <joe@...ches.com>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc: make proc entry's len "unsigned int"

On Fri, 2010-11-26 at 23:10 +0200, Alexey Dobriyan wrote:
> Space is not really conserved, because of natural alignment for the next field.

It can be.  Depends on the arch.

> Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
[]
> --- a/include/linux/proc_fs.h
> +++ b/include/linux/proc_fs.h
> @@ -50,7 +50,7 @@ typedef	int (write_proc_t)(struct file *file, const char __user *buffer,
>  
>  struct proc_dir_entry {
>  	unsigned int low_ino;
> -	unsigned short namelen;
> +	unsigned int namelen;
>  	const char *name;
>  	mode_t mode;
>  	nlink_t nlink;

mode_t is unsigned short on many platforms.

Layout order in this struct should probably be:

	const char *name;
	unsigned short namelen;
	mode_t mode;


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