[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YG7xjbIEmrCco14F@gunter>
Date: Thu, 8 Apr 2021 14:05:33 +0200
From: Jessica Yu <jeyu@...nel.org>
To: Stephen Boyd <swboyd@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Evan Green <evgreen@...omium.org>,
Hsin-Yi Wang <hsinyi@...omium.org>,
Dave Young <dyoung@...hat.com>, Baoquan He <bhe@...hat.com>,
Vivek Goyal <vgoyal@...hat.com>, kexec@...ts.infradead.org
Subject: Re: [PATCH v3 02/12] buildid: Stash away kernels build ID on init
+++ Stephen Boyd [30/03/21 20:05 -0700]:
[snipped]
>diff --git a/lib/buildid.c b/lib/buildid.c
>index 010ab0674cb9..b939bbc59233 100644
>--- a/lib/buildid.c
>+++ b/lib/buildid.c
>@@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0
>
> #include <linux/buildid.h>
>+#include <linux/cache.h>
> #include <linux/elf.h>
> #include <linux/kernel.h>
> #include <linux/pagemap.h>
>@@ -171,3 +172,19 @@ int build_id_parse_buf(const void *buf, unsigned char *build_id, u32 buf_size)
> {
> return parse_build_id_buf(build_id, NULL, buf, buf_size);
> }
>+
>+unsigned char vmlinux_build_id[BUILD_ID_SIZE_MAX] __ro_after_init;
>+
>+/**
>+ * init_vmlinux_build_id - Get the running kernel's build ID
>+ *
>+ * Return: Running kernel's build ID
>+ */
Hm, init_vmlinux_build_id() doesn't return anything, so this comment is
not accurate - maybe "Get the running kernel's build ID and store it in
vmlinux_build_id"?
>+void __init init_vmlinux_build_id(void)
>+{
>+ extern const void __start_notes __weak;
>+ extern const void __stop_notes __weak;
>+ unsigned int size = &__stop_notes - &__start_notes;
>+
>+ build_id_parse_buf(&__start_notes, vmlinux_build_id, size);
>+}
Powered by blists - more mailing lists