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]
Message-Id: <20150323031141.5E9B9140142@ozlabs.org>
Date:	Mon, 23 Mar 2015 14:11:41 +1100 (AEDT)
From:	Michael Ellerman <mpe@...erman.id.au>
To:	Hari Bathini <hbathini@...ux.vnet.ibm.com>,
	Tony Luck <tony.luck@...el.com>,
	Kees Cook <keescook@...omium.org>,
	Anton Vorontsov <anton@...msg.org>,
	lkml <linux-kernel@...r.kernel.org>,
	linuxppc-dev <linuxppc-dev@...abs.org>,
	Colin Cross <ccross@...roid.com>, <scottwood@...escale.com>
Cc:	Mahesh J Salgaonkar <mahesh@...ux.vnet.ibm.com>
Subject: Re: [v5,1/4] powerpc/nvram: move generic code for nvram and pstore

On Thu, 2015-05-02 at 19:36:04 UTC, Hari Bathini wrote:
> With minor checks, we can move most of the code for nvram
> under pseries to a common place to be re-used by other
> powerpc platforms like powernv. This patch moves such
> common code to arch/powerpc/kernel/nvram_64.c file.
> 
> Signed-off-by: Hari Bathini <hbathini@...ux.vnet.ibm.com>
> ---
>  arch/powerpc/include/asm/nvram.h       |   50 ++
>  arch/powerpc/include/asm/rtas.h        |    4 
>  arch/powerpc/kernel/nvram_64.c         |  656 ++++++++++++++++++++++++++++++++
>  arch/powerpc/platforms/pseries/nvram.c |  665 --------------------------------
>  4 files changed, 714 insertions(+), 661 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
> index 34f7c9b..42e5c6a 100644
> --- a/arch/powerpc/kernel/nvram_64.c
> +++ b/arch/powerpc/kernel/nvram_64.c
> @@ -26,6 +26,9 @@

...

> +/* Derived from logfs_compress() */
> +static int nvram_compress(const void *in, void *out, size_t inlen,
> +							size_t outlen)
> +{
> +	int err, ret;
> +
> +	ret = -EIO;
> +	err = zlib_deflateInit2(&stream, COMPR_LEVEL, Z_DEFLATED, WINDOW_BITS,
> +						MEM_LEVEL, Z_DEFAULT_STRATEGY);
> +	if (err != Z_OK)
> +		goto error;


This fails the build for ppc64e_defconfig:

arch/powerpc/kernel/built-in.o: In function `.oops_to_nvram':
nvram_64.c:(.text+0x12148): undefined reference to `.zlib_deflateInit2'
nvram_64.c:(.text+0x12178): undefined reference to `.zlib_deflate'
nvram_64.c:(.text+0x1218c): undefined reference to `.zlib_deflateEnd'
arch/powerpc/kernel/built-in.o: In function `.nvram_init_oops_partition':
(.init.text+0x41e0): undefined reference to `.zlib_deflate_workspacesize'
make: *** [vmlinux] Error 1


It used to be OK because PSERIES selects ZLIB_DEFLATE.

I decided to just force ZLIB_DEFLATE on for PPC64. That will add ~22K to the
ppc64e kernel image.

Scott, if you guys are bothered by that let me know and we can add some #ifdefs
to avoid it.

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