Antonio Borneo
45382d6907
scripts/gdb: fix 'lx-dmesg' on 32 bits arch
...
[ Upstream commit e3c8d33e0d ]
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: e60768311a ("scripts/gdb: update for lockless printk ringbuffer")
Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com >
[pmladek@suse.com: Query the really used atomic_long_t counter type size]
Tested-by: Antonio Borneo <antonio.borneo@foss.st.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220719122831.19890-1-pmladek@suse.com
Signed-off-by: Sasha Levin <sashal@kernel.org >
2022-08-17 14:23:56 +02:00
..
2022-04-08 14:23:57 +02:00
2021-05-02 00:43:35 +09:00
2021-09-19 10:13:03 +09:00
2021-08-08 22:00:49 +02:00
2022-04-08 14:23:29 +02:00
2021-05-17 12:10:03 +09:00
2022-04-20 09:34:18 +02:00
2022-08-17 14:23:56 +02:00
2021-05-02 00:43:35 +09:00
2022-02-23 12:03:20 +01:00
2017-03-28 16:16:52 +02:00
2022-06-29 09:03:31 +02:00
2021-03-29 23:13:30 -07:00
2020-08-17 20:42:00 -04:00
2021-08-04 17:49:26 -04:00
2021-05-02 00:43:35 +09:00
2021-09-03 08:17:21 +09:00
2021-09-03 08:17:20 +09:00
2019-05-24 17:27:11 +02:00
2018-07-18 01:18:05 +09:00
2021-01-22 06:34:44 +09:00
2019-06-05 17:37:11 +02:00
2021-07-15 22:31:10 +02:00
2018-06-28 13:36:39 +09:00
2021-04-25 05:14:26 +09:00
2021-09-08 11:50:28 -07:00
2020-02-25 03:35:16 -07:00
2021-08-10 09:13:25 +09:00
2017-11-02 11:10:55 +01:00
2021-09-19 10:13:03 +09:00
2022-07-12 16:35:01 +02:00
2020-05-26 00:03:16 +09:00
2021-10-07 17:16:28 -07:00
2021-08-05 20:55:39 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2021-05-18 11:09:59 +02:00
2021-01-04 10:38:11 +09:00
2020-10-16 11:11:21 -07:00
2021-07-08 11:48:22 -07:00
2020-10-13 18:38:26 -07:00
2021-01-01 12:26:39 -08:00
2020-09-04 18:19:37 +02:00
2021-01-22 06:34:44 +09:00
2021-06-04 11:20:52 -06:00
2020-03-17 08:59:03 +09:00
2019-06-05 17:37:07 +02:00
2020-08-18 20:16:46 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-06-05 17:37:10 +02:00
2022-06-22 14:22:02 +02:00
2018-03-26 02:01:24 +09:00
2020-01-27 14:25:06 -07:00
2019-01-06 09:46:51 +09:00
2017-11-02 11:10:55 +01:00
2021-03-08 13:19:05 +01:00
2018-06-25 23:21:13 +09:00
2021-09-03 08:12:39 +09:00
2021-09-03 08:17:21 +09:00
2021-01-14 08:21:09 -08:00
2021-03-31 13:53:16 -06:00
2019-05-24 17:36:45 +02:00
2020-12-04 14:34:27 -07:00
2020-10-16 11:11:19 -07:00
2019-05-30 11:26:39 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-08-07 13:29:39 -07:00
2021-05-17 12:10:03 +09:00
2021-02-05 17:53:28 +09:00
2021-09-03 08:17:19 +09:00
2021-04-25 05:14:41 +09:00
2022-07-12 16:35:03 +02:00
2021-04-25 05:14:26 +09:00
2021-11-18 19:16:16 +01:00
2017-11-02 11:10:55 +01:00
2022-07-23 12:54:10 +02:00
2021-04-26 08:38:10 -07:00
2021-03-15 19:20:48 +09:00
2022-07-23 12:54:10 +02:00
2021-09-19 10:55:18 +09:00
2021-03-15 19:20:48 +09:00
2021-04-25 05:25:56 +09:00
2021-03-15 19:20:48 +09:00
2022-02-16 12:56:39 +01:00
2021-10-06 17:53:29 -06:00
2021-03-15 19:20:48 +09:00
2020-08-10 01:32:59 +09:00
2021-09-24 16:13:35 -07:00
2020-08-10 01:32:59 +09:00
2020-10-22 13:13:57 -07:00
2022-05-15 20:18:50 +02:00
2021-09-03 08:12:39 +09:00
2021-04-25 05:25:06 +09:00
2021-09-19 10:14:19 +09:00
2021-04-25 05:30:45 +09:00
2022-04-13 20:59:27 +02:00
2020-05-17 18:52:01 +09:00
2017-11-02 11:10:55 +01:00
2019-06-05 17:37:10 +02:00
2021-09-13 10:18:28 -07:00
2021-06-17 10:01:12 +09:00
2020-06-06 23:39:20 +09:00
2017-11-02 11:10:55 +01:00
2021-07-19 14:51:40 +02:00
2021-04-25 05:22:42 +09:00
2021-05-02 00:43:35 +09:00
2019-05-30 11:29:23 -07:00
2020-03-26 15:08:27 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2021-03-02 17:27:18 -05:00
2021-06-18 09:09:17 -04:00
2022-01-05 12:42:33 +01:00
2021-05-02 00:43:35 +09:00
2021-07-18 23:48:14 +09:00
2020-12-08 23:30:04 +09:00
2017-02-10 12:43:47 +11:00
2022-07-29 17:25:25 +02:00
2019-12-13 10:47:58 +01:00
2021-07-21 15:59:32 +02:00
2021-07-12 09:56:50 -06:00
2021-06-29 10:53:45 -07:00
2022-01-27 11:05:44 +01:00
2020-12-08 23:30:04 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2021-09-01 21:52:02 +02:00
2021-07-09 04:00:39 +09:00
2021-08-10 09:13:25 +09:00
2021-07-09 04:00:39 +09:00
2021-05-02 00:43:35 +09:00
2021-06-08 13:09:34 +01:00
2018-11-30 14:45:01 -08:00
2021-05-03 17:23:06 -06:00
2021-08-10 09:13:25 +09:00
2020-06-06 23:42:01 +09:00