mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	Lee Chun-Yi <jlee@suse.com>, Borislav Petkov <bp@alien8.de>,
	"Luck, Tony" <tony.luck@intel.com>,
	"Will Deacon" <will.deacon@arm.com>,
	"Hansen, Dave" <dave.hansen@intel.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	Bhupesh Sharma <bhsharma@redhat.com>,
	"Naresh Bhat" <naresh.bhat@linaro.org>,
	"Neri, Ricardo" <ricardo.neri@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
	Matt Fleming <matt@codeblueprint.co.uk>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: RE: [PATCH V4 0/3] Use efi_rts_wq to invoke EFI Runtime Services
Date: Sun, 27 May 2018 08:37:43 +0000	[thread overview]
Message-ID: <FFF73D592F13FD46B8700F0A279B802F39539372@ORSMSX114.amr.corp.intel.com> (raw)
In-Reply-To: <CAKv+Gu96gURHioy7hRLW2reyUwYMQDSLHhGE=m_TOz9CYF_Tjw@mail.gmail.com>

> > One more question again, if we are sure that non-blocking variants
> > will _always_ be called in atomic context, then, we got it covered.
> > Because, in
> > set_variable() and query_variable_info() (both blocking and
> > non-blocking) we check for in_atomic() and if so, we don't use efi_rts_wq
> (please refer to patch 3).
> >
> > If you think, there might be a probability of calling non-blocking
> > efi_rts out of atomic context, then, sure! Let's make them never use
> efi_rts_wq.
> >
> 
> This is not about what happens to be the current situation. It is about the API.
> 
> The non-blocking functions should never block, period. They either fail gracefully
> or perform their duties without sleeping.

Yes, that makes sense.

> 
> In this particular case, I think it is useful to have a guaranteed non-blocking
> version, not only to delete the dummy EFI variable, but potentially in other
> future cases as well, given that they can be called much earlier in the boot (when
> the perf/%cr3 issue is not a concern to begin with)

Thanks for making it more clear :)
I will change the non-blocking variants _not_ to use efi_rts_wq and as you suggested 
make efi_delete_dummy_variable() use non-blocking variants (that should also make it 
local to arch/x86).

Another follow on question is, does every firmware support both blocking and 
non-blocking variants (specially legacy EFI firmware)? I am worried about 
this because, presently efi_delete_dummy_variable() uses set_variable() and 
query_variable_info() but if I change efi_delete_dummy_variable() to use non-blocking 
variants and if they aren’t supported, then, I guess, efi_delete_dummy_variable() might 
fail :(

So, could you please clarify on that?

Regards,
Sai

  reply	other threads:[~2018-05-27  8:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 22:05 Sai Praneeth Prakhya
2018-05-25 22:05 ` [PATCH V4 1/3] x86/efi: Call efi_delete_dummy_variable() during efi subsystem initialization Sai Praneeth Prakhya
2018-05-25 22:05 ` [PATCH V4 2/3] efi: Create efi_rts_wq and efi_queue_work() to invoke all efi_runtime_services() Sai Praneeth Prakhya
2018-05-25 22:05 ` [PATCH V4 3/3] efi: Use efi_rts_wq to invoke EFI Runtime Services Sai Praneeth Prakhya
2018-05-25 22:19 ` [PATCH V4 0/3] " Ard Biesheuvel
2018-05-25 23:08   ` Prakhya, Sai Praneeth
2018-05-26  6:32     ` Ard Biesheuvel
2018-05-27  5:32       ` Prakhya, Sai Praneeth
2018-05-27  8:19         ` Ard Biesheuvel
2018-05-27  8:37           ` Prakhya, Sai Praneeth [this message]
2018-05-27 12:28             ` Ard Biesheuvel
2018-05-27 15:47               ` Prakhya, Sai Praneeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FFF73D592F13FD46B8700F0A279B802F39539372@ORSMSX114.amr.corp.intel.com \
    --to=sai.praneeth.prakhya@intel.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bhsharma@redhat.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=jlee@suse.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matt@codeblueprint.co.uk \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=naresh.bhat@linaro.org \
    --cc=peterz@infradead.org \
    --cc=ravi.v.shankar@intel.com \
    --cc=ricardo.neri@intel.com \
    --cc=tony.luck@intel.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®