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: <20190328082823.GC22720@zn.tnic>
Date:   Thu, 28 Mar 2019 09:28:23 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/7] x86/boot: Convert early_serial_base to unsigned
 long

On Tue, Mar 19, 2019 at 09:43:19PM +0300, Andy Shevchenko wrote:
> As a preparatory of adding flexible serial I/O accessors, convert
> early_serial_base to unsigned long to cover all possible bus addresses
> on the system.
> 
> No functional change intended.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  arch/x86/boot/boot.h                            | 2 +-
>  arch/x86/boot/compressed/early_serial_console.c | 2 +-
>  arch/x86/boot/compressed/misc.h                 | 4 ++--
>  arch/x86/boot/early_serial_console.c            | 6 +++---
>  arch/x86/boot/tty.c                             | 2 +-
>  5 files changed, 8 insertions(+), 8 deletions(-)

...

> diff --git a/arch/x86/boot/early_serial_console.c b/arch/x86/boot/early_serial_console.c
> index 023bf1c3de8b..2b663beda582 100644
> --- a/arch/x86/boot/early_serial_console.c
> +++ b/arch/x86/boot/early_serial_console.c
> @@ -23,7 +23,7 @@
>  
>  #define DEFAULT_BAUD 9600
>  
> -static void early_serial_init(int port, int baud)
> +static void early_serial_init(unsigned long port, int baud)
>  {
>  	unsigned char c;
>  	unsigned divisor;
> @@ -48,7 +48,7 @@ static void parse_earlyprintk(void)
>  	int baud = DEFAULT_BAUD;
>  	char arg[32];
>  	int pos = 0;
> -	int port = 0;
> +	unsigned long port = 0;
>  
>  	if (cmdline_find_option("earlyprintk", arg, sizeof(arg)) > 0) {
>  		char *e;
> @@ -118,7 +118,7 @@ static void parse_console_uart8250(void)
>  {
>  	char optstr[64], *options;
>  	int baud = DEFAULT_BAUD;
> -	int port = 0;
> +	unsigned long port = 0;

Here and above:

Please sort function local variables declaration in a reverse christmas
tree order:

	<type A> longest_variable_name;
	<type B> shorter_var_name;
	<type C> even_shorter;
	<type D> i;

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ