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]
Message-ID: <20171113142110.GA13046@linux-mips.org>
Date:   Mon, 13 Nov 2017 15:21:10 +0100
From:   Ralf Baechle <ralf@...ux-mips.org>
To:     jiaxun.yang@...goat.com
Cc:     linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] MIPS: Lonngson64: Copy kernel command line from
 arcs_cmdline Since lemte-2f/marchtype.c need to get cmdline from loongson.h
 this patch simply copy kernel command line from arcs_cmdline to fix that
 issue

On Sun, Nov 12, 2017 at 02:36:14PM +0800, jiaxun.yang@...goat.com wrote:
> Date:   Sun, 12 Nov 2017 14:36:14 +0800
> From: jiaxun.yang@...goat.com
> To: ralf@...ux-mips.org
> Cc: linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org, Jiaxun Yang
>  <jiaxun.yang@...goat.com>
> Subject: [PATCH 1/4] MIPS: Lonngson64: Copy kernel command line from
>  arcs_cmdline Since lemte-2f/marchtype.c need to get cmdline from
>  loongson.h this patch simply copy kernel command line from arcs_cmdline to
>  fix that issue

Please don't cram the entire commit message into the subject line.  The
standard for commit messages to keep lines only so long that when you
look at them in "git log" in a 80 column terminal they don't get line
wrapped or truncated.

And what is "lemte-2f/marchtype.c"?  Maybe you meant lemote-2f/machtype.c?

> From: Jiaxun Yang <jiaxun.yang@...goat.com>
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
> ---
>  arch/mips/include/asm/mach-loongson64/loongson.h | 6 ++++++
>  arch/mips/loongson64/common/cmdline.c            | 7 +++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/arch/mips/include/asm/mach-loongson64/loongson.h b/arch/mips/include/asm/mach-loongson64/loongson.h
> index c68c0cc879c6..1edf3a484e6a 100644
> --- a/arch/mips/include/asm/mach-loongson64/loongson.h
> +++ b/arch/mips/include/asm/mach-loongson64/loongson.h
> @@ -45,6 +45,12 @@ static inline void prom_init_uart_base(void)
>  #endif
>  }
>  
> +/*
> + * Copy kernel command line from arcs_cmdline
> + */
> +#include <asm/setup.h>

Please group #include lines at the top of the file.

> +extern char loongson_cmdline[COMMAND_LINE_SIZE];
> +
>  /* irq operation functions */
>  extern void bonito_irqdispatch(void);
>  extern void __init bonito_irq_init(void);
> diff --git a/arch/mips/loongson64/common/cmdline.c b/arch/mips/loongson64/common/cmdline.c
> index 01fbed137028..49e172184e15 100644
> --- a/arch/mips/loongson64/common/cmdline.c
> +++ b/arch/mips/loongson64/common/cmdline.c
> @@ -21,6 +21,11 @@
>  
>  #include <loongson.h>
>  
> +/* the kernel command line copied from arcs_cmdline */
> +#include <linux/export.h>
> +char loongson_cmdline[COMMAND_LINE_SIZE];
> +EXPORT_SYMBOL(loongson_cmdline);
> +
>  void __init prom_init_cmdline(void)
>  {
>  	int prom_argc;
> @@ -45,4 +50,6 @@ void __init prom_init_cmdline(void)
>  	}
>  
>  	prom_init_machtype();
> +	/* copy arcs_cmdline into loongson_cmdline */
> +	strncpy(loongson_cmdline, arcs_cmdline, COMMAND_LINE_SIZE);
>  }

  Ralf

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ