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: <m3sif4u58b.fsf@oc8180480414.ibm.com>
Date:	Wed, 21 Jan 2015 15:28:52 +1100
From:	Stewart Smith <stewart@...ux.vnet.ibm.com>
To:	Pranith Kumar <bobby.prani@...il.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Michael Ellerman <mpe@...erman.id.au>,
	Mahesh Salgaonkar <mahesh@...ux.vnet.ibm.com>,
	Anton Blanchard <anton@...ba.org>,
	Neelesh Gupta <neelegup@...ux.vnet.ibm.com>,
	Joel Stanley <joel@....id.au>,
	Vasant Hegde <hegdevasant@...ux.vnet.ibm.com>,
	Rob Herring <robh@...nel.org>,
	"open list\:LINUX FOR POWERPC..." <linuxppc-dev@...ts.ozlabs.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

Pranith Kumar <bobby.prani@...il.com> writes:
> When CONFIG_PRINTK=n, log_buf_addr_get() returns NULL and log_buf_len_get()
> return 0. Check for these return values and skip registering the dump buffer.
>
> Signed-off-by: Pranith Kumar <bobby.prani@...il.com>
> CC: Michael Ellerman <mpe@...erman.id.au>

(investigating what would occur on systems with current firmware..)

Looking at hw/fsp/fsp-mdst-table.c in skiboot it appears that we'd end
up logging an error log about being passed the size 0 and return
OPAL_PARAMETER back to Linux.

While harmless, this is, naturally, not awesome to log an error about
being unable to grab kernel log on crash every time you boot.

Reviewed-by: Stewart Smith <stewart@...ux.vnet.ibm.com>

> ---
>  arch/powerpc/platforms/powernv/opal.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
> index f10b9ec..1db119f0 100644
> --- a/arch/powerpc/platforms/powernv/opal.c
> +++ b/arch/powerpc/platforms/powernv/opal.c
> @@ -667,7 +667,13 @@ static void __init opal_dump_region_init(void)
>  
>  	/* Register kernel log buffer */
>  	addr = log_buf_addr_get();
> +	if (addr == NULL)
> +		return;
> +
>  	size = log_buf_len_get();
> +	if (size == 0)
> +		return;
> +
>  	rc = opal_register_dump_region(OPAL_DUMP_REGION_LOG_BUF,
>  				       __pa(addr), size);
>  	/* Don't warn if this is just an older OPAL that doesn't
> -- 
> 1.9.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@...ts.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

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