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: <CAMj1kXGd8KgP6_-Ebec1wpxpCnjjOe4_uovcYW3GD1BA5au=3Q@mail.gmail.com>
Date:   Fri, 11 Sep 2020 21:23:05 +0300
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Punit Agrawal <punit1.agrawal@...hiba.co.jp>
Cc:     Smita Koralahalli Channabasappa <skoralah@....com>,
        X86 ML <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-pm@...r.kernel.org, linux-edac@...r.kernel.org,
        linux-efi <linux-efi@...r.kernel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        devel@...ica.org, Borislav Petkov <bp@...en8.de>,
        Tony Luck <tony.luck@...el.com>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Len Brown <len.brown@...el.com>,
        Yazen Ghannam <yazen.ghannam@....com>
Subject: Re: [PATCH v2 1/2] cper, apei, mce: Pass x86 CPER through the MCA
 handling chain

On Thu, 3 Sep 2020 at 09:34, Punit Agrawal <punit1.agrawal@...hiba.co.jp> wrote:
>
> Hi Smita,
>
> Smita Koralahalli Channabasappa <skoralah@....com> writes:
>
> > On 8/31/20 12:05 AM, Punit Agrawal wrote:
> >
> >> Hi Smita,
> >>
> >> A couple of comments below -
> >>
> >> Smita Koralahalli <Smita.KoralahalliChannabasappa@....com> writes:
> >>
> >> [...]
> >>
> >>
> >>> diff --git a/drivers/firmware/efi/cper-x86.c b/drivers/firmware/efi/cper-x86.c
> >>> index 2531de49f56c..374b8e18552a 100644
> >>> --- a/drivers/firmware/efi/cper-x86.c
> >>> +++ b/drivers/firmware/efi/cper-x86.c
> >>> @@ -1,7 +1,7 @@
> >>>   // SPDX-License-Identifier: GPL-2.0
> >>>   // Copyright (C) 2018, Advanced Micro Devices, Inc.
> >>>   -#include <linux/cper.h>
> >> Why is the include dropped? AFAICT, the definitions from there are still
> >> being used after this patch.
> >
> > Dropped because <acpi/apei.h> already includes <linux/cper.h>
>
> Generally, you want to follow the rule that if a declaration from a
> header file is being used, it should show up in the includes. The same
> applies to both source as well as header files.
>
> It doesn't matter if another include in the source file in turn ends up
> including the same header again; the #ifdef guards are there to prevent
> duplicate declarations.
>
> The rationale is that if future changes remove the usage of
> <acpi/apei.h>, the C file can still be compiled after dropping the
> include; there should be no need to then re-introduce <linux/cper.h> at
> that point.
>
> Hope that makes sense.
>

Agreed. If the code still uses declarations from linux/cper.h after
the patch, the #include should remain.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ