mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-24 06:22:43 +00:00
NX: efi/loader, add a call to grub_efi_check_nx_required()
nx_required was initialized to 0 but was never assigned a value. Call grub_efi_check_nx_required() to solve this. Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
This commit is contained in:
parent
19dcf163e6
commit
d0e3049f97
3 changed files with 31 additions and 2 deletions
|
@ -0,0 +1,25 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nicolas Frayer <nfrayer@redhat.com>
|
||||||
|
Date: Wed, 25 Sep 2024 17:23:33 +0200
|
||||||
|
Subject: [PATCH] efi/loader: Check if NX is required in grub_efi_linux_boot()
|
||||||
|
|
||||||
|
Call grub_efi_check_nx_required() passing it nx_required to
|
||||||
|
assign the correct value
|
||||||
|
|
||||||
|
Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
|
||||||
|
---
|
||||||
|
grub-core/loader/efi/linux.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
|
||||||
|
index 0d1804b602da..5889e3f36f89 100644
|
||||||
|
--- a/grub-core/loader/efi/linux.c
|
||||||
|
+++ b/grub-core/loader/efi/linux.c
|
||||||
|
@@ -236,6 +236,7 @@ grub_efi_linux_boot (grub_addr_t k_address, grub_size_t k_size,
|
||||||
|
grub_dprintf ("linux", "kernel_address: %p handover_offset: %p params: %p\n",
|
||||||
|
(void *)k_address, (void *)h_offset, k_params);
|
||||||
|
|
||||||
|
+ grub_efi_check_nx_required(&nx_required);
|
||||||
|
|
||||||
|
if (nx_required && !nx_supported)
|
||||||
|
return grub_error (GRUB_ERR_BAD_OS, N_("kernel does not support NX loading required by policy"));
|
|
@ -273,3 +273,4 @@ Patch0272: 0272-grub-mkconfig-Remove-check-for-mount-point-for-grub-.patch
|
||||||
Patch0273: 0273-efi-api.h-include-missing-__grub_efi_api-macros-on-E.patch
|
Patch0273: 0273-efi-api.h-include-missing-__grub_efi_api-macros-on-E.patch
|
||||||
Patch0274: 0274-grub-core-net-arp.c-fix-variable-name.patch
|
Patch0274: 0274-grub-core-net-arp.c-fix-variable-name.patch
|
||||||
Patch0275: 0275-load-EFI-commands-inside-test-expressions.patch
|
Patch0275: 0275-load-EFI-commands-inside-test-expressions.patch
|
||||||
|
Patch0276: 0276-efi-loader-Check-if-NX-is-required-in-grub_efi_linux.patch
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
Name: grub2
|
Name: grub2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.12
|
Version: 2.12
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
URL: http://www.gnu.org/software/grub/
|
URL: http://www.gnu.org/software/grub/
|
||||||
|
@ -560,6 +560,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 25 2024 Nicolas Frayer <nfrayer@redhat.com> 2.12-8
|
||||||
|
- NX: efi/loader, add a call to grub_efi_check_nx_required()
|
||||||
|
|
||||||
* Tue Sep 17 2024 Nicolas Frayer <nfrayer@redhat.com> - 2.12-7
|
* Tue Sep 17 2024 Nicolas Frayer <nfrayer@redhat.com> - 2.12-7
|
||||||
- aarch64/macros: Build gnulib with -mbranch-protection=standard
|
- aarch64/macros: Build gnulib with -mbranch-protection=standard
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue