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>] [day] [month] [year] [list]
Date:	Fri, 13 Apr 2012 10:37:00 -0400
From:	Seiji Aguchi <seiji.aguchi@....com>
To:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Luck, Tony (tony.luck@...el.com)" <tony.luck@...el.com>,
	"Chen Gong (gong.chen@...ux.intel.com)" <gong.chen@...ux.intel.com>,
	"Matthew Garrett (mjg@...hat.com)" <mjg@...hat.com>,
	"dzickus@...hat.com" <dzickus@...hat.com>
CC:	"dle-develop@...ts.sourceforge.net" 
	<dle-develop@...ts.sourceforge.net>,
	Satoru Moriya <satoru.moriya@....com>
Subject: RE: [PATCH] efi: Avoid sysfs spew on reboot and panic

Matthew,

Do you have any comment on this patch?

Seiji

> -----Original Message-----
> From: Seiji Aguchi
> Sent: Wednesday, March 07, 2012 5:50 PM
> To: linux-kernel@...r.kernel.org; Luck, Tony (tony.luck@...el.com); Chen Gong (gong.chen@...ux.intel.com); Matthew Garrett
> (mjg@...hat.com); dzickus@...hat.com
> Cc: dle-develop@...ts.sourceforge.net; Satoru Moriya
> Subject: [PATCH] efi: Avoid sysfs spew on reboot and panic
> 
> Hi,
> 
> This patch just modified Matthew's patch which has not included in upstream to fit current upstream code.
> 
> https://lkml.org/lkml/2011/9/20/468
> 
>  Right now all pstore accesses to efivars will delete or create new sysfs  nodes. This is less than ideal if we've panicked or rebooting for
> following reasons.
>   - efi_pstore may not work if kernel panics in interrupt context, since
>     cpu can sleep while creating sysfs files.
>   - we don't need to create sysfs if we've panicked or rebooting, because
>     no one can access to it.
> 
> 
> Signed-off-by: Seiji Aguchi <seiji.aguchi@....com>
> Signed-off-by: Matthew Garrett <mjg@...hat.com>
> ---
>  drivers/firmware/efivars.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index d25599f..34c8890 100644
> --- a/drivers/firmware/efivars.c
> +++ b/drivers/firmware/efivars.c
> @@ -550,6 +550,16 @@ static int efi_pstore_write(enum pstore_type_id type,
> 
>  	spin_unlock(&efivars->lock);
> 
> +	/*
> +	 * If it's more severe than KMSG_DUMP_OOPS then we're already dead.
> +	 * Don't bother playing with sysfs.
> +	 */
> +
> +	if (reason != KMSG_DUMP_OOPS) {
> +		*id = part;
> +		return ret;
> +	}
> +
>  	if (found)
>  		efivar_unregister(found);
> 
> -- 1.7.1
--
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