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, 8 Mar 2018 04:00:22 +0000
From:   "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@...el.com>
To:     Mark Rutland <mark.rutland@....com>
CC:     "linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Lee@...rids.cambridge.arm.com" <Lee@...rids.cambridge.arm.com>,
        Chun-Yi <jlee@...e.com>, Borislav Petkov <bp@...en8.de>,
        "Luck, Tony" <tony.luck@...el.com>,
        Will Deacon <will.deacon@....com>,
        "Hansen, Dave" <dave.hansen@...el.com>,
        Bhupesh Sharma <bhsharma@...hat.com>,
        "Neri, Ricardo" <ricardo.neri@...el.com>,
        "Shankar, Ravi V" <ravi.v.shankar@...el.com>,
        Matt Fleming <matt@...eblueprint.co.uk>,
        "Zijlstra, Peter" <peter.zijlstra@...el.com>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        "Williams, Dan J" <dan.j.williams@...el.com>
Subject: RE: [PATCH V2 2/3] efi: Introduce efi_rts_workqueue and some
 infrastructure to invoke all efi_runtime_services()

-0800, Sai Praneeth Prakhya wrote:
> > @@ -329,6 +331,19 @@ static int __init efisubsys_init(void)
> >  		return 0;
> >
> >  	/*
> > +	 * Since we process only one efi_runtime_service() at a time, an
> > +	 * ordered workqueue (which creates only one execution context)
> > +	 * should suffice all our needs.
> > +	 */
> > +	efi_rts_wq = alloc_ordered_workqueue("efi_rts_workqueue", 0);
> > +	if (!efi_rts_wq) {
> > +		pr_err("Failed to create efi_rts_workqueue, EFI runtime services
> "
> > +		       "disabled.\n");
> > +		clear_bit(EFI_RUNTIME_SERVICES, &efi.flags);
> > +		return 0;
> > +	}
> 
> I'm a little worried that something might sample this flag between it being set in
> an early_initcall (arm_enable_runtime_services), and cleared in a subsys_initcall
> here.
> 
> However, nothing seems to do that so far, so maybe that's ok...
> 

Thanks for raising this. I will take a look at initcalls.

> [...]
> 
> > +/* efi_runtime_service() function identifiers */ enum {
> > +	GET_TIME,
> > +	SET_TIME,
> > +	GET_WAKEUP_TIME,
> > +	SET_WAKEUP_TIME,
> > +	GET_VARIABLE,
> > +	GET_NEXT_VARIABLE,
> > +	SET_VARIABLE,
> > +	SET_VARIABLE_NONBLOCKING,
> > +	QUERY_VARIABLE_INFO,
> > +	QUERY_VARIABLE_INFO_NONBLOCKING,
> > +	GET_NEXT_HIGH_MONO_COUNT,
> > +	RESET_SYSTEM,
> > +	UPDATE_CAPSULE,
> > +	QUERY_CAPSULE_CAPS,
> > +};
> 
> Can we please give this enum a name....

Sure! Added in V3.

> 
> [...]
> 
> > +/*
> > + * efi_runtime_work:	Details of EFI Runtime Service work
> > + * @func:		EFI Runtime Service function identifier
> > + * @arg<1-5>:		EFI Runtime Service function arguments
> > + * @status:		Status of executing EFI Runtime Service
> > + */
> > +struct efi_runtime_work {
> > +	u8 func;
> 
> ... and use it here rather than an opaque u8? I realise that means placing the
> enum in <linux/efi.h>.
> 

Actually, with Miguel comments, I am considering making this struct static and moving
it to runtime-wrappers.c, since "struct efi_runtime_work" isn't really being used anywhere
except runtime-wrappers.c. Please see in V3.

> > +	void *arg1;
> > +	void *arg2;
> > +	void *arg3;
> > +	void *arg4;
> > +	void *arg5;
> > +	efi_status_t status;
> > +	struct work_struct work;
> > +};
> 
> Thanks,
> Mark.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ