Skip to content

Commit 5e6e985

Browse files
Christoph HellwigAl Viro
authored andcommitted
uaccess: add infrastructure for kernel builds with set_fs()
Add a CONFIG_SET_FS option that is selected by architecturess that implement set_fs, which is all of them initially. If the option is not set stubs for routines related to overriding the address space are provided so that architectures can start to opt out of providing set_fs. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 36e2c74 commit 5e6e985

26 files changed

Lines changed: 45 additions & 0 deletions

File tree

arch/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ config KEXEC_ELF
2424
config HAVE_IMA_KEXEC
2525
bool
2626

27+
config SET_FS
28+
bool
29+
2730
config HOTPLUG_SMT
2831
bool
2932

arch/alpha/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ config ALPHA
3939
select OLD_SIGSUSPEND
4040
select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
4141
select MMU_GATHER_NO_RANGE
42+
select SET_FS
4243
help
4344
The Alpha is a 64-bit general-purpose processor designed and
4445
marketed by the Digital Equipment Corporation of blessed memory,

arch/arc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ config ARC
4848
select PCI_SYSCALL if PCI
4949
select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
5050
select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
51+
select SET_FS
5152

5253
config ARCH_HAS_CACHE_LINE_SIZE
5354
def_bool y

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ config ARM
118118
select PCI_SYSCALL if PCI
119119
select PERF_USE_VMALLOC
120120
select RTC_LIB
121+
select SET_FS
121122
select SYS_SUPPORTS_APM_EMULATION
122123
# Above selects are sorted alphabetically; please add new ones
123124
# according to that. Thanks.

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ config ARM64
192192
select PCI_SYSCALL if PCI
193193
select POWER_RESET
194194
select POWER_SUPPLY
195+
select SET_FS
195196
select SPARSE_IRQ
196197
select SWIOTLB
197198
select SYSCTL_EXCEPTION_TRACE

arch/c6x/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ config C6X
2222
select GENERIC_CLOCKEVENTS
2323
select MODULES_USE_ELF_RELA
2424
select MMU_GATHER_NO_RANGE if MMU
25+
select SET_FS
2526

2627
config MMU
2728
def_bool n

arch/csky/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ config CSKY
7878
select PCI_DOMAINS_GENERIC if PCI
7979
select PCI_SYSCALL if PCI
8080
select PCI_MSI if PCI
81+
select SET_FS
8182

8283
config LOCKDEP_SUPPORT
8384
def_bool y

arch/h8300/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ config H8300
2525
select HAVE_ARCH_KGDB
2626
select HAVE_ARCH_HASH
2727
select CPU_NO_EFFICIENT_FFS
28+
select SET_FS
2829
select UACCESS_MEMCPY
2930

3031
config CPU_BIG_ENDIAN

arch/hexagon/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ config HEXAGON
3131
select GENERIC_CLOCKEVENTS_BROADCAST
3232
select MODULES_USE_ELF_RELA
3333
select GENERIC_CPU_DEVICES
34+
select SET_FS
3435
help
3536
Qualcomm Hexagon is a processor architecture designed for high
3637
performance and low power across a wide variety of applications.

arch/ia64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ config IA64
5656
select NEED_DMA_MAP_STATE
5757
select NEED_SG_DMA_LENGTH
5858
select NUMA if !FLATMEM
59+
select SET_FS
5960
default y
6061
help
6162
The Itanium Processor Family is Intel's 64-bit successor to

0 commit comments

Comments
 (0)