lkml.org 
[lkml]   [2021]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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);
>+}
\
 
 \ /
  Last update: 2021-04-08 14:06    [W:0.552 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site