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]
Date:	Wed, 9 Apr 2014 13:44:48 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Wengang <wen.gang.wang@...cle.com>
Cc:	Fabian Frederick <fabf@...net.be>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	ocfs2-devel@....oracle.com
Subject: Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: Remove NULL assignments on
 static

On Wed, 09 Apr 2014 08:53:14 +0800 Wengang <wen.gang.wang@...cle.com> wrote:

> ___ 2014___04___09___ 04:13, Fabian Frederick ______:
> > static values are automatically initialized to NULL.
> >
>
> What's the badness if we do the assignments?

(top-posting repaired...)

Back in the olden days,

	static int x = 0;

would consume space in the .data segment and

	static int x;

would consume space in the .bss segment.


The .data segment is a part of vmlinux (because it contains non-zero
data) whereas .bss does not occupy space in vmlinux because .bss is
all-zero and can be built at runtime

So the effect of this patch would be to reduce the size of the kernel
image.  Less disk space, less ROM space, etc.


I think more recent gcc's and linkers got smarter about that and move
initialized-to-zero .data into .bss anyway.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ