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, 7 Jun 2011 13:16:55 -0700
From:	"Luck, Tony" <tony.luck@...el.com>
To:	Matthew Garrett <mjg@...hat.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Matt_Domsch@...l.com" <Matt_Domsch@...l.com>
Subject: RE: [PATCH v2 3/3] efi: Add support for using efivars as a pstore
 backend

+	efi_pstore_info.buf = kmalloc(4096, GFP_KERNEL);
+	if (efi_pstore_info.buf) {
+		efi_pstore_info.bufsize = 1024;
+		efi_pstore_info.data = efivars;
+		mutex_init(&efi_pstore_info.buf_mutex);
+		pstore_register(&efi_pstore_info);
+	}

I'd imagined #ifdef CONFIG_PSTORE around this (and the
efi_pstore_info definition) rather than providing stubs
for the !PSTORE case.

But your way works too.

You should avoid a memory leak with:

		if (!pstore_register(&efi_pstore_info))
			kfree(efi_pstore_info.buf);


I've also been thinking some more about how to handle a
system that has more than one pstore back-end available.
I still don't have any good ideas how to make use of more
than one backend - but it occurs to me that we may need
a way to let the user choose which to use (e.g. in the
unlikely event that a BIOS bug made one of ERST or EFI
unusable by pstore). The current "whoever registers first
gets to use it" now seems inadequate.

Perhaps a command line "pstore={backend}" might work, so
the user could specify pstore=efi to get your code, and
pstore=erst to get mine.

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