arch/arm64/kernel/pi/kaslr_early.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
From: Enlin Mu <enlin.mu@unisoc.com>
If this node value is zero,it means that kaslr is enabled.
Removing it for the system safe,nobody knows if this feature is
enable or not.
Signed-off-by: Enlin Mu <enlin.mu@unisoc.com>
---
arch/arm64/kernel/pi/kaslr_early.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/pi/kaslr_early.c b/arch/arm64/kernel/pi/kaslr_early.c
index 17bff6e399e4..bc35d4ed84b7 100644
--- a/arch/arm64/kernel/pi/kaslr_early.c
+++ b/arch/arm64/kernel/pi/kaslr_early.c
@@ -81,7 +81,7 @@ static u64 get_kaslr_seed(void *fdt)
return 0;
ret = fdt64_to_cpu(*prop);
- *prop = 0;
+ fdt_nop_property(fdt, node, "kaslr-seed");
return ret;
}
--
2.25.1
Hi Enlin,
kernel test robot noticed the following build errors:
[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on linus/master v6.7-rc1 next-20231117]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Enlin-Mu/arm64-remove-kaslr-seed-node-when-it-had-used/20231114-220115
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
patch link: https://lore.kernel.org/r/TYSPR04MB7084AFDB414AA7AE49A02D608AB2A%40TYSPR04MB7084.apcprd04.prod.outlook.com
patch subject: [PATCH] arm64: remove kaslr-seed node when it had used
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20231117/202311172203.QJYSLPKE-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231117/202311172203.QJYSLPKE-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311172203.QJYSLPKE-lkp@intel.com/
All errors (new ones prefixed by >>):
aarch64-linux-ld: arch/arm64/kernel/pi/kaslr_early.pi.o: in function `get_kaslr_seed':
>> arch/arm64/kernel/pi/kaslr_early.c:84:(.init.text+0x18c): undefined reference to `__pi_fdt_nop_property'
arch/arm64/kernel/pi/kaslr_early.c:84:(.init.text+0x18c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__pi_fdt_nop_property'
aarch64-linux-ld: .tmp_vmlinux.kallsyms1: hidden symbol `__pi_fdt_nop_property' isn't defined
aarch64-linux-ld: final link failed: bad value
vim +84 arch/arm64/kernel/pi/kaslr_early.c
68
69 static u64 get_kaslr_seed(void *fdt)
70 {
71 int node, len;
72 fdt64_t *prop;
73 u64 ret;
74
75 node = fdt_path_offset(fdt, "/chosen");
76 if (node < 0)
77 return 0;
78
79 prop = fdt_getprop_w(fdt, node, "kaslr-seed", &len);
80 if (!prop || len != sizeof(u64))
81 return 0;
82
83 ret = fdt64_to_cpu(*prop);
> 84 fdt_nop_property(fdt, node, "kaslr-seed");
85 return ret;
86 }
87
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
On Tue, Nov 14, 2023 at 09:55:51PM +0800, Enlin Mu wrote: > From: Enlin Mu <enlin.mu@unisoc.com> > > If this node value is zero,it means that kaslr is enabled. > Removing it for the system safe,nobody knows if this feature is > enable or not. > > Signed-off-by: Enlin Mu <enlin.mu@unisoc.com> > --- > arch/arm64/kernel/pi/kaslr_early.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/pi/kaslr_early.c b/arch/arm64/kernel/pi/kaslr_early.c > index 17bff6e399e4..bc35d4ed84b7 100644 > --- a/arch/arm64/kernel/pi/kaslr_early.c > +++ b/arch/arm64/kernel/pi/kaslr_early.c > @@ -81,7 +81,7 @@ static u64 get_kaslr_seed(void *fdt) > return 0; > > ret = fdt64_to_cpu(*prop); > - *prop = 0; > + fdt_nop_property(fdt, node, "kaslr-seed"); > return ret; > } Why is it a problem to know that KASLR is enabled? Wouldn't the presence of the FDT_NOPs also give a pretty good hint? Will
© 2016 - 2025 Red Hat, Inc.