mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-07 07:52:54 +00:00
The type atomic_long_t can have size 4 or 8 bytes, depending on
CONFIG_64BIT; it's only content, the field 'counter', is either an
int or a s64 value.
Current code incorrectly uses the fixed size utils.read_u64() to
read the field 'counter' inside atomic_long_t.
On 32 bits architectures reading the last element 'tail_id' of the
struct prb_desc_ring:
struct prb_desc_ring {
...
atomic_long_t tail_id;
};
causes the utils.read_u64() to access outside the boundary of the
struct and the gdb command 'lx-dmesg' exits with error:
Python Exception <class 'IndexError'>: index out of range
Error occurred in Python: index out of range
Query the really used atomic_long_t counter type size.
Link: https://lore.kernel.org/r/20220617143758.137307-1-antonio.borneo@foss.st.com
Fixes:
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| .gitignore | ||
| clk.py | ||
| config.py | ||
| constants.py.in | ||
| cpus.py | ||
| device.py | ||
| dmesg.py | ||
| genpd.py | ||
| lists.py | ||
| Makefile | ||
| modules.py | ||
| proc.py | ||
| rbtree.py | ||
| symbols.py | ||
| tasks.py | ||
| timerlist.py | ||
| utils.py | ||