Skip to content

Commit b79bd0d

Browse files
committed
Merge tag 'riscv-for-linus-5.15-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull more RISC-V updates from Palmer Dabbelt: - A pair of defconfig additions, for NVMe and the EFI filesystem localization options. - A larger address space for stack randomization. - A cleanup to our install rules. - A DTS update for the Microchip Icicle board, to fix the serial console. - Support for build-time table sorting, which allows us to have __ex_table read-only. * tag 'riscv-for-linus-5.15-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Move EXCEPTION_TABLE to RO_DATA segment riscv: Enable BUILDTIME_TABLE_SORT riscv: dts: microchip: mpfs-icicle: Fix serial console riscv: move the (z)install rules to arch/riscv/Makefile riscv: Improve stack randomisation on RV64 riscv: defconfig: enable NLS_CODEPAGE_437, NLS_ISO8859_1 riscv: defconfig: enable BLK_DEV_NVME
2 parents 4e1c754 + 6f55ab3 commit b79bd0d

File tree

10 files changed

+22
-15
lines changed

10 files changed

+22
-15
lines changed

Documentation/features/vm/ELF-ASLR/arch-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
| openrisc: | TODO |
2323
| parisc: | ok |
2424
| powerpc: | ok |
25-
| riscv: | TODO |
25+
| riscv: | ok |
2626
| s390: | ok |
2727
| sh: | TODO |
2828
| sparc: | TODO |

arch/riscv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ config RISCV
4141
select ARCH_WANT_FRAME_POINTERS
4242
select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
4343
select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU
44+
select BUILDTIME_TABLE_SORT if MMU
4445
select CLONE_BACKWARDS
4546
select CLINT_TIMER if !MMU
4647
select COMMON_CLK

arch/riscv/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,11 @@ $(BOOT_TARGETS): vmlinux
132132
Image.%: Image
133133
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
134134

135-
zinstall install:
136-
$(Q)$(MAKE) $(build)=$(boot) $@
135+
install: install-image = Image
136+
zinstall: install-image = Image.gz
137+
install zinstall:
138+
$(CONFIG_SHELL) $(srctree)/$(boot)/install.sh $(KERNELRELEASE) \
139+
$(boot)/$(install-image) System.map "$(INSTALL_PATH)"
137140

138141
archclean:
139142
$(Q)$(MAKE) $(clean)=$(boot)

arch/riscv/boot/Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,3 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
5858

5959
$(obj)/loader.bin: $(obj)/loader FORCE
6060
$(call if_changed,objcopy)
61-
62-
install:
63-
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
64-
$(obj)/Image System.map "$(INSTALL_PATH)"
65-
66-
zinstall:
67-
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
68-
$(obj)/Image.gz System.map "$(INSTALL_PATH)"

arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@
1616

1717
aliases {
1818
ethernet0 = &emac1;
19+
serial0 = &serial0;
20+
serial1 = &serial1;
21+
serial2 = &serial2;
22+
serial3 = &serial3;
1923
};
2024

2125
chosen {
22-
stdout-path = &serial0;
26+
stdout-path = "serial0:115200n8";
2327
};
2428

2529
cpus {

arch/riscv/configs/defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ CONFIG_PCI=y
3939
CONFIG_PCIEPORTBUS=y
4040
CONFIG_PCI_HOST_GENERIC=y
4141
CONFIG_PCIE_XILINX=y
42+
CONFIG_PCIE_FU740=y
4243
CONFIG_DEVTMPFS=y
4344
CONFIG_DEVTMPFS_MOUNT=y
4445
CONFIG_BLK_DEV_LOOP=y
4546
CONFIG_VIRTIO_BLK=y
47+
CONFIG_BLK_DEV_NVME=m
4648
CONFIG_BLK_DEV_SD=y
4749
CONFIG_BLK_DEV_SR=y
4850
CONFIG_SCSI_VIRTIO=y
@@ -108,6 +110,8 @@ CONFIG_NFS_V4_1=y
108110
CONFIG_NFS_V4_2=y
109111
CONFIG_ROOT_NFS=y
110112
CONFIG_9P_FS=y
113+
CONFIG_NLS_CODEPAGE_437=y
114+
CONFIG_NLS_ISO8859_1=m
111115
CONFIG_CRYPTO_USER_API_HASH=y
112116
CONFIG_CRYPTO_DEV_VIRTIO=y
113117
CONFIG_PRINTK_TIME=y

arch/riscv/include/asm/elf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
*/
4343
#define ELF_ET_DYN_BASE ((TASK_SIZE / 3) * 2)
4444

45+
#ifdef CONFIG_64BIT
46+
#define STACK_RND_MASK (0x3ffff >> (PAGE_SHIFT - 12))
47+
#endif
4548
/*
4649
* This yields a mask that user programs can use to figure out what
4750
* instruction set this CPU supports. This could be done in user space,

arch/riscv/kernel/vmlinux-xip.lds.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ SECTIONS
121121
}
122122

123123
BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
124-
EXCEPTION_TABLE(0x10)
125124

126125
.rel.dyn : AT(ADDR(.rel.dyn) - LOAD_OFFSET) {
127126
*(.rel.dyn*)

arch/riscv/kernel/vmlinux.lds.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* Copyright (C) 2017 SiFive
55
*/
66

7+
#define RO_EXCEPTION_TABLE_ALIGN 16
8+
79
#ifdef CONFIG_XIP_KERNEL
810
#include "vmlinux-xip.lds.S"
911
#else
@@ -112,8 +114,6 @@ SECTIONS
112114
*(.srodata*)
113115
}
114116

115-
EXCEPTION_TABLE(0x10)
116-
117117
. = ALIGN(SECTION_ALIGN);
118118
_data = .;
119119

scripts/sorttable.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ static int do_file(char const *const fname, void *addr)
349349
case EM_ARM:
350350
case EM_MICROBLAZE:
351351
case EM_MIPS:
352+
case EM_RISCV:
352353
case EM_XTENSA:
353354
break;
354355
default:

0 commit comments

Comments
 (0)