[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DCTZLTRX455M.95MSJULLX6VC@linaro.org>
Date: Tue, 16 Sep 2025 06:48:59 +0100
From: "Alexey Klimov" <alexey.klimov@...aro.org>
To: "Eugen Hristev" <eugen.hristev@...aro.org>
Cc: <linux-arm-msm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-mm@...ck.org>, <tglx@...utronix.de>, <andersson@...nel.org>,
<pmladek@...e.com>, <rdunlap@...radead.org>, <corbet@....net>,
<david@...hat.com>, <mhocko@...e.com>, <tudor.ambarus@...aro.org>,
<mukesh.ojha@....qualcomm.com>, <linux-arm-kernel@...ts.infradead.org>,
<linux-hardening@...r.kernel.org>, <jonechou@...gle.com>,
<rostedt@...dmis.org>, <linux-doc@...r.kernel.org>,
<devicetree@...r.kernel.org>
Subject: Re: [RFC][PATCH v3 15/16] kmemdump: Add Kinfo backend driver
On Fri Sep 12, 2025 at 4:08 PM BST, Eugen Hristev wrote:
[..]
> --- /dev/null
> +++ b/mm/kmemdump/kinfo.c
> @@ -0,0 +1,293 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + *
> + * Copyright 2002 Rusty Russell <rusty@...tcorp.com.au> IBM Corporation
> + * Copyright 2021 Google LLC
> + * Copyright 2025 Linaro Ltd. Eugen Hristev <eugen.hristev@...aro.org>
> + */
> +#include <linux/platform_device.h>
> +#include <linux/kallsyms.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/of_reserved_mem.h>
> +#include <linux/kmemdump.h>
> +#include <linux/module.h>
> +#include <linux/utsname.h>
Could you please check if the headers are sorted here
and in all other patches in this series?
Also module.h is duplicated.
[..]
> +static int build_info_set(const char *str, const struct kernel_param *kp)
> +{
> + struct kernel_all_info *all_info = kinfo->all_info_addr;
here ^^
> + size_t build_info_size;
> +
> + if (kinfo->all_info_addr == 0 || kinfo->all_info_size == 0)
> + return -ENAVAIL;
> +
> + all_info = (struct kernel_all_info *)kinfo->all_info_addr;
Maybe assignment of all_info on declaration in the beginning of this function
is not needed then?
> + build_info_size = sizeof(all_info->info.build_info);
> +
> + memcpy(&all_info->info.build_info, str, min(build_info_size - 1,
> + strlen(str)));
> + update_kernel_all_info(all_info);
> +
> + if (strlen(str) > build_info_size) {
> + pr_warn("%s: Build info buffer (len: %zd) can't hold entire string '%s'\n",
> + __func__, build_info_size, str);
> + return -ENOMEM;
> + }
> +
> + return 0;
> +}
[...]
Best regards,
Alexey
Powered by blists - more mailing lists