Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
788453c
make DEFAULT_MMAP_MIN_ADDR match LSM_MMAP_MIN_ADDR
thestinger May 27, 2017
4dc311c
enable HARDENED_USERCOPY by default
thestinger May 29, 2017
8724965
enable SECURITY_DMESG_RESTRICT by default
thestinger May 3, 2017
7d2f35a
set kptr_restrict=2 by default
thestinger May 3, 2017
7d6f131
enable LIST_HARDENED by default
anthraxx Sep 18, 2023
d25caf6
enable BUG_ON_DATA_CORRUPTION by default
thestinger May 29, 2017
2d8ea1b
enable ARM64_SW_TTBR0_PAN by default
thestinger Feb 25, 2018
f2c6e50
arm64: enable RANDOMIZE_BASE by default
thestinger Feb 25, 2018
f5a0201
enable SLAB_FREELIST_RANDOM by default
thestinger May 3, 2017
b6ddefb
enable SLAB_FREELIST_HARDENED by default
thestinger Aug 20, 2017
d90a232
disable SLAB_MERGE_DEFAULT by default
thestinger Jul 8, 2017
9ceb578
enable FORTIFY_SOURCE by default
thestinger May 8, 2017
07eed43
enable PANIC_ON_OOPS by default
thestinger May 3, 2017
45ee2ce
stop hiding SLUB_DEBUG behind EXPERT
thestinger May 15, 2017
4de6c58
stop hiding X86_16BIT behind EXPERT
thestinger May 4, 2017
ce6f656
disable X86_16BIT by default
thestinger May 4, 2017
5ebe372
stop hiding MODIFY_LDT_SYSCALL behind EXPERT
thestinger May 4, 2017
b65cb1e
disable MODIFY_LDT_SYSCALL by default
thestinger May 4, 2017
bfd8730
set LEGACY_VSYSCALL_NONE by default
thestinger May 29, 2017
e033d11
stop hiding AIO behind EXPERT
Bernhard40 Oct 6, 2017
f718aa5
disable AIO by default
Bernhard40 Oct 6, 2017
9540fb3
remove SYSVIPC from arm64/x86_64 defconfigs
thestinger Feb 25, 2018
852795d
disable DEVPORT by default
thestinger May 27, 2017
cb42284
disable PROC_VMCORE by default
thestinger May 27, 2017
d96ab82
disable NFS_DEBUG by default
thestinger May 28, 2017
a8ecd14
enable DEBUG_WX by default
thestinger May 29, 2017
9136c48
disable LEGACY_PTYS by default
thestinger Jan 5, 2018
243cb12
disable DEVMEM by default
thestinger Jan 5, 2018
fc3e6e0
enable IO_STRICT_DEVMEM by default
thestinger Jan 5, 2018
9e24bb9
disable COMPAT_BRK by default
thestinger May 7, 2017
62b2e67
use maximum supported mmap rnd entropy by default
thestinger May 7, 2017
aa2f353
enable protected_{symlinks,hardlinks} by default
thestinger May 30, 2017
8b5a78e
enable SECURITY by default
thestinger Feb 25, 2018
961e6ea
enable SECURITY_YAMA by default
thestinger May 29, 2017
ca39f71
enable SECURITY_NETWORK by default
thestinger Feb 25, 2018
3e53928
enable AUDIT by default
thestinger Feb 25, 2018
802fd50
enable SECURITY_SELINUX by default
thestinger Feb 25, 2018
87b1bce
enable SYN_COOKIES by default
thestinger Jan 6, 2018
3aeeb84
enable INIT_ON_ALLOC_DEFAULT_ON by default
anthraxx Sep 19, 2019
f9a342f
enable INIT_ON_FREE_DEFAULT_ON by default
anthraxx Sep 19, 2019
2b8f8a4
kconfig: select DEBUG_FS_ALLOW_NONE by default if DEBUG_FS is enabled
anthraxx Sep 26, 2020
d728b03
stop hiding UID16 behind EXPERT
anthraxx Dec 22, 2020
188f002
disable UID16 by default
anthraxx Dec 22, 2020
756797e
kconfig: enable RANDOMIZE_KSTACK_OFFSET_DEFAULT by default
anthraxx Aug 25, 2021
ff9efa1
kconfig: disable LEGACY_TIOCSTI by default
anthraxx May 1, 2023
c532a8c
mm/slab: enable RANDOM_KMALLOC_CACHES by default
anthraxx Dec 12, 2023
7765d65
add __read_only for non-init related usage
thestinger May 7, 2017
bc84d41
mark kernel_set_to_readonly as __ro_after_init
thestinger May 12, 2017
fc9b3fa
Revert "mark kernel_set_to_readonly as __ro_after_init"
anthraxx Jan 13, 2019
d66f52c
mark slub runtime configuration as __ro_after_init
thestinger May 14, 2017
26f9b25
add __ro_after_init to slab_nomerge and slab_state
thestinger May 3, 2017
b83f69b
mark kmem_cache as __ro_after_init
thestinger May 28, 2017
585a5de
mark __{supported,default_kernel}_pte_mask as __ro_after_init
thestinger May 12, 2017
2904277
mark kobj_ns_type_register as only used for init
thestinger Jul 4, 2017
24e9f52
mark open_softirq as only used for init
thestinger Jul 4, 2017
ce7ccea
mark softirq_vec as __ro_after_init
thestinger Jul 4, 2017
b58da37
mm: slab: BUG on page type confusion under BUG_ON_DATA_CORRUPTION
thestinger Sep 17, 2019
34c9918
bug on kmem_cache_free with the wrong cache
thestinger May 3, 2017
d34242f
mm: add support for verifying page sanitization
thestinger May 4, 2017
e6ec3bf
slub: Extend init_on_free to slab caches with constructors
tsautereau-anssi Sep 20, 2019
1ddbcbb
slub: Add support for verifying slab sanitization
thestinger May 4, 2017
403257b
slub: add multi-purpose random canaries
thestinger May 3, 2017
6864a9e
security,perf: Allow further restriction of perf_event_open
bwhacks Jan 11, 2016
5967356
enable SECURITY_PERF_EVENTS_RESTRICT by default
thestinger May 4, 2017
077cf75
userns: add sysctl to disallow unprivileged CLONE_NEWUSER by default
hallyn May 31, 2013
f673179
userns: add kconfig to set default for unprivileged CLONE_NEWUSER
anthraxx Jul 31, 2019
0ea2e04
Add the extra_latent_entropy kernel parameter
ephox-gcc-plugins May 30, 2016
0aa9fcd
ata: avoid null pointer dereference on bug
thestinger May 16, 2017
6e38568
sanity check for negative length in nla_memcpy
thestinger May 16, 2017
9787b97
PaX shadow cr4 sanity check (essentially a revert)
thestinger May 16, 2017
4d51c54
add writable function pointer detection
thestinger Jul 9, 2017
26a2762
support overriding early audit kernel cmdline
thestinger Jul 9, 2017
63093ed
Revert "mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes"
thestinger Aug 27, 2017
60d1ea0
x86: determine stack entropy based on mmap entropy
thestinger May 22, 2017
ade5d13
arm64: determine stack entropy based on mmap entropy
thestinger May 22, 2017
779a7c1
randomize lower bits of the argument block
thestinger May 11, 2017
40c1dd8
support randomizing the lower bits of brk
thestinger May 30, 2017
6a7a1c8
mm: randomize lower bits of brk
thestinger Jun 1, 2017
7a918f5
x86: randomize lower bits of brk
thestinger Jun 1, 2017
e5ce446
mm: guarantee brk gap is at least one page
thestinger Jun 1, 2017
7d63dcd
x86: guarantee brk gap is at least one page
thestinger Jun 1, 2017
b7d36ec
restrict device timing side channels
thestinger May 16, 2017
2e7c1ab
sysctl: expose proc_dointvec_minmax_sysadmin as API function
anthraxx Sep 6, 2020
34c2c2f
usb: add toggle for disabling newly added USB devices
thestinger May 16, 2017
15314a7
usb: implement dedicated subsystem sysctl tables
anthraxx Sep 6, 2020
64c81e4
hard-wire legacy checkreqprot option to 0
thestinger Feb 25, 2018
80f8704
security: tty: Add owner user namespace to tty_struct
nmatt0 May 29, 2017
63b5eb7
security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN
nmatt0 May 29, 2017
61c856c
enable SECURITY_TIOCSTI_RESTRICT by default
thestinger May 4, 2017
bfc8a68
enable BPF JIT hardening by default (if available)
anthraxx May 7, 2018
bd09444
enable protected_{fifos,regular} by default
anthraxx Nov 4, 2018
9163ada
modpost: Add CONFIG_DEBUG_WRITABLE_FUNCTION_POINTERS_VERBOSE
tsautereau-anssi May 6, 2019
2bb5226
mm: Fix extra_latent_entropy
tsautereau-anssi May 7, 2019
8d04d53
slub: Extend init_on_alloc to slab caches with constructors
tsautereau-anssi Nov 29, 2019
d9cc0fc
net: tcp: add option to disable TCP simultaneous connect
madaidan Feb 9, 2020
bf6a3b7
ovl: add config to disable unprivileged user namespace mounts
anthraxx Mar 11, 2021
b00764c
mm, kfence: bug on data corruption after error report
anthraxx May 25, 2021
c9872e2
slub: Bug on free of non-slab objects
tsautereau-anssi Dec 16, 2021
132ae92
io_uring: set io_uring_disabled sysctl to 1 by default
nbouchinet-anssi Dec 8, 2023
8e7ee3c
sysctl: Add proc_dointvec_minmax_sysadmin sanity check
nbouchinet-anssi Oct 17, 2024
95fec49
kconfig: enable MSEAL_SYSTEM_MAPPINGS by default
anthraxx May 14, 2025
e90199f
mm/slub: Only instrument slab allocation with canaries
nbouchinet-anssi Oct 14, 2025
2a8e1c2
mm/slub: Add canary on sheaf alloc and free
nbouchinet-anssi Jan 15, 2026
156b91c
7.0 canary adaptation
nbouchinet-anssi Mar 6, 2026
dbc0283
Add canary_debug kernel parameter
nbouchinet-anssi Mar 23, 2026
c9ade82
mm/slub: Avoid check_canary on null objects
nbouchinet-anssi Apr 20, 2026
73c6ad8
gcc-plugins: Replace CONST_CAST with const_cast<>.
anthraxx May 1, 2026
a06e870
Linux hardened v7.0.10-hardened1
anthraxx May 27, 2026
4652319
mm/slub: Add disable_canary kernel cmdline
nbouchinet-anssi Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -778,17 +778,6 @@ Kernel parameters
Format: { "0" | "1" }
Default: 0 (1 if CONFIG_DEBUG_VM is set)

checkreqprot= [SELINUX] Set initial checkreqprot flag value.
Format: { "0" | "1" }
See security/selinux/Kconfig help text.
0 -- check protection applied by kernel (includes
any implied execute protection).
1 -- check protection requested by application.
Default value is set via a kernel config option.
Value can be changed at runtime via
/sys/fs/selinux/checkreqprot.
Setting checkreqprot to 1 is deprecated.

cio_ignore= [S390]
See Documentation/arch/s390/common_io.rst for details.

Expand Down Expand Up @@ -5055,6 +5044,11 @@ Kernel parameters
the specified number of seconds. This is to be used if
your oopses keep scrolling off the screen.

extra_latent_entropy
Enable a very simple form of latent entropy extraction
from the first 4GB of memory as the bootmem allocator
passes the memory pages to the buddy allocator.

pcbit= [HW,ISDN]

pci=option[,option...] [PCI,EARLY] various PCI subsystem options.
Expand Down
22 changes: 22 additions & 0 deletions Documentation/admin-guide/sysctl/kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,8 @@ with respect to CAP_PERFMON use cases.
>=1 Disallow CPU event access by users without ``CAP_PERFMON``.

>=2 Disallow kernel profiling by users without ``CAP_PERFMON``.

>=3 Disallow use of any event by users without ``CAP_PERFMON``.
=== ==================================================================


Expand Down Expand Up @@ -1596,6 +1598,26 @@ allow them to remain in low power states longer.

Default is set (1).

tiocsti_restrict
================

This toggle indicates whether unprivileged users are prevented from using the
``TIOCSTI`` ioctl to inject commands into other processes which share a tty
session.

= ============================================================================
0 No restriction, except the default one of only being able to inject commands
into one's own tty.
1 Users must have ``CAP_SYS_ADMIN`` to use the ``TIOCSTI`` ioctl.
= ============================================================================

When user namespaces are in use, the check for ``CAP_SYS_ADMIN`` is done
against the user namespace that originally opened the tty.

The kernel config option ``CONFIG_SECURITY_TIOCSTI_RESTRICT`` sets the default
value of ``tiocsti_restrict``.


traceoff_on_warning
===================

Expand Down
18 changes: 18 additions & 0 deletions Documentation/networking/ip-sysctl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,24 @@ tcp_backlog_ack_defer - BOOLEAN

Default: 1 (enabled)

tcp_simult_connect - BOOLEAN
Enable TCP simultaneous connect that adds a weakness in Linux's strict
implementation of TCP that allows two clients to connect to each other
without either entering a listening state. The weakness allows an attacker
to easily prevent a client from connecting to a known server provided the
source port for the connection is guessed correctly.

As the weakness could be used to prevent an antivirus or IPS from fetching
updates, or prevent an SSL gateway from fetching a CRL, it should be
eliminated by disabling this option. Though Linux is one of few operating
systems supporting simultaneous connect, it has no legitimate use in
practice and is rarely supported by firewalls.

Disabling this may break TCP STUNT which is used by some applications for
NAT traversal.

Default: Value of CONFIG_TCP_SIMULT_CONNECT_DEFAULT_ON

tcp_slow_start_after_idle - BOOLEAN
If enabled, provide RFC2861 behavior and time out the congestion
window after an idle period. An idle period is defined at
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VERSION = 7
PATCHLEVEL = 0
SUBLEVEL = 10
EXTRAVERSION =
EXTRAVERSION = -hardened1
NAME = Baby Opossum Posse

# *DOCUMENTATION*
Expand Down
5 changes: 3 additions & 2 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ config ARCH_MMAP_RND_BITS
int "Number of bits to use for ASLR of mmap base address" if EXPERT
range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
default ARCH_MMAP_RND_BITS_MIN
default ARCH_MMAP_RND_BITS_MAX
depends on HAVE_ARCH_MMAP_RND_BITS
help
This value can be used to select the number of bits to use to
Expand Down Expand Up @@ -1250,7 +1250,7 @@ config ARCH_MMAP_RND_COMPAT_BITS
int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
default ARCH_MMAP_RND_COMPAT_BITS_MIN
default ARCH_MMAP_RND_COMPAT_BITS_MAX
depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
help
This value can be used to select the number of bits to use to
Expand Down Expand Up @@ -1553,6 +1553,7 @@ config RANDOMIZE_KSTACK_OFFSET
config RANDOMIZE_KSTACK_OFFSET_DEFAULT
bool "Default state of kernel stack offset randomization"
depends on RANDOMIZE_KSTACK_OFFSET
default y
help
Kernel stack offset randomization is controlled by kernel boot param
"randomize_kstack_offset=on/off", and this config chooses the default
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,7 @@ config MITIGATE_SPECTRE_BRANCH_HISTORY
config ARM64_SW_TTBR0_PAN
bool "Emulate Privileged Access Never using TTBR0_EL1 switching"
depends on !KCSAN
default y
help
Enabling this option prevents the kernel from accessing
user-space memory directly by pointing TTBR0_EL1 to a reserved
Expand Down Expand Up @@ -2299,6 +2300,7 @@ config RELOCATABLE
config RANDOMIZE_BASE
bool "Randomize the address of the kernel image"
select RELOCATABLE
default y
help
Randomizes the virtual address at which the kernel image is
loaded, as a security feature that deters exploit attempts
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/configs/defconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_AUDIT=y
CONFIG_NO_HZ_IDLE=y
Expand Down
14 changes: 5 additions & 9 deletions arch/arm64/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,10 @@

/*
* This is the base location for PIE (ET_DYN with INTERP) loads. On
* 64-bit, this is above 4GB to leave the entire 32-bit address
* 64-bit, this is raised to 4GB to leave the entire 32-bit address
* space open for things that want to use the area for 32-bit pointers.
*/
#ifdef CONFIG_ARM64_FORCE_52BIT
#define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3)
#else
#define ELF_ET_DYN_BASE (2 * DEFAULT_MAP_WINDOW_64 / 3)
#endif /* CONFIG_ARM64_FORCE_52BIT */
#define ELF_ET_DYN_BASE 0x100000000UL

#ifndef __ASSEMBLER__

Expand Down Expand Up @@ -189,10 +185,10 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
/* 1GB of VA */
#ifdef CONFIG_COMPAT
#define STACK_RND_MASK (test_thread_flag(TIF_32BIT) ? \
0x7ff >> (PAGE_SHIFT - 12) : \
0x3ffff >> (PAGE_SHIFT - 12))
((1UL << mmap_rnd_compat_bits) - 1) >> (PAGE_SHIFT - 12) : \
((1UL << mmap_rnd_bits) - 1) >> (PAGE_SHIFT - 12))
#else
#define STACK_RND_MASK (0x3ffff >> (PAGE_SHIFT - 12))
#define STACK_RND_MASK (((1UL << mmap_rnd_bits) - 1) >> (PAGE_SHIFT - 12))
#endif

#ifdef __AARCH64EB__
Expand Down
8 changes: 3 additions & 5 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1242,8 +1242,7 @@ config VM86
default X86_LEGACY_VM86

config X86_16BIT
bool "Enable support for 16-bit segments" if EXPERT
default y
bool "Enable support for 16-bit segments"
depends on MODIFY_LDT_SYSCALL
help
This option is required by programs like Wine to run 16-bit
Expand Down Expand Up @@ -2235,7 +2234,7 @@ config COMPAT_VDSO
choice
prompt "vsyscall table for legacy applications"
depends on X86_64
default LEGACY_VSYSCALL_XONLY
default LEGACY_VSYSCALL_NONE
help
Legacy user code that does not know how to find the vDSO expects
to be able to issue three syscalls by calling fixed addresses in
Expand Down Expand Up @@ -2319,8 +2318,7 @@ config CMDLINE_OVERRIDE
be set to 'N' under normal conditions.

config MODIFY_LDT_SYSCALL
bool "Enable the LDT (local descriptor table)" if EXPERT
default y
bool "Enable the LDT (local descriptor table)"
help
Linux can allow user programs to install a per-process x86
Local Descriptor Table (LDT) using the modify_ldt(2) system
Expand Down
1 change: 0 additions & 1 deletion arch/x86/configs/x86_64_defconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CONFIG_WERROR=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_AUDIT=y
CONFIG_NO_HZ=y
Expand Down
14 changes: 9 additions & 5 deletions arch/x86/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@ extern int force_personality32;

/*
* This is the base location for PIE (ET_DYN with INTERP) loads. On
* 64-bit, this is above 4GB to leave the entire 32-bit address
* 64-bit, this is raised to 4GB to leave the entire 32-bit address
* space open for things that want to use the area for 32-bit pointers.
*/
#define ELF_ET_DYN_BASE (mmap_is_ia32() ? 0x000400000UL : \
(DEFAULT_MAP_WINDOW / 3 * 2))
0x100000000UL)

/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. This could be done in user space,
Expand Down Expand Up @@ -315,8 +315,8 @@ extern unsigned long get_sigframe_size(void);

#ifdef CONFIG_X86_32

#define __STACK_RND_MASK(is32bit) (0x7ff)
#define STACK_RND_MASK (0x7ff)
#define __STACK_RND_MASK(is32bit) ((1UL << mmap_rnd_bits) - 1)
#define STACK_RND_MASK ((1UL << mmap_rnd_bits) - 1)

#define ARCH_DLINFO ARCH_DLINFO_IA32

Expand All @@ -325,7 +325,11 @@ extern unsigned long get_sigframe_size(void);
#else /* CONFIG_X86_32 */

/* 1GB for 64bit, 8MB for 32bit */
#define __STACK_RND_MASK(is32bit) ((is32bit) ? 0x7ff : 0x3fffff)
#ifdef CONFIG_COMPAT
#define __STACK_RND_MASK(is32bit) ((is32bit) ? (1UL << mmap_rnd_compat_bits) - 1 : (1UL << mmap_rnd_bits) - 1)
#else
#define __STACK_RND_MASK(is32bit) ((1UL << mmap_rnd_bits) - 1)
#endif
#define STACK_RND_MASK __STACK_RND_MASK(mmap_is_ia32())

#define ARCH_DLINFO \
Expand Down
1 change: 1 addition & 0 deletions arch/x86/include/asm/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ static inline void cpu_tlbstate_update_lam(unsigned long lam, u64 untag_mask)

static inline void __native_tlb_flush_global(unsigned long cr4)
{
BUG_ON(cr4 != __read_cr4());
native_write_cr4(cr4 ^ X86_CR4_PGE);
native_write_cr4(cr4);
}
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ EXPORT_SYMBOL_GPL(native_write_cr4);
void cr4_update_irqsoff(unsigned long set, unsigned long clear)
{
unsigned long newval, cr4 = this_cpu_read(cpu_tlbstate.cr4);
BUG_ON(cr4 != __read_cr4());

lockdep_assert_irqs_disabled();

Expand Down
5 changes: 3 additions & 2 deletions arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ void speculation_ctrl_update_current(void)
static inline void cr4_toggle_bits_irqsoff(unsigned long mask)
{
unsigned long newval, cr4 = this_cpu_read(cpu_tlbstate.cr4);
BUG_ON(cr4 != __read_cr4());

newval = cr4 ^ mask;
if (newval != cr4) {
Expand Down Expand Up @@ -1026,9 +1027,9 @@ unsigned long arch_align_stack(unsigned long sp)
unsigned long arch_randomize_brk(struct mm_struct *mm)
{
if (mmap_is_ia32())
return randomize_page(mm->brk, SZ_32M);
return mm->brk + get_random_long() % SZ_32M + PAGE_SIZE;

return randomize_page(mm->brk, SZ_1G);
return mm->brk + get_random_long() % SZ_1G + PAGE_SIZE;
}

/*
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,9 @@ static void __init pagetable_init(void)

#define DEFAULT_PTE_MASK ~(_PAGE_NX | _PAGE_GLOBAL)
/* Bits supported by the hardware: */
pteval_t __supported_pte_mask __read_mostly = DEFAULT_PTE_MASK;
pteval_t __supported_pte_mask __ro_after_init = DEFAULT_PTE_MASK;
/* Bits allowed in normal kernel mappings: */
pteval_t __default_kernel_pte_mask __read_mostly = DEFAULT_PTE_MASK;
pteval_t __default_kernel_pte_mask __ro_after_init = DEFAULT_PTE_MASK;
EXPORT_SYMBOL_GPL(__supported_pte_mask);
/* Used in PAGE_KERNEL_* macros which are reasonably used out-of-tree: */
EXPORT_SYMBOL(__default_kernel_pte_mask);
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ static inline pgprot_t prot_sethuge(pgprot_t prot)
*/

/* Bits supported by the hardware: */
pteval_t __supported_pte_mask __read_mostly = ~0;
pteval_t __supported_pte_mask __ro_after_init = ~0;
/* Bits allowed in normal kernel mappings: */
pteval_t __default_kernel_pte_mask __read_mostly = ~0;
pteval_t __default_kernel_pte_mask __ro_after_init = ~0;
EXPORT_SYMBOL_GPL(__supported_pte_mask);
/* Used in PAGE_KERNEL_* macros which are reasonably used out-of-tree: */
EXPORT_SYMBOL(__default_kernel_pte_mask);
Expand Down
1 change: 1 addition & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4929,6 +4929,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
struct ata_port *ap;
struct ata_link *link;

BUG_ON(qc == NULL); /* ata_qc_from_tag _might_ return NULL */
if (WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE)))
return;

Expand Down
2 changes: 0 additions & 2 deletions drivers/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ config NSC_GPIO

config DEVMEM
bool "/dev/mem virtual device support"
default y
help
Say Y here if you want to support the /dev/mem device.
The /dev/mem device is used to access areas of physical
Expand Down Expand Up @@ -317,7 +316,6 @@ config NVRAM
config DEVPORT
bool "/dev/port character device"
depends on HAS_IOPORT
default y
help
Say Y here if you want to support the /dev/port device. The /dev/port
device is similar to /dev/mem, but for I/O ports.
Expand Down
2 changes: 0 additions & 2 deletions drivers/tty/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ config UNIX98_PTYS

config LEGACY_PTYS
bool "Legacy (BSD) PTY support"
default y
help
A pseudo terminal (PTY) is a software device consisting of two
halves: a master and a slave. The slave device behaves identical to
Expand Down Expand Up @@ -146,7 +145,6 @@ config LEGACY_PTY_COUNT

config LEGACY_TIOCSTI
bool "Allow legacy TIOCSTI usage"
default y
help
Historically the kernel has allowed TIOCSTI, which will push
characters into a controlling TTY. This continues to be used
Expand Down
Loading