Centos-kernel-stream-9/lib
Jan Stancek 167befc6c4 Merge: kernel: x86/mm: Randomize per-cpu entry area [rhel-9]
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2800

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165933
CVE: CVE-2023-0597

This backport addresses a security concern that the per-cpu entry points aren’t randomized. It adds a simple randomization scheme that avoids duplicates to spread the existing CPUs over the available space.

The below commits are included:
        - a3f547addcaa10df5a226526bc9e2d9a94542344
	- 97e3d26b5e5f371b3ee223d94dd123e6c442ba80
	- 3f148f3318140035e87decc1214795ff0755757b

Signed-off-by: Julia Denham <jdenham@redhat.com>

Approved-by: Dean Nelson <dnelson@redhat.com>
Approved-by: Rafael Aquini <aquini@redhat.com>
Approved-by: Donald Dutile <ddutile@redhat.com>

Signed-off-by: Jan Stancek <jstancek@redhat.com>
2023-08-16 09:41:27 +02:00
..
842
crypto lib/crypto: add prompts back to crypto libraries 2022-04-27 10:48:58 -04:00
dim
fonts lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
kunit kunit: Introduce KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ macros 2023-06-19 13:48:41 +03:00
livepatch selftests/livepatch: better synchronize test_klp_callbacks_busy 2022-12-05 12:28:16 -05:00
lz4 lz4_decompress: declare LZ4_decompress_safe_withPrefix64k static 2021-07-01 11:06:05 -07:00
lzo
math math: make RATIONAL tristate 2023-04-17 11:20:39 -06:00
mpi lib/mpi: fix spelling mistakes 2021-07-01 11:06:05 -07:00
pldmfw lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
raid6 lib/raid6: drop RAID6_USE_EMPTY_ZERO_PAGE 2022-11-16 14:21:36 -05:00
reed_solomon lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
test_fortify fortify: Detect struct member overflows in memset() at compile-time 2022-12-10 23:01:43 +01:00
vdso
xz lib/decompressors: fix spelling mistakes 2021-07-01 11:06:05 -07:00
zlib_deflate
zlib_dfltcc
zlib_inflate lib/decompressors: fix spelling mistakes 2021-07-01 11:06:05 -07:00
zstd lib: zstd: Don't add -O3 to cflags 2021-12-22 05:19:35 -05:00
.gitignore fortify: Add compile-time FORTIFY_SOURCE tests 2022-12-10 22:59:40 +01:00
Kconfig lib: Add register read/write tracing support 2023-05-08 12:17:14 -04:00
Kconfig.debug Merge: cgroup: Update cgroup code base to v6.2 2023-07-21 17:32:17 +02:00
Kconfig.kasan kasan: allow enabling KASAN_VMALLOC and SW/HW_TAGS 2022-10-12 07:28:00 -04:00
Kconfig.kcsan
Kconfig.kfence kfence: allow use of a deferrable timer 2022-10-12 07:27:55 -04:00
Kconfig.kgdb
Kconfig.ubsan objtool: Fix obsolete reference to CONFIG_X86_SMAP 2022-10-27 15:26:51 -04:00
Makefile lib: Add register read/write tracing support 2023-05-08 12:17:14 -04:00
argv_split.c
ashldi3.c
ashrdi3.c
asn1_decoder.c
asn1_encoder.c lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
assoc_array.c assoc_array: Fix BUG_ON during garbage collect 2022-08-10 13:49:37 -04:00
atomic64.c locking/atomic: atomic64: support ARCH_ATOMIC 2021-05-26 13:20:50 +02:00
atomic64_test.c
audit.c audit: add support for the openat2 syscall 2022-03-25 20:02:50 -04:00
base64.c lib/base64: RFC4648-compliant base64 encoding 2022-10-12 13:40:21 +05:30
bcd.c
bch.c lib/bch.c: fix a typo in the file bch.c 2021-05-06 19:24:12 -07:00
bitfield_kunit.c
bitmap.c lib/bitmap: remove bitmap_ord_to_pos 2023-03-30 10:24:34 -04:00
bitrev.c
bootconfig.c memblock: use memblock_free for freeing virtual pointers 2022-07-01 17:07:00 -06:00
bsearch.c
btree.c
bucket_locks.c
bug.c cpuidle: lib/bug: Disable rcu_is_watching() during WARN/BUG 2023-03-30 08:48:17 -04:00
build_OID_registry
buildid.c ELF: fix all "Elf" typos 2023-06-21 16:22:19 +02:00
bust_spinlocks.c
check_signature.c
checksum.c
clz_ctz.c
clz_tab.c
cmdline.c lib/cmdline: Export next_arg() for being used in modules 2021-05-05 16:07:40 +02:00
cmdline_kunit.c lib/cmdline_kunit: Remove a cast which are no-longer required 2021-06-23 16:41:41 -06:00
cmpdi2.c
compat_audit.c audit: add support for the openat2 syscall 2022-03-25 20:02:50 -04:00
cpu_rmap.c
cpumask.c cpumask: Fix invalid uniprocessor mask assumption 2023-04-17 11:59:20 -06:00
cpumask_kunit.c lib/cpumask_kunit: log mask contents 2023-04-17 11:59:21 -06:00
crc-ccitt.c
crc-itu-t.c
crc-t10dif.c
crc4.c
crc7.c
crc8.c lib: crc8: pointer to data block should be const 2021-05-06 19:24:12 -07:00
crc16.c
crc32.c
crc32defs.h
crc32test.c
crc64-rocksoft.c crypto: add rocksoft 64b crc guard tag framework 2022-06-22 08:57:57 +08:00
crc64.c lib: add rocksoft model crc64 2022-06-22 08:57:56 +08:00
ctype.c
debug_info.c isystem: ship and use stdarg.h 2022-04-19 15:52:25 +02:00
debug_locks.c locking/lockdep: Improve noinstr vs errors 2021-06-22 13:56:43 +02:00
debugobjects.c debugobjects: Make them PREEMPT_RT aware 2021-11-12 14:23:26 -05:00
dec_and_lock.c perf: Fix perf_event_pmu_context serialization 2023-06-01 17:02:34 +02:00
decompress.c
decompress_bunzip2.c lib/decompressors: fix spelling mistakes 2021-07-01 11:06:05 -07:00
decompress_inflate.c
decompress_unlz4.c lib/decompress_unlz4.c: correctly handle zero-padding around initrds. 2021-07-01 11:06:06 -07:00
decompress_unlzma.c lib: fix inconsistent indenting in process_bit1() 2021-05-06 19:24:12 -07:00
decompress_unlzo.c lib/decompressors: remove set but not used variabled 'level' 2021-07-01 11:06:06 -07:00
decompress_unxz.c lib/decompressors: fix spelling mistakes 2021-07-01 11:06:05 -07:00
decompress_unzstd.c lib: zstd: Add decompress_sources.h for decompress_unzstd 2021-12-22 05:19:34 -05:00
devmem_is_allowed.c lib: use PFN_PHYS() in devmem_is_allowed() 2021-08-13 14:09:32 -10:00
devres.c lib: devres: Add managed arch_io_reserve_memtype_wc() 2022-04-19 15:53:00 +02:00
digsig.c
dump_stack.c printk: rename cpulock functions 2022-09-15 08:47:33 -04:00
dynamic_debug.c lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
dynamic_queue_limits.c
earlycpio.c
errname.c
error-inject.c kprobes: treewide: Replace arch_deref_entry_point() with dereference_symbol_descriptor() 2022-04-06 21:50:14 -04:00
errseq.c
extable.c
fault-inject-usercopy.c
fault-inject.c mm: fix unexpected changes to {failslab|fail_page_alloc}.attr 2023-03-24 11:19:33 -04:00
fdt.c
fdt_addresses.c
fdt_empty_tree.c
fdt_ro.c
fdt_rw.c
fdt_strerror.c
fdt_sw.c
fdt_wip.c
find_bit.c lib/find_bit: Introduce find_next_andnot_bit() 2023-04-18 09:35:03 -04:00
find_bit_benchmark.c lib/bitmap: add tests for find_nth_bit() 2023-03-30 10:24:33 -04:00
flex_proportions.c flex_proportions: Allow N events instead of 1 2022-04-07 09:58:30 -04:00
gen_crc32table.c
gen_crc64table.c lib: add rocksoft model crc64 2022-06-22 08:57:56 +08:00
genalloc.c all: replace find_next{,_zero}_bit with find_first{,_zero}_bit where appropriate 2022-05-11 15:07:36 -04:00
generic-radix-tree.c
glob.c
globtest.c
group_cpus.c lib/group_cpus: Export group_cpus_evenly() 2023-07-22 12:16:42 +02:00
hexdump.c
hweight.c
idr.c
inflate.c
interval_tree.c interval-tree: Add a utility to iterate over spans in an interval tree 2023-03-09 16:36:08 -07:00
interval_tree_test.c
iomap.c
iomap_copy.c
iommu-helper.c
iov_iter.c first_iovec_segment(): just return address 2023-03-24 11:19:22 -04:00
irq_poll.c lib/irq_poll: Prevent softirq pending leak in irq_poll_cpu_dead() 2022-12-02 07:39:44 -05:00
irq_regs.c
is_single_threaded.c
kasprintf.c isystem: ship and use stdarg.h 2022-04-19 15:52:25 +02:00
kfifo.c lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
klist.c
kobject.c driver core: make kobj_type constant. 2022-06-14 16:04:15 -05:00
kobject_uevent.c kobject: remove kset from struct kset_uevent_ops callbacks 2022-06-14 16:04:15 -05:00
kstrtox.c lib/kstrtox.c: add "false"/"true" support to kstrtobool() 2023-04-26 08:55:52 -04:00
kstrtox.h lib: vsprintf: Fix handling of number field widths in vsscanf 2021-05-19 15:05:11 +02:00
libcrc32c.c
linear_ranges.c
list-test.c list: test: Test the hlist structure 2023-04-17 11:47:35 -06:00
list_debug.c
list_sort.c lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
llist.c
locking-selftest-hardirq.h
locking-selftest-mutex.h
locking-selftest-rlock-hardirq.h
locking-selftest-rlock-softirq.h
locking-selftest-rlock.h
locking-selftest-rsem.h
locking-selftest-rtmutex.h
locking-selftest-softirq.h
locking-selftest-spin-hardirq.h
locking-selftest-spin-softirq.h
locking-selftest-spin.h
locking-selftest-wlock-hardirq.h
locking-selftest-wlock-softirq.h
locking-selftest-wlock.h
locking-selftest-wsem.h
locking-selftest.c lockdep/selftests: Adapt ww-tests for PREEMPT_RT 2022-05-12 08:34:02 -04:00
lockref.c
logic_iomem.c lib: add iomem emulation (logic_iomem) 2021-06-17 21:44:51 +02:00
logic_pio.c
lru_cache.c lru_cache: remove unused lc_private, lc_set, lc_index_of 2023-03-11 23:27:31 +08:00
lshrdi3.c
maple_tree.c maple_tree: reduce stack usage with gcc-9 and earlier 2023-03-07 01:40:57 -07:00
memcat_p.c
memcpy_kunit.c kunit/memcpy: Avoid pathological compile-time string size 2022-12-11 02:15:17 +01:00
memory-notifier-error-inject.c
memregion.c
memweight.c
muldi3.c
net_utils.c
netdev-notifier-error-inject.c
nlattr.c lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
nmi_backtrace.c printk: rename cpulock functions 2022-09-15 08:47:33 -04:00
notifier-error-inject.c
notifier-error-inject.h
objagg.c
of-reconfig-notifier-error-inject.c
oid_registry.c lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
once.c once: rename _SLOW to _SLEEPABLE 2022-11-02 09:25:07 +01:00
overflow_kunit.c lib: overflow: Do not define 64-bit tests on 32-bit 2023-04-17 11:47:36 -06:00
packing.c net: update NXP copyright text 2022-10-17 14:49:09 -04:00
parman.c
parser.c lib: parser: update documentation for match_NUMBER functions 2023-03-11 23:27:35 +08:00
pci_iomap.c
percpu-refcount.c percpu_ref_init(): clean ->percpu_count_ref on failure 2022-11-15 11:34:09 +08:00
percpu_counter.c lib/percpu_counter: tame kernel-doc compile warning 2021-05-06 19:24:12 -07:00
percpu_test.c
plist.c
pm-notifier-error-inject.c
radix-tree.c
random32.c x86/mm: Randomize per-cpu entry area 2023-07-31 13:14:51 -04:00
ratelimit.c ratelimit: Fix data-races in ___ratelimit(). 2023-01-17 12:25:15 +01:00
rbtree.c
rbtree_test.c
ref_tracker.c ref_tracker: remove filter_irq_stacks() call 2022-10-12 07:27:44 -04:00
refcount.c lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
rhashtable.c lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
sbitmap.c sbitmap: correct wake_batch recalculation to avoid potential IO hung 2023-03-11 23:27:39 +08:00
scatterlist.c mm/scatterlist: replace the !preemptible warning in sg_miter_stop() 2023-02-27 13:46:06 +01:00
seq_buf.c lib: fix spelling mistakes 2021-07-08 11:48:20 -07:00
sg_pool.c lib/sg_pool: change module_init(sg_pool_init) to subsys_initcall 2023-05-03 06:22:55 -07:00
sg_split.c
sha1.c
show_mem.c
siphash.c siphash: use one source of truth for siphash permutations 2023-03-22 15:13:57 -04:00
slub_kunit.c mm/slub, kunit: Make slub_kunit unaffected by user specified flags 2023-03-24 11:18:50 -04:00
smp_processor_id.c lib/smp_processor_id: Use is_percpu_thread() instead of nr_cpus_allowed 2021-05-19 10:51:40 +02:00
sort.c lib/sort: Add priv pointer to swap function 2022-10-25 14:58:04 +02:00
stackdepot.c lib/stackdepot: allow requesting early initialization dynamically 2022-10-12 07:28:04 -04:00
stackinit_kunit.c lib: stackinit: Convert to KUnit 2023-04-17 11:47:34 -06:00
stmp_device.c
string.c lib/string: Move helper functions out of string.c 2022-12-10 22:49:20 +01:00
string_helpers.c lib/string_helpers: Introduce parse_int_array_user() 2023-06-13 16:27:29 +02:00
strncpy_from_user.c lib/strn*,objtool: Enforce user_access_begin() rules 2022-10-27 15:26:49 -04:00
strnlen_user.c lib/strn*,objtool: Enforce user_access_begin() rules 2022-10-27 15:26:49 -04:00
syscall.c sched: Change task_struct::state 2021-06-18 11:43:09 +02:00
test-kstrtox.c
test-string_helpers.c lib/test-string_helpers: add test cases for new features 2021-07-01 11:06:05 -07:00
test_bitmap.c lib/bitmap: add tests for find_nth_bit() 2023-03-30 10:24:33 -04:00
test_bitops.c lib/test: fix spelling mistakes 2021-07-08 11:48:20 -07:00
test_bits.c
test_blackhole_dev.c
test_bpf.c test_bpf: fix incorrect netdev features 2023-01-05 15:46:50 +01:00
test_debug_virtual.c
test_firmware.c firmware: replace HOTPLUG with UEVENT in FW_ACTION defines 2021-05-13 16:14:45 +02:00
test_fprobe.c fprobe: Add a selftest for fprobe 2022-10-25 14:58:04 +02:00
test_fpu.c
test_free_pages.c
test_hash.c test_hash.c: refactor into kunit 2023-04-17 11:20:42 -06:00
test_hexdump.c
test_hmm.c hmm-tests: add test for migrate_device_range() 2023-05-02 16:47:26 -04:00
test_hmm_uapi.h hmm-tests: add test for migrate_device_range() 2023-05-02 16:47:26 -04:00
test_ida.c
test_kasan.c kasan: test: Silence GCC 12 warnings 2023-04-17 11:47:38 -06:00
test_kasan_module.c kasan: test: bypass __alloc_size checks 2022-02-02 18:47:40 -05:00
test_kmod.c lib/test: fix spelling mistakes 2021-07-08 11:48:20 -07:00
test_linear_ranges.c
test_list_sort.c lib/test: convert lib/test_list_sort.c to use KUnit 2021-06-25 11:31:03 -06:00
test_lockup.c lib/test_lockup: Adapt to changed variables 2021-09-27 16:19:15 -04:00
test_maple_tree.c test_maple_tree: test modifications while iterating 2023-03-07 01:40:57 -07:00
test_memcat_p.c
test_meminit.c
test_min_heap.c
test_module.c
test_objagg.c
test_parman.c
test_printf.c vsprintf: Make %pGp print the hex value 2022-04-08 21:09:33 -04:00
test_ref_tracker.c lib: add tests for reference tracker 2022-06-13 18:36:39 +02:00
test_rhashtable.c
test_scanf.c lib/test_scanf: Handle n_bits == 0 in random tests 2023-02-02 11:31:11 -05:00
test_siphash.c
test_sort.c lib/test: convert test_sort.c to use KUnit 2023-04-17 11:20:40 -06:00
test_static_key_base.c
test_static_keys.c
test_string.c lib/test_string.c: allow module removal 2021-07-01 11:06:05 -07:00
test_strscpy.c
test_sysctl.c
test_ubsan.c
test_user_copy.c
test_uuid.c
test_vmalloc.c lib/test_vmalloc.c: use swap() to make code cleaner 2022-03-27 00:48:17 -04:00
test_xarray.c XArray: Fix xas_create_range() when multi-order entry present 2022-07-10 10:44:21 -04:00
textsearch.c
timerqueue.c
trace_readwrite.c asm-generic/io: Add _RET_IP_ to MMIO trace for more accurate debug info 2023-05-08 12:17:14 -04:00
ts_bm.c
ts_fsm.c
ts_kmp.c
ubsan.c kunit: ubsan integration 2023-04-17 11:20:39 -06:00
ubsan.h
ucmpdi2.c
ucs2_string.c
usercopy.c
uuid.c
vsprintf.c Merge: drivers/char/random.c: Update for kernel-rt 2022-05-18 10:58:45 +02:00
win_minmax.c
xarray.c mm/huge_memory: Fix xarray node memory leak 2022-07-10 10:44:22 -04:00
xxhash.c