Commit graph

6539 commits

Author SHA1 Message Date
Daniel Micay
e3839126e6 support randomizing the lower bits of brk
This adds support for arch_randomize_brk implementations not performing
page alignment in order to randomize the lower bits of the brk heap.

This idea is taken from PaX but the approach is different. This reuses
the existing code and avoids forcing early creation of the heap mapping,
avoiding mapping it if it's not used which is the case with many modern
allocators based solely on mmap.

The malloc implementation can be relied upon to align this as needed to
the requirements it has, so using 16 byte alignment here is unnecessary.

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2024-11-30 02:16:40 +01:00
Daniel Micay
2994f3aa26 mm: randomize lower bits of brk
Per PaX, but for this alternate brk randomization approach.

As part of the v5.4 linux-hardened rebase, this commit was adapted from
the arm64 specific brk randomization to all arches that use the generic
topdown mmap layout functions, introduced in e7142bf5d231 ("arm64, mm:
make randomization selected by generic topdown mmap layout").

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Levente Polyak <levente@leventepolyak.net>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2024-11-30 02:16:33 +01:00
Daniel Micay
a124bf732b add __read_only for non-init related usage
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2024-11-30 02:16:16 +01:00
Daniel Micay
1f63f26cd2 make sysctl constants read-only
Most of this is extracted from the last publicly available version of
the PaX patches where it's part of KERNEXEC as __read_only. It has been
extended to a few more of these constants.
2024-11-30 02:16:12 +01:00
Daniel Micay
a96370e583 add __ro_after_init to slab_nomerge and slab_state
This was extracted from the PaX patch where it's part of the KERNEXEC
feature as __read_only.

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2024-11-30 02:16:00 +01:00
Daniel Micay
2080fd3f3a mark kmem_cache as __ro_after_init
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2024-11-30 02:15:56 +01:00
madaidan
6527a24e6f Make more sysctl constants read-only 2024-11-30 02:15:48 +01:00
Dmitry Muhomor
fd3f9648e3 selinux: cache zygote context types when loading policy
They are used by the next commit.
2024-11-30 02:14:49 +01:00
Dmitry Muhomor
16e5331962 selinux: add security_sid_to_context_type() function
security_sid_to_context() returns context type in the stringified form.
2024-11-30 02:14:45 +01:00
Secondarian
9c6c01a0bd zram: Set default compressor to zstd 2024-11-30 02:02:54 +01:00
Ksawlii
803bfc3405 defconfig: s5e8825-a53xxx: Readded 2024-11-24 19:52:41 +00:00
Ksawlii
2a8664befc defconfig: a53x*: Regenerated with clang-r475365b (16.0.2) 2024-11-24 19:37:18 +00:00
Ksawlii
d7dc13778c defconfigs: Deleted useless ones 2024-11-24 19:06:27 +00:00
Ksawlii
f9e1f3fa3a Revert "exynos_gpu: Don't allow userspace to control freqs"
This reverts commit fdef7b54c3.
2024-11-24 19:22:36 +01:00
Ksawlii
5aaf20211d ARM64: dts/s5e8825: make GPU lean more towards 702 MHz 2024-11-24 19:21:47 +01:00
Ksawlii
e3091fa704 ARM64: dts/s5e8825: boost memory up to 2093 MHz 2024-11-24 19:20:03 +01:00
Ksawlii
0f4d6c3c29 Revert "gpu/exynos: Make 'gpu_mm_min_clock' readonly too"
This reverts commit 9e6b7e114f.
2024-11-24 19:16:08 +01:00
Ksawlii
f7fa8a5029 FireAsf 3.0 StableAsf Release 2024-11-24 18:39:12 +01:00
Ksawlii
6af9744bf7 security: selinux: Enable Samsung SELinux 2024-11-24 00:43:04 +01:00
Ksawlii
895709a281 drivers: samsung: scsc: Adapt scsc_wlbtd.c for Linux 5.10.229 2024-11-24 00:42:20 +01:00
Ksawlii
72abf1b25d Revert "net: esp: cleanup esp_output_tail_tcp() in case of unsupported ESPINTCP"
This reverts commit 520a2c2f7f.
2024-11-24 00:23:57 +01:00
Ksawlii
e913a37a4d Revert "net/smc: Allow SMC-D 1MB DMB allocations"
This reverts commit 3ab7fb1f47.
2024-11-24 00:23:56 +01:00
Ksawlii
43674763e3 Revert "net/smc: set rmb's SG_MAX_SINGLE_ALLOC limitation only when CONFIG_ARCH_NO_SG_CHAIN is defined"
This reverts commit 3bf0715dbb.
2024-11-24 00:23:56 +01:00
Ksawlii
a5b7b870fc Revert "net: fec: Refactor: #define magic constants"
This reverts commit 64636f4e88.
2024-11-24 00:23:56 +01:00
Ksawlii
e7b1ec68bc Revert "net: fec: Fix FEC_ECR_EN1588 being cleared on link-down"
This reverts commit 132969266d.
2024-11-24 00:23:56 +01:00
Ksawlii
f368b1e13e Revert "netfilter: nf_tables: rise cap on SELinux secmark context"
This reverts commit 1673b96b70.
2024-11-24 00:23:56 +01:00
Ksawlii
bfbdef95a1 Revert "wifi: virt_wifi: avoid reporting connection success with wrong SSID"
This reverts commit 1c786f1067.
2024-11-24 00:23:56 +01:00
Ksawlii
4f9bfbe9f1 Revert "wifi: virt_wifi: don't use strlen() in const context"
This reverts commit 8df54fa66a.
2024-11-24 00:23:56 +01:00
Ksawlii
ddb8f59b0a Revert "netfilter: ctnetlink: use helper function to calculate expect ID"
This reverts commit 42ea0c1913.
2024-11-24 00:23:56 +01:00
Ksawlii
683ecba589 Revert "net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports"
This reverts commit 4324f66a7a.
2024-11-24 00:23:56 +01:00
Ksawlii
2e56e9f4fd Revert "net: dsa: b53: Limit chip-wide jumbo frame config to CPU ports"
This reverts commit 23d58869be.
2024-11-24 00:23:56 +01:00
Ksawlii
d3f5815f54 Revert "wifi: mwifiex: Fix interface type change"
This reverts commit 64663028ab.
2024-11-24 00:23:56 +01:00
Ksawlii
14ccccb888 Revert "ipv4: Fix incorrect source address in Record Route option"
This reverts commit f1363b7ad0.
2024-11-24 00:23:56 +01:00
Ksawlii
fa72cb31d6 Revert "net: bonding: correctly annotate RCU in bond_should_notify_peers()"
This reverts commit 7dc1b04912.
2024-11-24 00:23:56 +01:00
Ksawlii
d48b5ce07c Revert "netfilter: nft_set_pipapo_avx2: disable softinterrupts"
This reverts commit 8014af9c29.
2024-11-24 00:23:56 +01:00
Ksawlii
32d9b82df9 Revert "net: stmmac: Correct byte order of perfect_match"
This reverts commit 4e35d4a08d.
2024-11-24 00:23:55 +01:00
Ksawlii
9e3a5af4fc Revert "net: nexthop: Initialize all fields in dumped nexthops"
This reverts commit ce425a0621.
2024-11-24 00:23:55 +01:00
Ksawlii
9a94739948 Revert "net/iucv: fix use after free in iucv_sock_close()"
This reverts commit 438fa4e57f.
2024-11-24 00:23:55 +01:00
Ksawlii
eb36756b64 Revert "net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys"
This reverts commit babb23917f.
2024-11-24 00:23:55 +01:00
Ksawlii
91e81d11cd Revert "ipv6: fix ndisc_is_useropt() handling for PIO"
This reverts commit 254636f1d3.
2024-11-24 00:23:55 +01:00
Ksawlii
6e343e2374 Revert "netfilter: ipset: Add list flush to cancel_gc"
This reverts commit 92bba407f6.
2024-11-24 00:23:55 +01:00
Ksawlii
9b5b6a7525 Revert "net: usb: qmi_wwan: fix memory leak for not ip packets"
This reverts commit 3789fee8a8.
2024-11-24 00:23:55 +01:00
Ksawlii
403fa37a8b Revert "net: linkwatch: use system_unbound_wq"
This reverts commit 511ce8b5bf.
2024-11-24 00:23:55 +01:00
Ksawlii
97133e2e2e Revert "net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register()"
This reverts commit be9d7e8db2.
2024-11-24 00:23:55 +01:00
Ksawlii
5c2a1132c9 Revert "net: fec: Stop PPS on driver remove"
This reverts commit e328279c90.
2024-11-24 00:23:55 +01:00
Ksawlii
435344388b Revert "wifi: nl80211: don't give key data to userspace"
This reverts commit 54fc577e27.
2024-11-24 00:23:55 +01:00
Ksawlii
17917ff85a Revert "netfilter: nf_tables: set element extended ACK reporting support"
This reverts commit 466cd07e9a.
2024-11-24 00:23:55 +01:00
Ksawlii
73844bf19d Revert "netfilter: nf_tables: use timestamp to check for set element timeout"
This reverts commit 7d64835c13.
2024-11-24 00:23:55 +01:00
Ksawlii
c44e98a853 Revert "netfilter: nf_tables: allow clone callbacks to sleep"
This reverts commit b2a587e7a5.
2024-11-24 00:23:54 +01:00
Ksawlii
ebf3750840 Revert "netfilter: nf_tables: prefer nft_chain_validate"
This reverts commit b362800323.
2024-11-24 00:23:54 +01:00