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, 04 Aug 2011 11:36:59 +0100
From:	Matt Fleming <matt@...sole-pimps.org>
To:	john stultz <johnstul@...ibm.com>
Cc:	linux-kernel@...r.kernel.org, Jan Beulich <JBeulich@...ell.com>,
	Matthew Garrett <mjg@...hat.com>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Tony Luck <tony.luck@...el.com>,
	Fenghua Yu <fenghua.yu@...el.com>,
	Alessandro Zummo <a.zummo@...ertech.it>
Subject: Re: [PATCH] x86, efi: Don't recursively acquire rtc_lock

On Thu, 2011-08-04 at 03:22 -0700, john stultz wrote:
> On Wed, Aug 3, 2011 at 2:04 PM, Matt Fleming <matt@...sole-pimps.org> wrote:
> > From: Matt Fleming <matt.fleming@...ux.intel.com>
> >
> > A deadlock was introduced on x86 in commit ef68c8f87ed1 ("x86:
> > Serialize EFI time accesses on rtc_lock") because efi_get_time() and
> > friends can be called with rtc_lock already held by
> > read_persistent_time(), e.g.
> >
> > timekeeping_init()
> >    read_persistent_clock()     <-- acquire rtc_lock
> >        efi_get_time()
> >            phys_efi_get_time() <-- acquire rtc_lock <DEADLOCK>
> >
> > Move the locking up into the caller of efi.get_time() and provide some
> > wrappers for use in other parts of the kernel instead of calling
> > efi.get_time(), etc directly. This way we can hide the rtc_lock dance
> > inside of arch/x86.
> 
> Sorry if this should be obvious, but is there a reason your not using
> your own internal lock for serializing the efi bits rather then using
> the rtc_lock?

Jan wrote the original code that started using the rtc_lock inside the
EFI bits here, ef68c8f87ed1 ("x86: Serialize EFI time accesses on
rtc_lock").

Jan?
 
-- 
Matt Fleming, Intel Open Source Technology Center

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