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]
Date:	Tue, 19 Jul 2016 14:52:24 +1000
From:	Greg Ungerer <gerg@...ux-m68k.org>
To:	Nicolas Pitre <nicolas.pitre@...aro.org>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	David Howells <dhowells@...hat.com>
Subject: Re: [PATCH v2 01/10] binfmt_flat: assorted cleanups

Hi Nicolas,

On 18/07/16 13:31, Nicolas Pitre wrote:
> Remove excessive casts, do some code grouping, etc.
> No functional changes.
> 
> Signed-off-by: Nicolas Pitre <nico@...aro.org>
> ---
>  fs/binfmt_flat.c | 118 ++++++++++++++++++++++++++-----------------------------
>  1 file changed, 56 insertions(+), 62 deletions(-)
> 
> diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
> index caf9e39bb8..085059d879 100644
> --- a/fs/binfmt_flat.c
> +++ b/fs/binfmt_flat.c
> @@ -80,7 +80,7 @@ struct lib_info {
>  		unsigned long text_len;			/* Length of text segment */
>  		unsigned long entry;			/* Start address for this module */
>  		unsigned long build_date;		/* When this one was compiled */
> -		short loaded;				/* Has this library been loaded? */
> +		bool loaded;				/* Has this library been loaded? */
>  	} lib_list[MAX_SHARED_LIBS];
>  };
>  
> @@ -107,7 +107,7 @@ static struct linux_binfmt flat_format = {
>  static int flat_core_dump(struct coredump_params *cprm)
>  {
>  	printk("Process %s:%d received signr %d and should have core dumped\n",
> -			current->comm, current->pid, (int) cprm->siginfo->si_signo);
> +			current->comm, current->pid, cprm->siginfo->si_signo);
>  	return(1);
>  }
>  
> @@ -190,7 +190,7 @@ static int decompress_exec(
>  	loff_t fpos;
>  	int ret, retval;
>  
> -	DBG_FLT("decompress_exec(offset=%x,buf=%x,len=%x)\n",(int)offset, (int)dst, (int)len);
> +	DBG_FLT("decompress_exec(offset=%lx,buf=%p,len=%lx)\n",offset, dst, len);
>  
>  	memset(&strm, 0, sizeof(strm));
>  	strm.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
> @@ -358,8 +358,8 @@ calc_reloc(unsigned long r, struct lib_info *p, int curid, int internalp)
>  	text_len = p->lib_list[id].text_len;
>  
>  	if (!flat_reloc_valid(r, start_brk - start_data + text_len)) {
> -		printk("BINFMT_FLAT: reloc outside program 0x%x (0 - 0x%x/0x%x)",
> -		       (int) r,(int)(start_brk-start_data+text_len),(int)text_len);
> +		printk("BINFMT_FLAT: reloc outside program 0x%lx (0 - 0x%lx/0x%lx)",
> +		       r, start_brk-start_data+text_len, text_len);

Seeing as you have modified quite a few printk calls is it worth
while annotating them with appropriate KERN_ERR, KERN_INFO, etc?
Just a thought.

Regards
Greg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ