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:   Tue, 19 Nov 2019 13:22:17 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc:     Sean Christopherson <sean.j.christopherson@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        the arch/x86 maintainers <x86@...nel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
        Tony Luck <tony.luck@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ard Biesheuvel <ardb@...nel.org>,
        Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Nadav Amit <namit@...are.com>,
        "VMware, Inc." <pv-drivers@...are.com>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Hans de Goede <hdegoede@...hat.com>,
        Cezary Rojewski <cezary.rojewski@...el.com>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
        Jie Yang <yang.jie@...ux.intel.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, linux-ia64@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-pm <linux-pm@...r.kernel.org>,
        linux-efi <linux-efi@...r.kernel.org>,
        platform-driver-x86@...r.kernel.org,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        alsa-devel@...a-project.org
Subject: Re: [PATCH 00/12] treewide: break dependencies on x86's RM header


* Ard Biesheuvel <ard.biesheuvel@...aro.org> wrote:

> On Tue, 19 Nov 2019 at 12:10, Ingo Molnar <mingo@...nel.org> wrote:
> >
> >
> > * Sean Christopherson <sean.j.christopherson@...el.com> wrote:
> >
> > > x86's asm/realmode.h, which defines low level structures, variables and
> > > helpers used to bring up APs during SMP boot, ends up getting included in
> > > practically every nook and cranny of the kernel because the address used
> > > by ACPI for resuming from S3 also happens to be stored in the real mode
> > > header, and ACPI bleeds the dependency into its widely included headers.
> > >
> > > As a result, modifying realmode.h for even the most trivial change to the
> > > boot code triggers a full kernel rebuild, which is frustrating to say the
> > > least as it some of the most difficult code to get exactly right *and* is
> > > also some of the most functionally isolated code in the kernel.
> > >
> > > To break the kernel's widespread dependency on realmode.h, add a wrapper
> > > in the aforementioned ACPI S3 code to access the real mode header instead
> > > of derefencing the header directly in asm/acpi.h and thereby exposing it
> > > to the world via linux/acpi.h.
> > >
> > > Build tested on x86 with allyesconfig and allmodconfig, so hopefully there
> > > aren't more build issues lurking, but at this point it wouldn't surprise
> > > me in the least if this somehow manages to break the build.
> > >
> > > Based on tip/master, commit ceceaf1f12ba ("Merge branch 'WIP.x86/cleanups'").
> > >
> > > Patch Synopsis:
> > >   - Patches 01-09 fix a variety of build errors that arise when patch 12
> > >     drops realmode.h from asm/acpi.h.  Most of the errors are quite absurb
> > >     as they have no relation whatsoever to x86's RM boot code, but occur
> > >     because realmode.h happens to include asm/io.h.
> >
> > Yeah, these kind of parasitic header dependencies are the main driving
> > force behind kernel header spaghetti hell: it's super easy to add a new
> > header, but very hard to remove them...
> >
> > Hence they practically only accumulate.
> >
> > As a result header removal patches get priority, from me at least. :-)
> >
> > >   - Patch 10 removes a spurious include of realmode.h from an ACPI header.
> > >
> > >   - Patches 11 and 12 implement the wrapper and move it out of acpi.h.
> >
> > So if the ACPI maintainers are fine with -tip carrying patches #11 and #12
> > then I'd be glad to route these patches upstream.
> >
> > I've applied them to tip:WIP.core/headers as a work-in-progress tree, and
> > I'm testing them on randconfigs to make sure there's no broken
> > dependencies. I'll wait for the ACPI acks.
> >
> > I edited the title of patch 12 slightly, to:
> >
> >    c8bceb321209: x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c, remove <asm/realmode.h> from <asm/acpi.h>
> >
> > to make sure the big header dependency change is obvious at first sight.
> >
> 
> I'm fine with the patches but can we drop the fixes headers please?
> This doesn't actually fix anything, and touching early boot stuff for
> no good reason should be avoided imo.

Agreed and done.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ