linux-stable/lib
Peter Collingbourne 96223cd00b stackdepot: rename pool_index to pool_index_plus_1
[ Upstream commit a6c1d9cb9a ]

Commit 3ee34eabac ("lib/stackdepot: fix first entry having a 0-handle")
changed the meaning of the pool_index field to mean "the pool index plus
1".  This made the code accessing this field less self-documenting, as
well as causing debuggers such as drgn to not be able to easily remain
compatible with both old and new kernels, because they typically do that
by testing for presence of the new field.  Because stackdepot is a
debugging tool, we should make sure that it is debugger friendly.
Therefore, give the field a different name to improve readability as well
as enabling debugger backwards compatibility.

This is needed in 6.9, which would otherwise become an odd release with
the new semantics and old name so debuggers wouldn't recognize the new
semantics there.

Fixes: 3ee34eabac ("lib/stackdepot: fix first entry having a 0-handle")
Link: https://lkml.kernel.org/r/20240402001500.53533-1-pcc@google.com
Link: https://linux-review.googlesource.com/id/Ib3e70c36c1d230dd0a118dc22649b33e768b9f88
Signed-off-by: Peter Collingbourne <pcc@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Alexander Potapenko <glider@google.com>
Acked-by: Marco Elver <elver@google.com>
Acked-by: Oscar Salvador <osalvador@suse.de>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Omar Sandoval <osandov@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-10 16:38:14 +02:00
..
842
crypto crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init 2023-12-22 12:30:19 +08:00
dim
fonts powerpc: Use shared font data 2023-10-01 23:09:02 +11:00
kunit kunit: test: Log the correct filter string in executor_test 2024-03-26 18:16:28 -04:00
livepatch
lz4
lzo
math lib/math/int_log: Replace LGPL-2.1-or-later boilerplate with SPDX identifier 2023-07-09 22:47:50 +01:00
pldmfw
raid6 s390/fpu: get rid of MACHINE_HAS_VX 2023-12-11 14:33:07 +01:00
reed_solomon
test_fortify string: Remove strlcpy() 2024-01-19 11:59:11 -08:00
vdso
xz arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
zlib_deflate
zlib_dfltcc
zlib_inflate
zstd zstd: Fix array-index-out-of-bounds UBSAN warning 2023-11-14 17:12:52 -08:00
.gitignore
Kconfig lib/stackdepot: use fixed-sized slots for stack records 2023-12-10 16:51:44 -08:00
Kconfig.debug lib/Kconfig.debug: TEST_IOV_ITER depends on MMU 2024-02-20 14:20:48 -08:00
Kconfig.kasan Many singleton patches against the MM code. The patch series which 2024-01-09 11:18:47 -08:00
Kconfig.kcsan
Kconfig.kfence mm/slab: remove CONFIG_SLAB from all Kconfig and Makefile 2023-12-05 11:14:40 +01:00
Kconfig.kgdb
Kconfig.kmsan mm/slab: remove CONFIG_SLAB from all Kconfig and Makefile 2023-12-05 11:14:40 +01:00
Kconfig.ubsan ubsan: Clarify Kconfig text for CONFIG_UBSAN_TRAP 2023-07-17 16:05:19 -07:00
Makefile cxl for v6.7 2023-11-04 16:20:36 -10:00
argv_split.c argv_split: fix kernel-doc warnings 2023-09-19 13:21:33 -07:00
ashldi3.c
ashrdi3.c
asn1_decoder.c
asn1_encoder.c
assoc_array.c
atomic64.c
atomic64_test.c
audit.c
base64.c
bcd.c
bch.c lib/bch.c: use bitrev instead of internal logic 2023-08-18 10:18:58 -07:00
bitfield_kunit.c
bitmap-str.c lib/bitmap: split-out string-related operations to a separate files 2023-10-14 20:25:22 -07:00
bitmap.c bitmap: move bitmap_*_region() functions to bitmap.h 2023-10-16 16:14:45 -07:00
bitrev.c
bootconfig-data.S
bootconfig.c
bsearch.c
btree.c
bucket_locks.c
bug.c
build_OID_registry
buildid.c
bust_spinlocks.c
check_signature.c
checksum.c
checksum_kunit.c kunit: Fix again checksum tests on big endian CPUs 2024-02-29 09:16:02 -08:00
closure.c closures: CLOSURE_CALLBACK() to fix type punning 2023-11-24 00:29:58 -05:00
clz_ctz.c lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels 2023-08-25 13:22:10 -07:00
clz_tab.c
cmdline.c
cmdline_kunit.c lib/cmdline: Fix an invalid format specifier in an assertion msg 2024-03-26 18:16:28 -04:00
cmpdi2.c
compat_audit.c
cpu_rmap.c
cpumask.c bitmap patches for v6.7 2023-11-03 07:08:36 -10:00
cpumask_kunit.c
crc-ccitt.c lib: crc_ccitt_false() is identical to crc_itu_t() 2023-12-29 12:22:26 -08:00
crc-itu-t.c
crc-t10dif.c
crc4.c
crc7.c
crc8.c
crc16.c
crc32.c
crc32defs.h
crc32test.c
crc64-rocksoft.c
crc64.c
ctype.c
debug_info.c
debug_locks.c
debugobjects.c debugobjects: Stop accessing objects after releasing hash bucket lock 2023-11-22 10:41:46 +01:00
dec_and_lock.c
decompress.c
decompress_bunzip2.c
decompress_inflate.c
decompress_unlz4.c
decompress_unlzma.c
decompress_unlzo.c
decompress_unxz.c arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
decompress_unzstd.c
devmem_is_allowed.c
devres.c
dhry.h
dhry_1.c lib: dhry: fix sleeping allocations inside non-preemptable section 2023-07-08 09:29:32 -07:00
dhry_2.c
dhry_run.c
digsig.c
dump_stack.c
dynamic_debug.c dyndbg: add source filename to prefix 2023-08-04 15:28:41 +02:00
dynamic_queue_limits.c
earlycpio.c
errname.c parisc: Drop the HP-UX ENOSYM and EREMOTERELEASE error codes 2023-11-25 09:43:18 +01:00
error-inject.c lib: error-inject: remove error checking for debugfs_create_dir() 2023-08-18 10:18:55 -07:00
errseq.c
extable.c
fault-inject-usercopy.c
fault-inject.c
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
find_bit_benchmark.c
flex_proportions.c
fortify_kunit.c fortify: test: Use kunit_device 2023-12-18 13:28:08 -07:00
fw_table.c cxl for v6.8 2024-01-18 16:22:43 -08:00
gen_crc32table.c
gen_crc64table.c
genalloc.c Devicetree include cleanups for v6.6: 2023-08-30 17:04:28 -07:00
generic-radix-tree.c lib/generic-radix-tree.c: Add peek_prev() 2023-10-19 14:47:33 -04:00
glob.c
globtest.c
group_cpus.c lib/group_cpus.c: avoid acquiring cpu hotplug lock in group_cpus_evenly 2023-12-06 16:12:46 -08:00
hashtable_test.c
hexdump.c
hweight.c
idr.c ida: Fix crash in ida_free when the bitmap is empty 2023-12-21 10:02:28 -08:00
inflate.c
interval_tree.c
interval_tree_test.c
iomap.c
iomap_copy.c
iommu-helper.c
iov_iter.c iov_iter: get rid of 'copy_mc' flag 2024-03-06 10:52:12 +01:00
irq_poll.c
irq_regs.c
is_signed_type_kunit.c
is_single_threaded.c
kasprintf.c
kfifo.c
klist.c
kobject.c Revert "kobject: Remove redundant checks for whether ktype is NULL" 2024-02-08 16:39:25 +00:00
kobject_uevent.c kobject: Replace strlcpy with strscpy 2023-09-22 09:50:56 -07:00
kstrtox.c kstrtox: consistently use _tolower() 2023-08-21 13:46:25 -07:00
kstrtox.h
kunit_iov_iter.c iov_iter: Kunit tests for page extraction 2023-09-09 15:11:49 -07:00
libcrc32c.c
linear_ranges.c
list-test.c
list_debug.c list: Introduce CONFIG_LIST_HARDENED 2023-08-15 14:57:25 -07:00
list_sort.c
llist.c llist: add llist_del_first_this() 2023-10-16 12:44:06 -04:00
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: Use SBRM APIs for wait context tests 2023-07-26 12:29:13 +02:00
lockref.c
logic_iomem.c
logic_pio.c minmax: add in_range() macro 2023-08-24 16:20:18 -07:00
lru_cache.c
lshrdi3.c
lwq.c lib: add light-weight queuing mechanism. 2023-10-16 12:44:06 -04:00
maple_tree.c maple_tree: avoid checking other gaps after getting the largest gap 2023-12-20 14:48:14 -08:00
memcat_p.c
memcpy_kunit.c lib: memcpy_kunit: Fix an invalid format specifier in an assertion msg 2024-03-26 18:16:28 -04:00
memory-notifier-error-inject.c
memregion.c
memweight.c
muldi3.c
net_utils.c
netdev-notifier-error-inject.c
nlattr.c netlink: add nla be16/32 types to minlen array 2024-02-22 19:01:55 -08:00
nmi_backtrace.c nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
notifier-error-inject.c lib: remove error checking for debugfs_create_dir() 2023-08-18 10:18:55 -07:00
notifier-error-inject.h
objagg.c
objpool.c lib: objpool: fix head overrun on RK3588 SBC 2023-12-01 14:53:55 +09:00
of-reconfig-notifier-error-inject.c
oid_registry.c
once.c
overflow_kunit.c overflow: Replace fake root_device with kunit_device 2023-12-18 13:28:08 -07:00
packing.c
parman.c
parser.c
pci_iomap.c pci_iounmap(): Fix MMIO mapping leak 2024-04-03 15:32:02 +02:00
percpu-refcount.c
percpu_counter.c percpu_counter: extend _limited_add() to negative amounts 2023-10-18 14:34:14 -07:00
percpu_test.c
plist.c
pm-notifier-error-inject.c
polynomial.c
radix-tree.c radix tree: remove unused variable 2023-08-21 13:07:22 -07:00
radix-tree.h
random32.c
ratelimit.c
rbtree.c
rbtree_test.c
rcuref.c locking/atomics: Use atomic_try_cmpxchg_release() to micro-optimize rcuref_put_slowpath() 2023-10-10 10:14:27 +02:00
ref_tracker.c
refcount.c
rhashtable.c
sbitmap.c sbitmap: remove stale comment in sbq_calc_wake_batch 2024-01-15 07:23:50 -07:00
scatterlist.c scatterlist: add missing function params to kernel-doc 2023-09-19 13:21:33 -07:00
seq_buf.c seq_buf: Fix kernel documentation 2024-02-15 12:17:28 -05:00
sg_pool.c
sg_split.c
siphash.c
siphash_kunit.c
slub_kunit.c
smp_processor_id.c
sort.c
stackdepot.c stackdepot: rename pool_index to pool_index_plus_1 2024-04-10 16:38:14 +02:00
stackinit_kunit.c
stmp_device.c
strcat_kunit.c
string.c string: Remove strlcpy() 2024-01-19 11:59:11 -08:00
string_helpers.c lib/string_helpers: string_get_size() now returns characters wrote 2023-09-11 23:59:47 -04:00
strncpy_from_user.c
strnlen_user.c
strscpy_kunit.c
syscall.c
test-kstrtox.c
test-string_helpers.c
test_bitmap.c bitmap: add test for bitmap_*_region() functions 2023-10-14 20:25:22 -07:00
test_bitops.c
test_bits.c
test_blackhole_dev.c net: blackhole_dev: fix build warning for ethh set but not used 2024-03-26 18:16:38 -04:00
test_bpf.c test_bpf: Rename second ALU64_SMOD_X to ALU64_SMOD_K 2023-12-09 21:27:54 -08:00
test_debug_virtual.c
test_dynamic_debug.c
test_firmware.c firmware_loader: Expand Firmware upload error codes with firmware invalid error 2023-11-24 18:09:19 -08:00
test_fprobe.c
test_fpu.c
test_free_pages.c
test_hash.c
test_hexdump.c
test_hmm.c lib: replace kmap() with kmap_local_page() 2023-08-18 10:18:50 -07:00
test_hmm_uapi.h
test_ida.c Quite a lot of kexec work this time around. Many singleton patches in 2024-01-09 11:46:20 -08:00
test_kmod.c
test_kprobes.c
test_linear_ranges.c
test_list_sort.c
test_lockup.c
test_maple_tree.c maple_tree: don't find node end in mtree_lookup_walk() 2023-12-12 10:56:59 -08:00
test_memcat_p.c
test_meminit.c mm, treewide: introduce NR_PAGE_ORDERS 2024-01-08 15:27:15 -08:00
test_min_heap.c
test_module.c
test_objagg.c
test_objpool.c lib: test_objpool: make global variables static 2023-11-10 19:59:04 +09:00
test_parman.c
test_printf.c lib/vsprintf: declare no_hash_pointers in sprintf.h 2023-08-21 13:46:24 -07:00
test_ref_tracker.c
test_rhashtable.c Kill sched.h dependency on rcupdate.h 2023-12-27 11:50:20 -05:00
test_scanf.c lib: test_scanf: Add explicit type cast to result initialization in test_number_prefix() 2023-08-16 11:47:29 +02:00
test_sort.c
test_static_key_base.c
test_static_keys.c
test_string.c
test_sysctl.c sysctl: Remove the now superfluous sentinel elements from ctl_table array 2023-12-28 04:57:57 -08:00
test_ubsan.c
test_user_copy.c
test_uuid.c
test_vmalloc.c
test_xarray.c
textsearch.c
timerqueue.c
trace_readwrite.c lib/trace_readwrite.c:: replace asm-generic/io with linux/io 2023-12-29 12:22:29 -08:00
ts_bm.c lib/ts_bm: add helper to reduce indentation and improve readability 2023-07-27 13:45:51 +02:00
ts_fsm.c
ts_kmp.c
ubsan.c UBSAN: use the kernel panic message markers 2023-12-20 14:48:14 -08:00
ubsan.h
ucmpdi2.c
ucs2_string.c lib/ucs2_string: Add UCS-2 strscpy function 2023-09-13 10:18:42 -07:00
usercopy.c
uuid.c
vsprintf.c lib/vsprintf: Fix %pfwf when current node refcount == 0 2023-12-06 11:06:59 +01:00
win_minmax.c
xarray.c xarray: Document necessary flag in alloc functions 2023-09-05 19:01:38 -04:00
xxhash.c