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: <4A78E931.6030308@lougher.demon.co.uk>
Date:	Wed, 05 Aug 2009 03:06:41 +0100
From:	Phillip Lougher <phillip@...gher.demon.co.uk>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Albin Tonnerre <albin.tonnerre@...e-electrons.com>,
	sam@...nborg.org, hpa@...or.com, linux@....linux.org.uk,
	alain@...ff.lu, linux-kernel@...r.kernel.org,
	linux-embedded@...r.kernel.org
Subject: Re: [PATCH 1/6] lib/decompress_*: only include <linux/slab.h> if
 STATIC is not defined

Andrew Morton wrote:
> On Wed, 05 Aug 2009 01:47:57 +0100 Phillip Lougher <phillip@...gher.demon.co.uk> wrote:
> 
>>
>> What do you normally do in this situation?
> 
> I normally fix the rejects ;)
> 
> But I'd like to confirm that the two patches don't fix the same thing
> via different means.  Lacking a full description of Albin's "issues",
> that's hard to determine.  They do appear to be unrelated.
> 

No they're not fixing the same thing.

Albin's patch is moving #include <slab.h> inside the #ifndef STATIC ...
#endif code segment.  This ensures that <slab.h>
isn't included when the file is being built in the stripped down
pre-boot environment.  I imagine Albin's issues is that slab.h
pulls in a lot of definitions unnecessary in the pre-boot
environment and which rely on things which are missing
in the stripped down pre-boot environment.

My changes to the #ifndef STATIC logic defines PREBOOT if
STATIC is defined.  My patch uses the PREBOOT definition
later to define the decompress wrapper function, which is only
needed in the preboot environment.

i.e.

#ifdef STATIC
#define PREBOOT
#else
#include <linux/decompress/unlzma.h>
#endif

...
Lots of code
...

#ifdef PREBOOT
static int INIT decompress.....
#endif


Obvious question, why doesn't my patch use STATIC here rather than
PREBOOT?  The header file <linux/decompress/unlzma.h> defines STATIC, .i.e
the #ifndef STATIC case defines STATIC via an include file, which makes
decisions on STATIC later in the file impossible.

>>  I'm happy to send a revised
>> bzip2-lzma-remove-nasty-uncompressed-size-hack-in-pre-boot-environment.patch
>> that would apply cleanly on-top of Alvin's patch, but, this will obviously
>> create dependencies on his patch being applied.
> 
> Reworked
> lib-decompress_-only-include-linux-slabh-if-static-is-not-defined.patch:

The patch looks OK.

Thanks

Phillip
--
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