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:	Thu, 17 Jul 2014 11:58:42 -0400
From:	Sasha Levin <sasha.levin@...cle.com>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	tglx@...utronix.de, mingo@...hat.com, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86-64, espfix: consider IRQs are off when initializing

On 07/17/2014 11:48 AM, H. Peter Anvin wrote:
> On 07/17/2014 08:13 AM, Sasha Levin wrote:
>> > When going through our initialization code (init_espfix_ap() ) we need to
>> > keep in mind IRQs are off, and we need to handle it appropriately:
>> > 
>> >  - Do not allocate with __GFP_FS.
>> >  - No point in using a mutex.
>> > 
>> > Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
> I don't think this is safe.  The whole point was that if we do
> GFP_ATOMIC we have to accept failure, and if we have a spin lock then
> sleeping is not permitted.  It is unclear to me is sleeping is safe in
> this context even so, so we may still have a problem, but calling
> __get_free_page(GFP_ATOMIC) and then unconditionally use the results is
> not right.

This is the result of getting an error message for allocating with GFP_KERNEL
saying that we can't do that with IRQs off.

My assumption after that was that we're not going to be sleeping at all, which
is why spinlock/GFP_ATOMIC would be correct here.


Thanks,
Sasha
--
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