Re: [PATCH 4.19 64/89] efi: Make efi_rts_work accessible to efi page fault handler

From: Greg Kroah-Hartman
Date: Thu Mar 19 2020 - 06:04:10 EST


On Thu, Mar 19, 2020 at 09:42:10AM +0000, Chris Wilson wrote:
> Quoting Greg Kroah-Hartman (2020-03-17 10:55:13)
> > From: Sai Praneeth <sai.praneeth.prakhya@xxxxxxxxx>
> >
> > commit 9dbbedaa6171247c4c7c40b83f05b200a117c2e0 upstream.
> >
> > After the kernel has booted, if any accesses by firmware causes a page
> > fault, the efi page fault handler would freeze efi_rts_wq and schedules
> > a new process. To do this, the efi page fault handler needs
> > efi_rts_work. Hence, make it accessible.
> >
> > There will be no race conditions in accessing this structure, because
> > all the calls to efi runtime services are already serialized.
> >
> > Tested-by: Bhupesh Sharma <bhsharma@xxxxxxxxxx>
> > Suggested-by: Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx>
> > Based-on-code-from: Ricardo Neri <ricardo.neri@xxxxxxxxx>
> > Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@xxxxxxxxx>
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
> > Fixes: 3eb420e70d87 (âefi: Use a work queue to invoke EFI Runtime Servicesâ)
> > Signed-off-by: Wen Yang <wenyang@xxxxxxxxxxxxxxxxx>
> > Cc: Caspar Zhang <caspar@xxxxxxxxxxxxxxxxx>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>
> This requires the fix from
>
> commit ef1491e791308317bb9851a0ad380c4a68b58d54
> Author: Waiman Long <longman@xxxxxxxxxx>
> Date: Wed Nov 14 09:55:40 2018 -0800
>
> efi: Fix debugobjects warning on 'efi_rts_work'
>
> The following commit:
>
> 9dbbedaa6171 ("efi: Make efi_rts_work accessible to efi page fault handler")
>
> converted 'efi_rts_work' from an auto variable to a global variable.
> However, when submitting the work, INIT_WORK_ONSTACK() was still used,
> causing the following complaint from debugobjects:
>
> ODEBUG: object 00000000ed27b500 is NOT on stack 00000000c7d38760, but annotated.
>
> Change the macro to just INIT_WORK() to eliminate the warning.
>
> Signed-off-by: Waiman Long <longman@xxxxxxxxxx>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
> Acked-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@xxxxxxxxx>
> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: linux-efi@xxxxxxxxxxxxxxx
> Fixes: 9dbbedaa6171 ("efi: Make efi_rts_work accessible to efi page fault handler")
> Link: http://lkml.kernel.org/r/20181114175544.12860-2-ard.biesheuvel@xxxxxxxxxx
> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>

Thanks for this, now queued up.

greg k-h
>