Thinking About Paying Someone to Do Your Dissertation? Read This First
by Richard Earl
There were nights I stayed up at the kitchen table, my laptop open, surrounded by stacks of books, while my parents quietly left snacks for me and whispered words of encouragement. I felt their sacrifices weighing on my shoulders, and the thought of falling behind made me anxious. At one point, I searched “Pay for Dissertation” in desperation, but I knew I didn’t want to compromise my integrity. Turning to Dissertation Help Services instead gave me guidance and feedback, helping me structure my research and write confidently. Knowing my family’s support and my own effort mattered kept me going.
please visit: https://dissertationhelpservices.uk/write-my-dissertation-uk/
1 day, 6 hours
[PATCH RFC] sys: Display livepatch transition status in KERNEL line
by Motomasa Suzuki
This commit enhances the 'sys' command to show if a kernel livepatch is
currently in a transition phase, directly within the KERNEL output line.
Currently, diagnosing system state during or immediately after livepatch
operations can be ambiguous. While 'livepatch' is indicated by
'[LIVEPATCH]', there's no direct indicator within 'crash' itself to show
if a livepatch is actively applying, reverting, or in some other
transient state. This lack of immediate visibility can complicate crash
analysis, as the system might be in an inconsistent state due to an
ongoing patch application/reversion.
This change introduces a new '[TRANSITION]' flag which appears next to
'[LIVEPATCH]' and '[TAINTED]' in the 'sys' command output. This flag is
set if the livepatch subsystem indicates an in-progress transition
(e.g., as exposed via '/sys/kernel/livepatch/<patch_name>/transition').
Example 'sys' output with this change:
KERNEL: /usr/lib/debug/lib/modules/<version_name>/vmlinux [LIVEPATCH]
[TRANSITION] [TAINTED]
This enhancement provides critical, at-a-glance information for
developers and administrators, allowing them to quickly ascertain if
ongoing livepatch activity might be influencing a system's behavior
during crash investigations. It directly leverages existing kernel
livepatch status infrastructure to enrich the crash utility's diagnostic
capabilities.
Signed-off-by: Motomasa Suzuki <suzuki.motomasa(a)fujitsu.com>
---
defs.h | 1 +
kernel.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++---
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/defs.h b/defs.h
index ab4aee8..b459d4d 100644
--- a/defs.h
+++ b/defs.h
@@ -2280,6 +2280,7 @@ struct offset_table { /* stash of commonly-used offsets */
long bpf_ringbuf_map_rb;
long bpf_ringbuf_consumer_pos;
long bpf_ringbuf_nr_pages;
+ long klp_patch_list;
};
struct size_table { /* stash of commonly-used sizes */
diff --git a/kernel.c b/kernel.c
index 13f3374..1ca18e4 100644
--- a/kernel.c
+++ b/kernel.c
@@ -461,7 +461,10 @@ kernel_init()
error(WARNING,
"list_head.next offset: %ld: list command may fail\n",
OFFSET(list_head_next));
-
+ if (STRUCT_EXISTS("klp_patch")) {
+ if (MEMBER_EXISTS("klp_patch", "list"))
+ MEMBER_OFFSET_INIT(klp_patch_list, "klp_patch", "list");
+ }
MEMBER_OFFSET_INIT(hlist_node_next, "hlist_node", "next");
MEMBER_OFFSET_INIT(hlist_node_pprev, "hlist_node", "pprev");
STRUCT_SIZE_INIT(hlist_head, "hlist_head");
@@ -5681,6 +5684,48 @@ is_livepatch(void)
return FALSE;
}
+#define KLP_PATCH_ITER_LIMIT 1024
+
+static int
+is_livepatch_transition(void)
+{
+ struct kernel_list_head head;
+ struct kernel_list_head node;
+ ulong transition_patch;
+ ulong list_addr;
+ ulong current;
+ ulong patch_addr;
+ int loops;
+
+ if (!try_get_symbol_data("klp_transition_patch", sizeof(ulong),
+ &transition_patch) || !transition_patch)
+ return FALSE;
+
+ if (!kernel_symbol_exists("klp_patches") || !VALID_MEMBER(klp_patch_list))
+ return FALSE;
+
+ list_addr = symbol_value("klp_patches");
+ if (!readmem(list_addr, KVADDR, &head, sizeof(head), "klp_patches",
+ RETURN_ON_ERROR | QUIET))
+ return FALSE;
+
+ for (current = (ulong)head.next, loops = 0;
+ current && current != list_addr && loops < KLP_PATCH_ITER_LIMIT;
+ current = (ulong)node.next, loops++) {
+
+ if (!readmem(list_addr, KVADDR, &head, sizeof(head),
+ "klp_patch list entry", RETURN_ON_ERROR | QUIET))
+ return FALSE;
+
+ patch_addr = current - (ulong)OFFSET(klp_patch_list);
+
+ if (patch_addr == transition_patch)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
/*
* Display system stats at init-time or for the sys command.
*/
@@ -5724,17 +5769,19 @@ display_sys_stats(void)
}
} else {
if (pc->system_map) {
- fprintf(fp, " SYSTEM MAP: %s%s%s\n", pc->system_map,
+ fprintf(fp, " SYSTEM MAP: %s%s%s%s\n", pc->system_map,
is_livepatch() ? " [LIVEPATCH]" : "",
+ is_livepatch_transition() ? " [TRANSITION]" : "",
is_kernel_tainted() ? " [TAINTED]" : "");
fprintf(fp, "DEBUG KERNEL: %s %s\n",
pc->namelist_orig ?
pc->namelist_orig : pc->namelist,
debug_kernel_version(pc->namelist));
} else
- fprintf(fp, " KERNEL: %s%s%s\n", pc->namelist_orig ?
+ fprintf(fp, " KERNEL: %s%s%s%s\n", pc->namelist_orig ?
pc->namelist_orig : pc->namelist,
is_livepatch() ? " [LIVEPATCH]" : "",
+ is_livepatch_transition() ? " [TRANSITION]" : "",
is_kernel_tainted() ? " [TAINTED]" : "");
}
--
2.47.3
1 day, 7 hours
Re: [PATCH] bpf: improve for-loop when searching for used_maps
by Lianbo Jiang
Hi, Luis
Thank you for the patch. Ack.
Lianbo
On 12/23/25 9:45 AM, devel-request(a)lists.crash-utility.osci.io wrote:
> Date: Wed, 17 Dec 2025 08:13:50 -0000
> From: "Luis Galdos"<luis.galdos(a)suse.com>
> Subject: [Crash-utility] [PATCH] bpf: improve for-loop when searching
> for used_maps
> To:devel@lists.crash-utility.osci.io
> Message-ID:<20251217081350.9702.15487(a)lists.crash-utility.osci.io>
> Content-Type: text/plain; charset="utf-8"
>
> As the list bpf->maplist contains unique pointers, break when a
> map is found.
>
> Signed-off-by: Luis Galdos<luis.galdos(a)suse.com>
> ---
> bpf.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/bpf.c b/bpf.c
> index 9b99e23..2840c7d 100644
> --- a/bpf.c
> +++ b/bpf.c
> @@ -880,6 +880,7 @@ bpf_prog_used_maps(int idx, char *retbuf)
> sprintf(&retbuf[strlen(retbuf)], "%s%ld",
> strlen(retbuf) ? "," : "",
> bpf->maplist[m].index);
> + break;
> }
> }
> }
> -- 2.52.0
1 day, 11 hours
Re: [PATCH v2] Resolve BLK_MQ_F_TAG_HCTX_SHARED at runtime
by Lianbo Jiang
Hi, Tao
Thank you for the update. For v2: Ack
Lianbo
On 12/15/25 5:59 AM, devel-request(a)lists.crash-utility.osci.io wrote:
> Date: Mon, 15 Dec 2025 10:49:30 +1300
> From: Tao Liu<ltao(a)redhat.com>
> Subject: [Crash-utility] [PATCH v2] Resolve BLK_MQ_F_TAG_HCTX_SHARED
> at runtime
> To:devel@lists.crash-utility.osci.io
> Cc: Tao Liu<ltao(a)redhat.com>
> Message-ID:<20251214214929.10250-2-ltao(a)redhat.com>
> Content-Type: text/plain; charset="US-ASCII"; x-default=true
>
> Though upstream kernel have defined BLK_MQ_F_TAG_HCTX_SHARED
> as (1 << 3), the value might be set different, e.g. [1]. In
> this patch, we will use enumerator_value() to get its value
> at runtime, to make the code more adaptable.
>
> [1]:https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-8/-/b...
>
> Signed-off-by: Tao Liu<ltao(a)redhat.com>
> ---
> dev.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/dev.c b/dev.c
> index 27318e8..1332b0e 100644
> --- a/dev.c
> +++ b/dev.c
> @@ -4326,11 +4326,11 @@ struct bt_iter_data {
> #define MQ_RQ_IN_FLIGHT 1
> #define REQ_OP_BITS 8
> #define REQ_OP_MASK ((1 << REQ_OP_BITS) - 1)
> -#define BLK_MQ_F_TAG_HCTX_SHARED (1 << 3)
> +static long blk_hctx_shared = 0;
>
> static bool blk_mq_is_shared_tags(unsigned int flags)
> {
> - return flags & BLK_MQ_F_TAG_HCTX_SHARED;
> + return flags & blk_hctx_shared;
> }
>
> static uint op_is_write(uint op)
> @@ -4952,6 +4952,7 @@ void diskio_init(void)
> MEMBER_OFFSET_INIT(request_queue_tag_set, "request_queue", "tag_set");
> MEMBER_OFFSET_INIT(blk_mq_tag_set_flags, "blk_mq_tag_set", "flags");
> MEMBER_OFFSET_INIT(blk_mq_tag_set_shared_tags, "blk_mq_tag_set", "shared_tags");
> + enumerator_value("BLK_MQ_F_TAG_HCTX_SHARED", &blk_hctx_shared);
>
> dt->flags |= DISKIO_INIT;
> }
> -- 2.47.0
1 day, 11 hours
unilever supply chain issues
by stivejoy373@gmail.com
I've always struggled with managing multiple deadlines, so I eventually turned to Native Assignment Help just to survive the workload. I didn t expect it to make such a huge difference, but it honestly did. They helped me get my workload under control and, for the first time, actually understand what each assignment was asking for. Later, when my coursework started getting tougher, I needed support understanding unilever supply chain issues, including sustainability challenges, supplier coordination, global sourcing risks, and how disruptions impact production and distribution, and it honestly became a complete lifesaver.
visit: https://www.nativeassignmenthelp.co.uk/contemporary-business-environment-...
4 days, 1 hour
[PATCH] bpf: improve for-loop when searching for used_maps
by Luis Galdos
As the list bpf->maplist contains unique pointers, break when a
map is found.
Signed-off-by: Luis Galdos <luis.galdos(a)suse.com>
---
bpf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bpf.c b/bpf.c
index 9b99e23..2840c7d 100644
--- a/bpf.c
+++ b/bpf.c
@@ -880,6 +880,7 @@ bpf_prog_used_maps(int idx, char *retbuf)
sprintf(&retbuf[strlen(retbuf)], "%s%ld",
strlen(retbuf) ? "," : "",
bpf->maplist[m].index);
+ break;
}
}
}
--
2.52.0
1 week
Re: [PATCH] Loongarch: update the NR_CPUS to 2048
by Lianbo Jiang
On 12/11/25 11:57 AM, devel-request(a)lists.crash-utility.osci.io wrote:
> Date: Thu, 11 Dec 2025 09:41:18 +0800
> From: Chenghao Duan<duanchenghao(a)kylinos.cn>
> Subject: [Crash-utility] [PATCH] Loongarch: update the NR_CPUS to 2048
> To:devel@lists.crash-utility.osci.io
> Cc: Chenghao Duan<duanchenghao(a)kylinos.cn>
> Message-ID:<20251211014118.124373-1-duanchenghao(a)kylinos.cn>
>
> Since the kernel commit 9559d5806319 ("LoongArch: Increase max
> supported CPUs up to 2048")the NR_CPUS on Linux kernel ranges
> from 2-2048. So let's match NR_CPUS with the max NR_CPUS count
> on the Linux kernel.
Thank you for the patch. Ack.
Lianbo
>
> Signed-off-by: Chenghao Duan<duanchenghao(a)kylinos.cn>
> ---
> defs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/defs.h b/defs.h
> index 156ac02..c407ac4 100644
> --- a/defs.h
> +++ b/defs.h
> @@ -169,7 +169,7 @@
> #define NR_CPUS (256)
> #endif
> #ifdef LOONGARCH64
> -#define NR_CPUS (256)
> +#define NR_CPUS (2048)
> #endif
>
> #define NR_DEVICE_DUMPS (64)
> -- 2.25.1
1 week, 2 days
Re: [PATCH RESEND] Add a command line option to retrieve build-id
by lijiang
Hi, Munehisa
Thank you for the patch.
On Tue, Dec 9, 2025 at 2:18 AM <devel-request(a)lists.crash-utility.osci.io>
wrote:
> Date: Mon, 8 Dec 2025 10:16:17 -0800
> From: Munehisa Kamata <kamatam(a)amazon.com>
> Subject: [Crash-utility] [PATCH RESEND] Add a command line option to
> retrieve build-id
> To: <devel(a)lists.crash-utility.osci.io>
> Cc: Munehisa Kamata <kamatam(a)amazon.com>
> Message-ID: <20251208181617.420350-1-kamatam(a)amazon.com>
> Content-Type: text/plain
>
> Resending because my previous post is held for presumably being sent
> without a list subscription.
>
> Since Linux kernel commit 0935288c6e00 ("kdump: append kernel build-id
> string to VMCOREINFO") merged in v5.9, VMCOREINFO data contains a kernel
> build-id. Add a simple --build-id command line option that retrieves the
> build-id from a kernel dump file, which works just like the existing
> --osrelease option (and the implementation mimics it).
>
> Example:
> # crash --build-id /var/crash/127.0.0.1-2025-11-28-00\:33\:07/vmcore
> 03cc3b4eb67df4e66a6a794a39521bafabef0886
>
>
This looks good to me. So for the patch: Ack
Lianbo
While we may also want to implement the strict build-id based
> verification between namelist and dump file, this would be still handy
> for some scripting or automation tasks without namelist.
>
> Signed-off-by: Munehisa Kamata <kamatam(a)amazon.com>
> ---
> crash.8 | 7 +++++++
> defs.h | 1 +
> diskdump.c | 17 +++++++++++++++++
> help.c | 6 ++++++
> main.c | 30 ++++++++++++++++++++++++++++++
> makedumpfile.c | 40 ++++++++++++++++++++++++++++++++++------
> netdump.c | 17 +++++++++++++++++
> 7 files changed, 112 insertions(+), 6 deletions(-)
>
> diff --git a/crash.8 b/crash.8
> index c7dc27d..4c06cb7 100644
> --- a/crash.8
> +++ b/crash.8
> @@ -398,6 +398,13 @@ Display the OSRELEASE vmcoreinfo string from a kdump
> .I dumpfile
> header.
> .TP
> +.BI --build-id \ dumpfile
> +Display the BUILD-ID vmcoreinfo string from a kdump
> +.I dumpfile
> +header.
> +Note: this option only works for kernel (>=v5.9); otherwise it
> +prints "unknown" and exits with non-zero status.
> +.TP
> .BI --hyper
> Force the session to be that of a Xen hypervisor.
> .TP
> diff --git a/defs.h b/defs.h
> index 24dad93..ff8041c 100644
> --- a/defs.h
> +++ b/defs.h
> @@ -570,6 +570,7 @@ struct program_context {
> #define MEMSRC_LOCAL (0x80000ULL)
> #define REDZONE (0x100000ULL)
> #define VMWARE_VMSS_GUESTDUMP (0x200000ULL)
> +#define GET_BUILD_ID (0x400000ULL)
> char *cleanup;
> char *namelist_orig;
> char *namelist_debug_orig;
> diff --git a/diskdump.c b/diskdump.c
> index b1ca0a7..0ff8782 100644
> --- a/diskdump.c
> +++ b/diskdump.c
> @@ -91,6 +91,7 @@ static void dump_vmcoreinfo(FILE *);
> static void dump_note_offsets(FILE *);
> static char *vmcoreinfo_read_string(const char *);
> static void diskdump_get_osrelease(void);
> +static void diskdump_get_build_id(void);
> static int valid_note_address(unsigned char *);
>
> /* For split dumpfile */
> @@ -1074,6 +1075,9 @@ is_diskdump(char *file)
> if (pc->flags2 & GET_OSRELEASE)
> diskdump_get_osrelease();
>
> + if (pc->flags2 & GET_BUILD_ID)
> + diskdump_get_build_id();
> +
> #ifdef LZO
> if (lzo_init() == LZO_E_OK)
> dd->flags |= LZO_SUPPORTED;
> @@ -2446,6 +2450,19 @@ diskdump_get_osrelease(void)
> pc->flags2 &= ~GET_OSRELEASE;
> }
>
> +static void
> +diskdump_get_build_id(void)
> +{
> + char *string;
> +
> + if ((string = vmcoreinfo_read_string("BUILD-ID"))) {
> + fprintf(fp, "%s\n", string);
> + free(string);
> + }
> + else
> + pc->flags2 &= ~GET_BUILD_ID;
> +}
> +
> static int
> valid_note_address(unsigned char *offset)
> {
> diff --git a/help.c b/help.c
> index 78d7a5c..1a21062 100644
> --- a/help.c
> +++ b/help.c
> @@ -266,6 +266,12 @@ char *program_usage_info[] = {
> " Display the OSRELEASE vmcoreinfo string from a kdump dumpfile",
> " header.",
> "",
> + " --build-id dumpfile",
> + " Display the BUILD-ID vmcoreinfo string from a kdump dumpfile",
> + " header.",
> + " Note: this option only works for kernel(>=v5.9); otherwise it",
> + " prints \"unknown\" and exits with non-zero status",
> + "",
> " --hyper",
> " Force the session to be that of a Xen hypervisor.",
> "",
> diff --git a/main.c b/main.c
> index 71bcc15..d4c335b 100644
> --- a/main.c
> +++ b/main.c
> @@ -29,6 +29,7 @@ static void check_xen_hyper(void);
> static void show_untrusted_files(void);
> static void get_osrelease(char *);
> static void get_log(char *);
> +static void get_build_id(char *);
>
> static struct option long_options[] = {
> {"memory_module", required_argument, 0, 0},
> @@ -66,6 +67,7 @@ static struct option long_options[] = {
> {"no_elf_notes", 0, 0, 0},
> {"osrelease", required_argument, 0, 0},
> {"log", required_argument, 0, 0},
> + {"build-id", required_argument, 0, 0},
> {"hex", 0, 0, 0},
> {"dec", 0, 0, 0},
> {"no_strip", 0, 0, 0},
> @@ -276,6 +278,11 @@ main(int argc, char **argv)
> get_log(optarg);
> }
>
> + else if (STREQ(long_options[option_index].name,
> "build-id")) {
> + pc->flags2 |= GET_BUILD_ID;
> + get_build_id(optarg);
> + }
> +
> else if (STREQ(long_options[option_index].name,
> "hex")) {
> pc->flags2 |= RADIX_OVERRIDE;
> pc->output_radix = 16;
> @@ -1502,6 +1509,8 @@ dump_program_context(void)
> fprintf(fp, "%sREDZONE", others++ ? "|" : "");
> if (pc->flags2 & VMWARE_VMSS_GUESTDUMP)
> fprintf(fp, "%sVMWARE_VMSS_GUESTDUMP", others++ ? "|" :
> "");
> + if (pc->flags2 & GET_BUILD_ID)
> + fprintf(fp, "%sGET_BUILD_ID", others++ ? "|" : "");
> fprintf(fp, ")\n");
>
> fprintf(fp, " namelist: %s\n", pc->namelist);
> @@ -1972,6 +1981,27 @@ get_log(char *dumpfile)
> clean_exit(retval);
> }
>
> +static void
> +get_build_id(char *dumpfile)
> +{
> + int retval = 1;
> +
> + if (is_flattened_format(dumpfile)) {
> + if (pc->flags2 & GET_BUILD_ID)
> + retval = 0;
> + } else if (is_diskdump(dumpfile)) {
> + if (pc->flags2 & GET_BUILD_ID)
> + retval = 0;
> + } else if (is_kdump(dumpfile, KDUMP_LOCAL)) {
> + if (pc->flags2 & GET_BUILD_ID)
> + retval = 0;
> + }
> +
> + if (retval)
> + fprintf(fp, "unknown\n");
> +
> + clean_exit(retval);
> +}
>
> char *
> no_vmcoreinfo(const char *unused)
> diff --git a/makedumpfile.c b/makedumpfile.c
> index 26d12b6..ee03199 100644
> --- a/makedumpfile.c
> +++ b/makedumpfile.c
> @@ -24,6 +24,7 @@
> #include <byteswap.h>
>
> static void flattened_format_get_osrelease(char *);
> +static void flattened_format_get_build_id(char *);
>
> int flattened_format = 0;
>
> @@ -196,7 +197,7 @@ read_all_makedumpfile_data_header(char *file)
> void
> check_flattened_format(char *file)
> {
> - int fd, get_osrelease;
> + int fd, get_osrelease, get_build_id;
> struct stat stat;
> struct makedumpfile_header fh;
>
> @@ -206,6 +207,12 @@ check_flattened_format(char *file)
> } else
> get_osrelease = FALSE;
>
> + if (pc->flags2 & GET_BUILD_ID) {
> + get_build_id = TRUE;
> + pc->flags2 &= ~GET_BUILD_ID;
> + } else
> + get_build_id = FALSE;
> +
> if (flattened_format)
> goto out;
>
> @@ -237,6 +244,11 @@ check_flattened_format(char *file)
> return;
> }
>
> + if (get_build_id) {
> + flattened_format_get_build_id(file);
> + return;
> + }
> +
> if (!read_all_makedumpfile_data_header(file))
> return;
>
> @@ -251,6 +263,9 @@ check_flattened_format(char *file)
> out:
> if (get_osrelease)
> pc->flags2 |= GET_OSRELEASE;
> +
> + if (get_build_id)
> + pc->flags2 |= GET_BUILD_ID;
> }
>
> static int
> @@ -368,26 +383,39 @@ dump_flat_header(FILE *ofp)
> }
>
> static void
> -flattened_format_get_osrelease(char *file)
> +flattened_format_get_common(char *file, char *key, ulonglong flag)
> {
> int c;
> FILE *pipe;
> - char buf[BUFSIZE], *p1, *p2;
> + char keybuf[BUFSIZE], buf[BUFSIZE], *p1, *p2;
>
> - c = strlen("OSRELEASE=");
> + sprintf(keybuf, "%s=", key);
> + c = strlen(keybuf);
> sprintf(buf, "/usr/bin/strings -n %d %s", c, file);
>
> if ((pipe = popen(buf, "r")) == NULL)
> return;
>
> for (c = 0; (c < 100) && fgets(buf, BUFSIZE-1, pipe); c++) {
> - if ((p1 = strstr(buf, "OSRELEASE="))) {
> + if ((p1 = strstr(buf, keybuf))) {
> p2 = strstr(p1, "=");
> fprintf(fp, "%s", p2+1);
> flattened_format = TRUE;
> - pc->flags2 |= GET_OSRELEASE;
> + pc->flags2 |= flag;
> }
> }
>
> pclose(pipe);
> }
> +
> +static void
> +flattened_format_get_osrelease(char *file)
> +{
> + flattened_format_get_common(file, "OSRELEASE", GET_OSRELEASE);
> +}
> +
> +static void
> +flattened_format_get_build_id(char *file)
> +{
> + flattened_format_get_common(file, "BUILD-ID", GET_BUILD_ID);
> +}
> diff --git a/netdump.c b/netdump.c
> index c7ff009..ba1c6c4 100644
> --- a/netdump.c
> +++ b/netdump.c
> @@ -50,6 +50,7 @@ static int proc_kcore_init_64(FILE *, int);
> static char *get_regs_from_note(char *, ulong *, ulong *);
> static void kdump_get_osrelease(void);
> static char *vmcoreinfo_read_string(const char *);
> +static void kdump_get_build_id(void);
>
>
> #define ELFSTORE 1
> @@ -477,6 +478,10 @@ is_netdump(char *file, ulong source_query)
> get_log_from_vmcoreinfo(file);
> }
>
> + if ((source_query == KDUMP_LOCAL) &&
> + (pc->flags2 & GET_BUILD_ID))
> + kdump_get_build_id();
> +
> return nd->header_size;
>
> bailout:
> @@ -4996,6 +5001,18 @@ kdump_get_osrelease(void)
> pc->flags2 &= ~GET_OSRELEASE;
> }
>
> +static void
> +kdump_get_build_id(void)
> +{
> + char *string;
> +
> + if ((string = vmcoreinfo_read_string("BUILD-ID"))) {
> + fprintf(fp, "%s\n", string);
> + free(string);
> + } else
> + pc->flags2 &= ~GET_BUILD_ID;
> +}
> +
> void
> dump_registers_for_qemu_mem_dump(void)
> {
> --
> 2.47.3
>
1 week, 2 days
[PATCH] Doc: add manual and help entry for --max-malloc-bufs option
by Shivang Upadhyay
Signed-off-by: Shivang Upadhyay <shivangu(a)linux.ibm.com>
---
crash.8 | 4 ++++
help.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/crash.8 b/crash.8
index c7dc27d..511c092 100644
--- a/crash.8
+++ b/crash.8
@@ -511,6 +511,10 @@ a relocation size equal to the difference between the two values.
Set the number of internal hash queue heads used for list gathering
and verification. The default count is 32768.
.TP
+.BI --max-malloc-bufs \ size
+Set the value of \fBMAX_MALLOC_BUFS\fP to \fIsize\fP.
+The minimum allowed value is 3072.
+.TP
.B --minimal
Bring up a session that is restricted to the
.I log, dis, rd, sym, eval, set
diff --git a/help.c b/help.c
index 78d7a5c..3faea60 100644
--- a/help.c
+++ b/help.c
@@ -344,6 +344,10 @@ char *program_usage_info[] = {
" relocated KASLR value. If set to auto, the KASLR offset value will",
" be automatically calculated.",
"",
+ " --max-malloc-bufs <size>",
+ " Set the value of MAX_MALLOC_BUFS to size.",
+ " The minimum allowed value is 3072.",
+ "",
" --minimal",
" Bring up a session that is restricted to the log, dis, rd, sym,",
" eval, set and exit commands. This option may provide a way to",
--
2.52.0
1 week, 2 days
Re: [PATCH v4] make the MAX_MALLOC_BUFS customizable
by lijiang
Hi, Shivang
Thank you for the update.
This seems to have got back on the right track, but there is still a minor
request: please help to update the document accordingly. E.g: help.c and
crash.8
Lianbo
On Tue, Dec 9, 2025 at 2:18 AM <devel-request(a)lists.crash-utility.osci.io>
wrote:
> Date: Mon, 8 Dec 2025 14:01:16 +0530
> From: Shivang Upadhyay <shivangu(a)linux.ibm.com>
> Subject: [Crash-utility] [PATCH v4] make the MAX_MALLOC_BUFS
> customizable
> To: devel(a)lists.crash-utility.osci.io
> Cc: shivangu(a)linux.ibm.com, lijiang(a)redhat.com
> Message-ID: <20251208083116.436292-1-shivangu(a)linux.ibm.com>
>
> the default (and minimum) value of MAX_MALLOC_BUFS is 3072, but can be
> changed with command line with flag `--max-malloc-bufs`.
>
> Signed-off-by: Shivang Upadhyay <shivangu(a)linux.ibm.com>
> ---
> defs.h | 8 ++++++++
> main.c | 4 ++++
> tools.c | 9 ++++++---
> 3 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/defs.h b/defs.h
> index ab4aee8..f3de0e5 100644
> --- a/defs.h
> +++ b/defs.h
> @@ -188,6 +188,13 @@
> #define HIST_BLKSIZE (4096)
>
> static inline int string_exists(char *s) { return (s ? TRUE : FALSE); }
> +
> +static inline int max(int a, int b) {
> + if (a > b)
> + return a;
> + return b;
> +}
> +
> #define STREQ(A, B) (string_exists((char *)A) && string_exists((char
> *)B) && \
> (strcmp((char *)(A), (char *)(B)) == 0))
> #define STRNEQ(A, B) (string_exists((char *)A) && string_exists((char
> *)B) && \
> @@ -5608,6 +5615,7 @@ void exec_args_input_file(struct command_table_entry
> *, struct args_input_file *
> /*
> * tools.c
> */
> +extern int MAX_MALLOC_BUFS;
> FILE *set_error(char *);
> int __error(int, char *, ...);
> #define error __error /* avoid conflict with gdb error() */
> diff --git a/main.c b/main.c
> index 71bcc15..247779c 100644
> --- a/main.c
> +++ b/main.c
> @@ -46,6 +46,7 @@ static struct option long_options[] = {
> {"version", 0, 0, 0},
> {"buildinfo", 0, 0, 0},
> {"cpus", required_argument, 0, 0},
> + {"max-malloc-bufs", required_argument, 0, 0},
> {"no_ikconfig", 0, 0, 0},
> {"hyper", 0, 0, 0},
> {"p2m_mfn", required_argument, 0, 0},
> @@ -163,6 +164,9 @@ main(int argc, char **argv)
> else if (STREQ(long_options[option_index].name,
> "cpus"))
> kt->cpus_override = optarg;
>
> + else if (STREQ(long_options[option_index].name,
> "max-malloc-bufs"))
> + MAX_MALLOC_BUFS = max(MAX_MALLOC_BUFS,
> atoi(optarg));
> +
> else if (STREQ(long_options[option_index].name,
> "hyper"))
> pc->flags |= XEN_HYPER;
>
> diff --git a/tools.c b/tools.c
> index a9ad18d..69250c4 100644
> --- a/tools.c
> +++ b/tools.c
> @@ -5698,7 +5698,7 @@ ll_power(long long base, long long exp)
> #define B32K (4)
>
> #define SHARED_BUF_SIZES (B32K+1)
> -#define MAX_MALLOC_BUFS (2000)
> +int MAX_MALLOC_BUFS = 3072; /* can be changed from command line args */
> #define MAX_CACHE_SIZE (KILOBYTES(32))
>
> struct shared_bufs {
> @@ -5723,7 +5723,7 @@ struct shared_bufs {
> long buf_8K_ovf;
> long buf_32K_ovf;
> int buf_inuse[SHARED_BUF_SIZES];
> - char *malloc_bp[MAX_MALLOC_BUFS];
> + char **malloc_bp;
> long smallest;
> long largest;
> long embedded;
> @@ -5744,6 +5744,7 @@ buf_init(void)
>
> bp->smallest = 0x7fffffff;
> bp->total = 0.0;
> + bp->malloc_bp = (char**) calloc(MAX_MALLOC_BUFS * sizeof(char*),
> 1);
>
> #ifdef VALGRIND
> VALGRIND_MAKE_MEM_NOACCESS(&bp->buf_1K, sizeof(bp->buf_1K));
> @@ -6130,7 +6131,9 @@ getbuf(long reqsize)
> dump_shared_bufs();
>
> return ((char *)(long)
> - error(FATAL, "cannot allocate any more memory!\n"));
> + error(FATAL, "cannot allocate any more memory!\n"
> + "try increasing --max-malloc-bufs
> (current value : %d)\n",
> + MAX_MALLOC_BUFS));
> }
>
> /*
> --
> 2.52.0
>
1 week, 2 days