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: <aCXSe8XnJfswiShd@gmail.com>
Date: Thu, 15 May 2025 13:39:39 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Andy Shevchenko <andy@...nel.org>
Cc: linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...nel.org>,
	Borislav Petkov <bp@...en8.de>, Juergen Gross <jgross@...e.com>,
	"H . Peter Anvin" <hpa@...or.com>,
	Kees Cook <keescook@...omium.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Mike Rapoport <rppt@...nel.org>,
	Paul Menzel <pmenzel@...gen.mpg.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	David Woodhouse <dwmw@...zon.co.uk>
Subject: Re: [PATCH 19/29] x86/boot/e820: Standardize e820 table index
 variable types under 'u32'


* Andy Shevchenko <andy@...nel.org> wrote:

> On Mon, Apr 21, 2025 at 08:51:59PM +0200, Ingo Molnar wrote:
> > So we have 'idx' types of 'int' and 'unsigned int', and sometimes
> > we assign 'u32' fields such as e820_table::nr_entries to these 'int'
> > values.
> > 
> > While there's no real risk of overflow with these tables, make it
> > all cleaner by standardizing on a single type: u32.
> > 
> > This also happens to shrink the code a bit:
> > 
> >    text      data      bss        dec        hex    filename
> >    7745     44072        0      51817       ca69    e820.o.before
> >    7613     44072        0      51685       c9e5    e820.o.after
> 
> Ah, here it is! You can ignore my respective comment in one of the previous
> patches. Perhaps better to group that one (which converts to use idx) and this
> one, so they will be sequential in the series?

Certainly, and done, the order is now:

  x86/boot/e820: Standardize e820 table index variable names under 'idx'
  x86/boot/e820: Standardize e820 table index variable types under 'u32'
  x86/boot/e820: Change struct e820_table::nr_entries type from __u32 to u32

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ