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]
Date:   Thu, 28 Mar 2019 13:32:50 +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 2/7] x86/boot: Introduce helpers for serial I/O

On Tue, Mar 19, 2019 at 09:43:20PM +0300, Andy Shevchenko wrote:
> As preparatory to enable earlyprintk on non-standard ports on x86,
> introduce serial_in() and serial_out() helpers to perform serial I/O.
> 
> No functional change intended.

...

> +/* Assign serial I/O accessors */
> +static void early_serial_use_io_accessors(void)
> +{
> +	/* These will always be IO based ports */
> +	serial_in = io_serial_in;
> +	serial_out = io_serial_out;
> +}

This and the early_serial_use_mmio_accessors() in a later patch is just
silly because you need to export and forward-declare those serial_in and
serial_out function pointers in a bunch of places.

Just define exactly *two* simple functions serial_in() and serial_out()
which have enough logic to decide whether to do serial IO or MMIO and
put all that logic in those functions. No need for all that function
pointer assignment "fun".

Thx.

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