From: Emanuele Ghidoli <[email protected]>
Subject: [PATCH v1 0/5] Enable RNG support for KASLR on Toradex arm64 i.MX SoMs
This patch series enables RNG support to automatically populate /chosen/kaslr-seed on the following Toradex arm64 i.MX System on Modules (SoMs):
- Verdin iMX8MM
- Verdin iMX8MP
- Toradex SMARC iMX8MP
- Apalis iMX8
- Colibri iMX8X
This improves kernel security by supporting Kernel Address Space Layout Randomization (KASLR) using a runtime-provided seed from the hardware RNG.
---
Emanuele Ghidoli (5):
configs: verdin-imx8mm: enable RNG support for KASLR
configs: verdin-imx8mp: enable RNG support for KASLR
configs: toradex-smarc-imx8mp: enable RNG support for KASLR
configs: apalis-imx8: enable RNG support for KASLR
configs: colibri-imx8x: enable RNG support for KASLR
configs/apalis-imx8_defconfig | 5 ++++- configs/colibri-imx8x_defconfig | 5 ++++- configs/toradex-smarc-imx8mp_defconfig | 1 + configs/verdin-imx8mm_defconfig | 5 ++++- configs/verdin-imx8mp_defconfig | 1 + 5 files changed, 14 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/5 configs: verdin-imx8mm: enable RNG support for KASLR
From: Emanuele Ghidoli <[email protected]>
Enable DM_RNG in U-Boot to automatically populate /chosen/kaslr-seed and enable CAAM to provide entropy.
--- configs/verdin-imx8mm_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
configs/verdin-imx8mm_defconfig +4 -1
@@ -76,6 +76,7 @@ CONFIG_CMD_TIME=y CONFIG_CMD_UUID=y CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y +# CONFIG_CMD_HASH is not set CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set
@@ -99,6 +100,7 @@ CONFIG_SPL_CLK_COMPOSITE_CCF=y CONFIG_CLK_COMPOSITE_CCF=y CONFIG_SPL_CLK_IMX8MM=y CONFIG_CLK_IMX8MM=y +CONFIG_FSL_CAAM=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x44200000 CONFIG_FASTBOOT_FLASH=y
@@ -108,7 +110,6 @@ CONFIG_GPIO_HOG=y CONFIG_SPL_GPIO_HOG=y CONFIG_MXC_GPIO=y CONFIG_DM_I2C=y -CONFIG_MISC=y CONFIG_I2C_EEPROM=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_MMC_IO_VOLTAGE=y
@@ -139,6 +140,7 @@ CONFIG_SPL_DM_PMIC_PCA9450=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_DM_RNG=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_SYSRESET=y
@@ -161,4 +163,5 @@ CONFIG_CI_UDC=y CONFIG_SDP_LOADADDR=0x40400000 CONFIG_SPL_USB_SDP_SUPPORT=y CONFIG_IMX_WATCHDOG=y +# CONFIG_SPL_SHA_HW_ACCEL is not set CONFIG_HEXDUMP=y
Signature · 1 line
2.43.0
Re: [PATCH v1 1/5] configs: verdin-imx8mm: enable RNG support for KASLR
Quoted 6 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
Enable
DM_RNGin U-Boot to automatically populate /chosen/kaslr-seed and enable CAAM to provide entropy.Signed-off-by Emanuele Ghidoli <[email protected]>
PATCH 2/5 configs: verdin-imx8mp: enable RNG support for KASLR
In reply to Emanuele GhidoliFrom: Emanuele Ghidoli <[email protected]>
Enable DM_RNG in U-Boot to automatically populate /chosen/kaslr-seed.
--- configs/verdin-imx8mp_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/verdin-imx8mp_defconfig +1 -0
@@ -162,6 +162,7 @@ CONFIG_POWER_PCA9450=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_SPL_POWER_I2C=y +CONFIG_DM_RNG=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_SYSRESET=y
Signature · 1 line
2.43.0
Re: [PATCH v1 2/5] configs: verdin-imx8mp: enable RNG support for KASLR
Quoted 5 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
Enable
DM_RNGin U-Boot to automatically populate /chosen/kaslr-seed.Signed-off-by Emanuele Ghidoli <[email protected]>
PATCH 3/5 configs: toradex-smarc-imx8mp: enable RNG support for KASLR
In reply to Emanuele GhidoliFrom: Emanuele Ghidoli <[email protected]>
Enable DM_RNG in U-Boot to automatically populate /chosen/kaslr-seed.
--- configs/toradex-smarc-imx8mp_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/toradex-smarc-imx8mp_defconfig +1 -0
@@ -154,6 +154,7 @@ CONFIG_DM_REGULATOR_PCA9450=y CONFIG_SPL_DM_REGULATOR_PCA9450=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_DM_RNG=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_SYSRESET=y
Signature · 1 line
2.43.0
Re: [PATCH v1 3/5] configs: toradex-smarc-imx8mp: enable RNG support for KASLR
Quoted 5 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
Enable
DM_RNGin U-Boot to automatically populate /chosen/kaslr-seed.Signed-off-by Emanuele Ghidoli <[email protected]>
PATCH 4/5 configs: apalis-imx8: enable RNG support for KASLR
In reply to Emanuele GhidoliFrom: Emanuele Ghidoli <[email protected]>
Enable DM_RNG in U-Boot to automatically populate /chosen/kaslr-seed and enable CAAM to provide entropy.
Enable ARCH_MISC_INIT to initialize the CAAM job ring.
--- configs/apalis-imx8_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
configs/apalis-imx8_defconfig +4 -1
@@ -32,6 +32,7 @@ CONFIG_SYS_PBSIZE=2068 CONFIG_LOG=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SYS_PROMPT="Apalis iMX8 # " CONFIG_CMD_CPU=y
@@ -46,6 +47,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_CACHE=y CONFIG_CMD_UUID=y +# CONFIG_CMD_HASH is not set CONFIG_CMD_EXT4_WRITE=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y
@@ -66,11 +68,11 @@ CONFIG_TFTP_BLOCKSIZE=4096 CONFIG_BOOTCOUNT_LIMIT=y CONFIG_BOOTCOUNT_ENV=y CONFIG_CLK_IMX8=y +CONFIG_FSL_CAAM=y CONFIG_GPIO_HOG=y CONFIG_MXC_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_IMX_LPI2C=y -CONFIG_MISC=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y CONFIG_PHYLIB=y
@@ -88,6 +90,7 @@ CONFIG_IMX8_POWER_DOMAIN=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_DM_RNG=y CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y CONFIG_DM_THERMAL=y
Signature · 1 line
2.43.0
Re: [PATCH v1 4/5] configs: apalis-imx8: enable RNG support for KASLR
Quoted 7 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
Enable
DM_RNGin U-Boot to automatically populate /chosen/kaslr-seed and enable CAAM to provide entropy.
EnableARCH_MISC_INITto initialize the CAAM job ring.Signed-off-by Emanuele Ghidoli <[email protected]>
PATCH 5/5 configs: colibri-imx8x: enable RNG support for KASLR
In reply to Emanuele GhidoliFrom: Emanuele Ghidoli <[email protected]>
Enable DM_RNG in U-Boot to automatically populate /chosen/kaslr-seed and enable CAAM to provide entropy.
Enable ARCH_MISC_INIT to initialize the CAAM job ring.
--- configs/colibri-imx8x_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
configs/colibri-imx8x_defconfig +4 -1
@@ -33,6 +33,7 @@ CONFIG_SYS_PBSIZE=2068 CONFIG_LOG=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SYS_PROMPT="Colibri iMX8X # " CONFIG_CMD_CPU=y
@@ -47,6 +48,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_CACHE=y CONFIG_CMD_UUID=y +# CONFIG_CMD_HASH is not set CONFIG_CMD_EXT4_WRITE=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y
@@ -67,12 +69,12 @@ CONFIG_TFTP_BLOCKSIZE=4096 CONFIG_BOOTCOUNT_LIMIT=y CONFIG_BOOTCOUNT_ENV=y CONFIG_CLK_IMX8=y +CONFIG_FSL_CAAM=y CONFIG_GPIO_HOG=y CONFIG_FXL6408_GPIO=y CONFIG_MXC_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_IMX_LPI2C=y -CONFIG_MISC=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y CONFIG_PHYLIB=y
@@ -89,6 +91,7 @@ CONFIG_IMX8_POWER_DOMAIN=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_DM_RNG=y CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y CONFIG_DM_THERMAL=y
Signature · 1 line
2.43.0
Re: [PATCH v1 5/5] configs: colibri-imx8x: enable RNG support for KASLR
Quoted 7 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
Enable
DM_RNGin U-Boot to automatically populate /chosen/kaslr-seed and enable CAAM to provide entropy.
EnableARCH_MISC_INITto initialize the CAAM job ring.Signed-off-by Emanuele Ghidoli <[email protected]>
Quoted 12 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
Subject: [PATCH v1 0/5] Enable RNG support for KASLR on Toradex arm64 i.MX SoMs
This patch series enables RNG support to automatically populate /chosen/kaslr-seed on the following Toradex arm64 i.MX System on Modules (SoMs):
- Verdin iMX8MM
- Verdin iMX8MP
- Toradex SMARC iMX8MP
- Apalis iMX8
- Colibri iMX8X
Quoted 3 lines
This improves kernel security by supporting Kernel Address Space Layout Randomization (KASLR) using a runtime-provided seed from the hardware RNG.
Signed-off-by Emanuele Ghidoli <[email protected]>
Applied the series, thanks.