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: <CAGS+omA8DFCy9eubH2X80nyajH-UqMyTsO5G6JkZNnpf_6g09Q@mail.gmail.com>
Date:   Thu, 15 Mar 2018 01:08:00 +0000
From:   Daniel Kurtz <djkurtz@...omium.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        adurbin@...omium.org, linux-kernel@...r.kernel.org,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>, jslaby@...e.com,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        mbrugger@...e.com, dhowells@...hat.com, vigneshr@...com,
        sean@...s.org, Jeffy <jeffy.chen@...k-chips.com>,
        Doug Anderson <dianders@...omium.org>, matt.redfearn@...s.com,
        marc_gonzalez@...madesigns.com, linux-acpi@...r.kernel.org,
        linux-serial@...r.kernel.org
Subject: Re: [PATCH v2 3/3] serial: core: Allow skipping old serial port initialization

On Wed, Mar 14, 2018 at 6:55 PM Kees Cook <keescook@...omium.org> wrote:

> On Wed, Mar 14, 2018 at 5:23 PM, Daniel Kurtz <djkurtz@...omium.org>
wrote:
> > On Wed, Mar 14, 2018 at 5:00 PM Kees Cook <keescook@...omium.org> wrote:
> >
> >> On Wed, Mar 14, 2018 at 3:58 PM, Kees Cook <keescook@...omium.org>
wrote:
> >> > On Wed, Mar 14, 2018 at 2:44 PM, Daniel Kurtz <djkurtz@...omium.org>
> > wrote:
> >> > Sorry for being dense. What tree is this against? I can't find
mention
> >> > of amdcz in Linus's tree nor linux-next.
> >
> >> As I watched this email send, I noticed the "3/3" in the Subject. ;) I
> >> see the amdcz support now. :P
> >> https://patchwork.kernel.org/project/LKML/list/?submitter=18441
> >
> >> >> diff --git a/include/linux/serial_8250.h
b/include/linux/serial_8250.h
> >> >> index a27ef5f56431..02570edaddd8 100644
> >> >> --- a/include/linux/serial_8250.h
> >> >> +++ b/include/linux/serial_8250.h
> >> >> @@ -136,6 +136,12 @@ struct uart_8250_port {
> >> >>         struct uart_8250_em485 *em485;
> >> >>  };
> >> >>
> >> >> +#ifdef CONFIG_SERIAL_8250
> >> >> +extern bool serial8250_skip_old_ports;
> >> >> +#else
> >> >> +static const bool serial8250_skip_old_ports;
> >> >> +#endif
> >> >
> >> > Where does serial8250_skip_old_ports get used where
CONFIG_SERIAL_8250
> >> > isn't defined? (i.e. why is the #ifdef needed here?)
> >
> >> This question still stands, though.
> >
> >  From the same patch: https://patchwork.kernel.org/patch/10283641/
> >
> > if (CONFIG_ACPI_SPCR_TABLE && !CONFIG_SERIAL_8250)
> >
> > in other words, if serial ports are disabled, but we still want to parse
> > the APCI_SPCR_TABLE, which "defaults y if X86".
> > Perhaps that logic should be changed (no need to parse ACPI SPCR table
if
> > we are going to disable serial anyway)?

> But won't this break? "static const bool ..." but the code tries to
> set a value but I'd expect the compiler to still yet about it?

er... yeah.


> I think you could drop the .h #ifdef and use:

> if (IS_ENABLED(CONFIG_SERIAL_825) && amdcz_present(...)) {

oooohhh... nice.  I like it, will change.



> -Kees

> --
> Kees Cook
> Pixel Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ