Re: [PATCH 1/3] efi/x86: turn EFI runtime semaphore into a global lock

2019-01-15 Thread Hedi Berriche
On Tue, Jan 15, 2019 at 18:55 Thomas Gleixner wrote: On Wed, 9 Jan 2019, Hedi Berriche wrote: Make efi_runtime_lock semaphore global so that it can be used by EFI runtime callers that may be defined outside efi/runtime-wrappers.c. The changelog should mention why the lock is renamed. OK

[PATCH 0/3] Protect against concurrent calls into UV BIOS

2019-01-09 Thread Hedi Berriche
defined outside drivers/firmware/efi/runtime-wrappers.c in preparation for using it to serialise calls into UV BIOS. Patch #2 removes uv_bios_call_reentrant() because it's dead code. Patch #3 makes uv_bios_call() variants use efi_runtime_sem to protect against concurrency. Hedi Berriche (3): efi

[PATCH 1/3] efi/x86: turn EFI runtime semaphore into a global lock

2019-01-09 Thread Hedi Berriche
Make efi_runtime_lock semaphore global so that it can be used by EFI runtime callers that may be defined outside efi/runtime-wrappers.c. The immediate motivation is to piggy-back it to serialise UV platform BIOS calls. No functional changes. Signed-off-by: Hedi Berriche Reviewed-by: Russ

[PATCH 3/3] x86/platform/UV: use efi_runtime_sem to serialise BIOS calls

2019-01-09 Thread Hedi Berriche
Calls into UV firmware must be protected against concurrency, use the now visible efi_runtime_sem lock to serialise them. Signed-off-by: Hedi Berriche Reviewed-by: Russ Anderson Reviewed-by: Mike Travis Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl --- arch/x86/include/asm/uv/bios.h

[PATCH 2/3] x86/platform/UV: kill uv_bios_call_reentrant() as it has no callers

2019-01-09 Thread Hedi Berriche
uv_bios_call_reentrant() has no callers nor is it exported, kill it. Signed-off-by: Hedi Berriche Reviewed-by: Russ Anderson Reviewed-by: Mike Travis Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl --- arch/x86/include/asm/uv/bios.h | 1 - arch/x86/platform/uv/bios_uv.c | 12

Re: [PATCH 3/3] x86/platform/UV: use efi_runtime_sem to serialise BIOS calls

2019-01-14 Thread Hedi Berriche
concurrent tasks both invoking uv_bios_call() or - 2 concurrent tasks - one invoking uv_bios_call() - one, for example, accessing an EFI vars via efivars Nitpicks below: On 01/09/2019 04:15 PM, Hedi Berriche wrote: Calls into UV firmware must be protected

Re: [Patch v2 1/4] efi/x86: turn EFI runtime semaphore into a global lock

2019-02-07 Thread Hedi Berriche
On Thu, Feb 07, 2019 at 16:05 Ard Biesheuvel wrote: On Thu, 7 Feb 2019 at 05:23, Hedi Berriche wrote: Make efi_runtime_lock semaphore global so that it can be used by EFI runtime callers that may be defined outside efi/runtime-wrappers.c. Also now that efi_runtime_lock semaphore is no longer

Re: [Patch v2 1/4] efi/x86: turn EFI runtime semaphore into a global lock

2019-02-12 Thread Hedi Berriche
On Thu, Feb 07, 2019 at 17:38 Hedi Berriche wrote: On Thu, Feb 07, 2019 at 16:05 Ard Biesheuvel wrote: On Thu, 7 Feb 2019 at 05:23, Hedi Berriche wrote: Make efi_runtime_lock semaphore global so that it can be used by EFI runtime callers that may be defined outside efi/runtime-wrappers.c

Re: [Patch v2 1/4] efi/x86: turn EFI runtime semaphore into a global lock

2019-02-12 Thread Hedi Berriche
On Tue, Feb 12, 2019 at 17:25 Hedi Berriche wrote: On Thu, Feb 07, 2019 at 17:38 Hedi Berriche wrote: On Thu, Feb 07, 2019 at 16:05 Ard Biesheuvel wrote: On Thu, 7 Feb 2019 at 05:23, Hedi Berriche wrote: Make efi_runtime_lock semaphore global so that it can be used by EFI runtime callers

[Patch v3 3/4] x86/platform/UV: use efi_enabled() instead of test_bit()

2019-02-13 Thread Hedi Berriche
Use ad hoc efi_enabled() instead of fiddling with test_bit(). Cleanup, no functional changes. Cc: Russ Anderson Cc: Mike Travis Cc: Dimitri Sivanich Cc: Steve Wahl Cc: sta...@vger.kernel.org # v4.9+ Signed-off-by: Hedi Berriche --- arch/x86/platform/uv/bios_uv.c | 2 +- 1 file changed, 1

[Patch v3 1/4] x86/platform/UV: remove unnecessary #ifdef CONFIG_EFI

2019-02-13 Thread Hedi Berriche
-by: Hedi Berriche --- arch/x86/include/asm/uv/bios.h | 4 arch/x86/platform/uv/bios_uv.c | 2 -- 2 files changed, 6 deletions(-) diff --git a/arch/x86/include/asm/uv/bios.h b/arch/x86/include/asm/uv/bios.h index e652a7cc6186..00d862cfbcbe 100644 --- a/arch/x86/include/asm/uv/bios.h +++ b

[Patch v3 0/4] Protect against concurrent calls into UV BIOS

2019-02-13 Thread Hedi Berriche
semaphore to protect against concurrency. Cc: Russ Anderson Cc: Mike Travis Cc: Dimitri Sivanich Cc: Steve Wahl Cc: sta...@vger.kernel.org # v4.9+ Hedi Berriche (4): x86/platform/UV: remove unnecessary #ifdef CONFIG_EFI x86/platform/UV: kill uv_bios_call_reentrant() as it has no callers x86

[Patch v3 2/4] x86/platform/UV: kill uv_bios_call_reentrant()

2019-02-13 Thread Hedi Berriche
uv_bios_call_reentrant() has no callers nor is it exported, kill it. Cleanup, no functional changes. Cc: Russ Anderson Cc: Mike Travis Cc: Dimitri Sivanich Cc: Steve Wahl Cc: sta...@vger.kernel.org # v4.9+ Signed-off-by: Hedi Berriche --- arch/x86/include/asm/uv/bios.h | 1 - arch/x86

[Patch v3 4/4] x86/platform/UV: use efi_runtime_lock to serialise BIOS calls

2019-02-13 Thread Hedi Berriche
Calls into UV firmware must be protected against concurrency, expose the efi_runtime_lock to the UV platform, and use it to serialise UV BIOS calls. Cc: Russ Anderson Cc: Mike Travis Cc: Dimitri Sivanich Cc: Steve Wahl Cc: sta...@vger.kernel.org # v4.9+ Signed-off-by: Hedi Berriche --- arch

[Patch v2 0/4] Protect against concurrent calls into UV BIOS

2019-02-06 Thread Hedi Berriche
test_bit() in favour of the ad hoc efi_enabled(). Patch #4 makes uv_bios_call() variants use efi_runtime_sem to protect against concurrency. Cc: Russ Anderson Cc: Mike Travis Cc: Dimitri Sivanich Cc: Steve Wahl Cc: sta...@vger.kernel.org Hedi Berriche (4): efi/x86: turn EFI runtime semaphore

[Patch v2 1/4] efi/x86: turn EFI runtime semaphore into a global lock

2019-02-06 Thread Hedi Berriche
...@vger.kernel.org Signed-off-by: Hedi Berriche --- drivers/firmware/efi/runtime-wrappers.c | 60 - include/linux/efi.h | 3 ++ 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/drivers/firmware/efi/runtime-wrappers.c b/drivers/firmware/efi/runtime

[Patch v2 4/4] x86/platform/UV: use efi_runtime_sem to serialise BIOS calls

2019-02-06 Thread Hedi Berriche
Calls into UV firmware must be protected against concurrency, use the now visible efi_runtime_sem lock to serialise them. Cc: Russ Anderson Cc: Mike Travis Cc: Dimitri Sivanich Cc: Steve Wahl Cc: sta...@vger.kernel.org Signed-off-by: Hedi Berriche --- arch/x86/include/asm/uv/bios.h | 3

[Patch v2 2/4] x86/platform/UV: kill uv_bios_call_reentrant() as it has no callers

2019-02-06 Thread Hedi Berriche
uv_bios_call_reentrant() has no callers nor is it exported, kill it. Cc: Russ Anderson Cc: Mike Travis Cc: Dimitri Sivanich Cc: Steve Wahl Cc: sta...@vger.kernel.org Signed-off-by: Hedi Berriche --- arch/x86/include/asm/uv/bios.h | 1 - arch/x86/platform/uv/bios_uv.c | 12 2

[Patch v2 3/4] x86/platform/UV: use efi_enabled() instead of test_bit()

2019-02-07 Thread Hedi Berriche
Use ad hoc efi_enabled() instead of fiddling with test_bit(). Cleanup, no functional changes. Cc: Russ Anderson Cc: Mike Travis Cc: Dimitri Sivanich Cc: Steve Wahl Cc: sta...@vger.kernel.org Signed-off-by: Hedi Berriche --- arch/x86/platform/uv/bios_uv.c | 2 +- 1 file changed, 1 insertion

Please revert 7212e37cbdf9 from 4.4-stable

2019-03-11 Thread Hedi Berriche
Hi Greg, Could you please revert 7212e37cbdf9 x86/platform/UV: Use efi_runtime_lock to serialise BIOS calls from 4.4-stable? In 4.4-stable efi_runtime_lock as defined in drivers/firmware/efi/runtime-wrappers.c is a spinlock (given it predates commit dce48e351c0d) and commit

[tip:x86/uv] x86/platform/UV: Remove uv_bios_call_reentrant()

2019-02-15 Thread tip-bot for Hedi Berriche
Commit-ID: f816525d615fff0336d0c881e5d960bbec5ea016 Gitweb: https://git.kernel.org/tip/f816525d615fff0336d0c881e5d960bbec5ea016 Author: Hedi Berriche AuthorDate: Wed, 13 Feb 2019 19:34:11 + Committer: Borislav Petkov CommitDate: Fri, 15 Feb 2019 15:13:48 +0100 x86/platform/UV

[tip:x86/uv] x86/platform/UV: Remove unnecessary #ifdef CONFIG_EFI

2019-02-15 Thread tip-bot for Hedi Berriche
Commit-ID: 30ad3e031d2feae075cd5fd2c443baa2d86c0195 Gitweb: https://git.kernel.org/tip/30ad3e031d2feae075cd5fd2c443baa2d86c0195 Author: Hedi Berriche AuthorDate: Wed, 13 Feb 2019 19:34:10 + Committer: Borislav Petkov CommitDate: Fri, 15 Feb 2019 15:05:15 +0100 x86/platform/UV

[tip:x86/urgent] x86/platform/UV: Use efi_runtime_lock to serialise BIOS calls

2019-02-15 Thread tip-bot for Hedi Berriche
Commit-ID: f331e766c4be33f4338574f3c9f7f77e98ab4571 Gitweb: https://git.kernel.org/tip/f331e766c4be33f4338574f3c9f7f77e98ab4571 Author: Hedi Berriche AuthorDate: Wed, 13 Feb 2019 19:34:13 + Committer: Borislav Petkov CommitDate: Fri, 15 Feb 2019 15:19:56 +0100 x86/platform/UV: Use

[tip:x86/uv] x86/platform/UV: Use efi_enabled() instead of test_bit()

2019-02-15 Thread tip-bot for Hedi Berriche
Commit-ID: 8945d96f7b3ead56e053ac79b8f7b0de98a30bfe Gitweb: https://git.kernel.org/tip/8945d96f7b3ead56e053ac79b8f7b0de98a30bfe Author: Hedi Berriche AuthorDate: Wed, 13 Feb 2019 19:34:12 + Committer: Borislav Petkov CommitDate: Fri, 15 Feb 2019 15:15:18 +0100 x86/platform/UV: Use