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] [day] [month] [year] [list]
Message-ID: <Y02KdJfTSFRlbnwn@zn.tnic>
Date:   Mon, 17 Oct 2022 19:01:40 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Li Zetao <lizetao1@...wei.com>
Cc:     keescook@...omium.org, tglx@...utronix.de, mingo@...hat.com,
        dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
        kirill.shutemov@...ux.intel.com, tony.luck@...el.com,
        masahiroy@...nel.org, michael.roth@....com,
        sathyanarayanan.kuppuswamy@...ux.intel.com, nathan@...nel.org,
        ndesaulniers@...gle.com, brijesh.singh@....com,
        peterz@...radead.org, venu.busireddy@...cle.com,
        linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH -next v4 2/2] x86/boot/compressed: Add "-Wall" flag to
 Makefile

On Tue, Oct 11, 2022 at 01:29:04AM +0000, Li Zetao wrote:
> This warning is disabled in the main Makefile for this reason so we

Who's "we"?

Please use passive voice in your commit message: no "we" or "I", etc,
and describe your changes in imperative mood.

Also, pls read section "2) Describe your changes" in
Documentation/process/submitting-patches.rst for more details.

Also, see section "Changelog" in
Documentation/process/maintainer-tip.rst

Bottom line is: personal pronouns are ambiguous in text, especially with
so many parties/companies/etc developing the kernel so let's avoid them
please.

In any case, it is getting there but this is not how you structure a
patchset like this. The proper order is:

1st patch: Remove unused variables

2nd patch: Fix -Wframe-address warning and explain why

3rd patch: Fix arch/x86/boot/compressed/acpi.c:23:1: warning: unused function "__efi_get_rsdp_addr" [-Wunused-function]

Btw, I also get with -Wall

In function ‘find_trampoline_placement’,
    inlined from ‘paging_prepare’ at arch/x86/boot/compressed/pgtable_64.c:135:35:
arch/x86/boot/compressed/pgtable_64.c:60:30: warning: array subscript 0 is outside array bounds of ‘short unsigned int[0]’ [-Warray-bounds]
   60 |                 ebda_start = *(unsigned short *)0x40e << 4;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/boot/compressed/pgtable_64.c:61:30: warning: array subscript 0 is outside array bounds of ‘short unsigned int[0]’ [-Warray-bounds]
   61 |                 bios_start = *(unsigned short *)0x413 << 10;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~
In function ‘bios_get_rsdp_addr’,
    inlined from ‘get_rsdp_addr’ at arch/x86/boot/compressed/acpi.c:163:8:
arch/x86/boot/compressed/acpi.c:130:19: warning: array subscript 0 is outside array bounds of ‘u16[0]’ {aka ‘short unsigned int[]’} [-Warray-bounds]
  130 |         address = *(u16 *)ACPI_EBDA_PTR_LOCATION;

That should be a separate patch too.

Nth patch(es): Fix more warnings after building at least

	"allnoconfig" "defconfig" "allmodconfig" "allyesconfig"

for both 32-bit and 64-bit. A bunch of randconfigs on a big machine
would help a lot.

N + kth patch: Add -std=gnu11

X. Final patch: Add -Wall to compressed/Makefile.

In that order so that no warnings are seen when doing random builds.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ