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-next>] [day] [month] [year] [list]
Date:	Thu,  3 Mar 2016 13:01:39 +0100
From:	Paul Bolle <pebolle@...cali.nl>
To:	Rusty Russell <rusty@...tcorp.com.au>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>
Cc:	x86@...nel.org, lguest@...ts.ozlabs.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 0/2] lguest: Minor cleanups of boot code

Building arch/x86/lguest/boot.o triggers two warnings:
    arch/x86/lguest/boot.c: In function 'early_put_chars':
    arch/x86/lguest/boot.c:1300:5: warning: 'device_len' may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (device_len < (offsetof(struct virtio_console_config, emerg_wr)
         ^
    arch/x86/lguest/boot.c:1238:6: note: 'device_len' was declared here
      u32 device_len;
          ^
    arch/x86/lguest/boot.c:1306:21: warning: 'device_offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
      console_cfg_offset = device_offset;
                         ^
    arch/x86/lguest/boot.c:1237:6: note: 'device_offset' was declared here
      u32 device_offset;
          ^

These annoy me for some time now. So I investigated whether
probe_pci_console(), which actually triggers these warnings, could be
reorganized to make these warnings go away. (Because I really dislike to
initialize variables to some default value just to shut up the compiler.)

I came up with this short series. It makes, I think, the code clearer for the
people reading it. And as a bonus the compiler is silent now.

Paul Bolle (2):
  lguest: read length of device_cap later
  lguest: read offset of device_cap later

 arch/x86/lguest/boot.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

-- 
2.4.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ