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]
Date:   Tue, 14 Jul 2020 17:42:42 -0400
From:   Arvind Sankar <nivedita@...m.mit.edu>
To:     Nick Terrell <nickrterrell@...il.com>
Cc:     Borislav Petkov <bp@...en8.de>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org, Chris Mason <clm@...com>,
        linux-kbuild@...r.kernel.org, x86@...nel.org,
        gregkh@...uxfoundation.org, Petr Malat <oss@...at.biz>,
        Kees Cook <keescook@...omium.org>,
        Kernel Team <Kernel-team@...com>,
        Adam Borowski <kilobyte@...band.pl>,
        Patrick Williams <patrickw3@...com>, rmikey@...com,
        mingo@...nel.org, Patrick Williams <patrick@...cx.xyz>,
        Sedat Dilek <sedat.dilek@...il.com>,
        Norbert Lange <nolange79@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Alex Xu <alex_y_xu@...oo.ca>, Nick Terrell <terrelln@...com>
Subject: Re: [PATCH v7 2/7] lib: add zstd support to decompress

On Wed, Jul 08, 2020 at 11:50:19AM -0700, Nick Terrell wrote:
> From: Nick Terrell <terrelln@...com>
> 
> * Add unzstd() and the zstd decompress interface.
> * Add zstd support to decompress_method().
> 
> The decompress_method() and unzstd() functions are used to decompress
> the initramfs and the initrd. The __decompress() function is used in
> the preboot environment to decompress a zstd compressed kernel.
> 
> The zstd decompression function allows the input and output buffers to
> overlap because that is used by x86 kernel decompression.
> 
> Reviewed-by: Kees Cook <keescook@...omium.org>
> Tested-by: Sedat Dilek <sedat.dilek@...il.com>
> Signed-off-by: Nick Terrell <terrelln@...com>
> + *
> + * __DISABLE_EXPORTS stops zstd and xxhash from declaring themselves
> + * as modules by disabling the EXPORT_SYMBOL macro.
> + */

Hi Nick, this doesn't actually work, because misc.c includes export.h
via
	"misc.h" -> <linux/linkage.h> -> <linux/export.h>
and EXPORT_SYMBOL is already defined before __DISABLE_EXPORTS is defined
here.

Adding -D__EXPORT_SYMBOLS to KBUILD_CFLAGS in arch/x86/boot/compressed/Makefile
fixes that, and then you don't have to define it here.

Also, __DISABLE_EXPORTS does not currently inhibit MODULE_INFO, so a
.modinfo section gets emitted into misc.o. I *think* this is harmless
and it will get discarded when building compressed/vmlinux, but thought
I'd point it out.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ