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:	Wed, 11 Nov 2015 15:08:34 -0800
From:	Kees Cook <keescook@...omium.org>
To:	Matt Fleming <matt@...eblueprint.co.uk>
Cc:	Geliang Tang <geliangtang@....com>,
	Anton Vorontsov <anton@...msg.org>,
	Colin Cross <ccross@...roid.com>,
	Tony Luck <tony.luck@...el.com>,
	"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/3] efi-pstore: implement efivars_pstore_exit()

On Wed, Nov 11, 2015 at 8:59 AM, Matt Fleming <matt@...eblueprint.co.uk> wrote:
> On Sat, 07 Nov, at 12:43:48PM, Geliang Tang wrote:
>> The original efivars_pstore_exit() is empty. I
>>  1) add a bufsize check statement.
>>  2) call pstore_unregister as it is defined now.
>>  3) free the memory and set bufsize to 0.
>>
>> Signed-off-by: Geliang Tang <geliangtang@....com>
>> ---
>>  drivers/firmware/efi/efi-pstore.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
>> index eac76a7..62d57d8 100644
>> --- a/drivers/firmware/efi/efi-pstore.c
>> +++ b/drivers/firmware/efi/efi-pstore.c
>> @@ -393,6 +393,13 @@ static __init int efivars_pstore_init(void)
>>
>>  static __exit void efivars_pstore_exit(void)
>>  {
>> +     if (!efi_pstore_info.bufsize)
>> +             return;
>> +
>> +     pstore_unregister(&efi_pstore_info);
>> +     kfree(efi_pstore_info.buf);
>> +     efi_pstore_info.buf = NULL;
>> +     efi_pstore_info.bufsize = 0;
>>  }
>>
>>  module_init(efivars_pstore_init);
>
> Looks OK to me. Kees, are you picking this up?

I can, though usually it goes through Tony.

-Kees

-- 
Kees Cook
Chrome OS Security
--
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