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: <20190328131140.GX9224@smile.fi.intel.com>
Date:   Thu, 28 Mar 2019 15:11:40 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Borislav Petkov <bp@...en8.de>
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 Thu, Mar 28, 2019 at 01:32:50PM +0100, Borislav Petkov wrote:
> 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.

This is the same approach as it's done in earlyprintk support in the main part
of the kernel. Besides the fact that many drivers do it in the same way.

And I wouldn't call 'few' a 'bunch'...

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

Any idea how it can be done?

> No need for all that function
> pointer assignment "fun".

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ