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:   Wed, 10 Jan 2018 22:16:33 +0000
From:   James Hogan <james.hogan@...s.com>
To:     Paul Cercueil <paul@...pouillou.net>
CC:     Ralf Baechle <ralf@...ux-mips.org>,
        Maarten ter Huurne <maarten@...ewalker.org>,
        Paul Burton <paul.burton@...s.com>,
        <linux-kernel@...r.kernel.org>, <linux-mips@...ux-mips.org>
Subject: Re: [PATCH v6 08/15] MIPS: ingenic: Use common cmdline handling code

On Fri, Jan 05, 2018 at 07:25:06PM +0100, Paul Cercueil wrote:
> From: Paul Burton <paul.burton@...s.com>
> 
> jz4740_init_cmdline appends all arguments from argv (in fw_arg1) to
> arcs_cmdline, up to argc (in fw_arg0). The common code in
> fw_init_cmdline will do the exact same thing when run on a system where
> fw_arg0 isn't a pointer to kseg0 (it'll also set _fw_envp but we don't
> use it). Remove the custom implementation & use the generic code.
> 
> Signed-off-by: Paul Burton <paul.burton@...s.com>
> Reviewed-by: PrasannaKumar Muralidharan <prasannatsmkumar@...il.com>

Reviewed-by: James Hogan <jhogan@...nel.org>

Cheers
James

> ---
>  arch/mips/jz4740/prom.c | 24 ++----------------------
>  1 file changed, 2 insertions(+), 22 deletions(-)
> 
>  v2: No change
>  v3: No change
>  v4: No change
>  v5: No change
>  v6: Update Paul Burton's email address
> 
> diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c
> index 47e857194ce6..a62dd8e6ecf9 100644
> --- a/arch/mips/jz4740/prom.c
> +++ b/arch/mips/jz4740/prom.c
> @@ -20,33 +20,13 @@
>  #include <linux/serial_reg.h>
>  
>  #include <asm/bootinfo.h>
> +#include <asm/fw/fw.h>
>  #include <asm/mach-jz4740/base.h>
>  
> -static __init void jz4740_init_cmdline(int argc, char *argv[])
> -{
> -	unsigned int count = COMMAND_LINE_SIZE - 1;
> -	int i;
> -	char *dst = &(arcs_cmdline[0]);
> -	char *src;
> -
> -	for (i = 1; i < argc && count; ++i) {
> -		src = argv[i];
> -		while (*src && count) {
> -			*dst++ = *src++;
> -			--count;
> -		}
> -		*dst++ = ' ';
> -	}
> -	if (i > 1)
> -		--dst;
> -
> -	*dst = 0;
> -}
> -
>  void __init prom_init(void)
>  {
> -	jz4740_init_cmdline((int)fw_arg0, (char **)fw_arg1);
>  	mips_machtype = MACH_INGENIC_JZ4740;
> +	fw_init_cmdline();
>  }
>  
>  void __init prom_free_prom_memory(void)
> -- 
> 2.11.0
> 
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ