Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp374150pxf; Thu, 8 Apr 2021 05:08:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6HDCQnRUKo9nGGo1WrdeiHtH9bdN8OeXe19sVuOZOeytvAsYGidOK+kMr2/gdd5kpRR2t X-Received: by 2002:a05:6402:229c:: with SMTP id cw28mr10761739edb.76.1617883687453; Thu, 08 Apr 2021 05:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617883687; cv=none; d=google.com; s=arc-20160816; b=xJIv/3afIeZ/opluzj8syl4tdiyfi/dCpJ4yHEj5KCk+OL8MtC/KKJXkhYZLaGFXP0 dY7dVwaIJh/CNHWt0W1DGu35FJN56kYd86cXAUXNpa54Gy/vMonkNH1KyQ9PVQAgnSMh GKYg1xs90LC9pPxOPs3sxwiNl5VZP91iVmxqadtcQ+Ps+oqyLGTHFLW4ScDyuC2MxLKU GZO+PMgeW8Cx0Vy+nAe3dPnahmh3tpvTKLXiPfyavZj0Za3x4CnQ78wPmiqgrdtLwtKU iNZHpJikBmYTxczBUBvn1t7dpM2MlcxwsSQupgvpS0zbzv88B+EEhPLPThxLieURt8h/ 3m2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Z0UrQ6NLsd8rE7QzzvEksGJPREIzdpTKGmPzCUiBcWw=; b=J3ttHci4YaALgyLM3nx1mZWms0BohkAVXKfOmk0PhhOp7Yc4GBZNAA62adMkBX71jE aeqc+bmRiZbEedksXawoCte7zTleU+FAntvHI6H6S4dC7m6XADPBGqw6PciRGcfiz72K tNubcENC8Lo4gvAWMRgXzN8oNbREsRqMWLXxOqxlfPzUkH+6ehvHb7GsUxTIwqv010E2 zB4/UL7xgCxiHiu4w4E4x2avB01Neil9a6L0L6wat5wXsvCEUqVqpThNdfpSSB00rTiu uL3DE9Mdzj64wf9JcyQ9aHPUnuH1OgxXUrQFbbj02NL9T7xfmQpOSSjzLrCPYP3BLSLW UG+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=peVZyEdp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t28si15145699edy.496.2021.04.08.05.07.44; Thu, 08 Apr 2021 05:08:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=peVZyEdp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231564AbhDHMFx (ORCPT + 99 others); Thu, 8 Apr 2021 08:05:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:45914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230291AbhDHMFx (ORCPT ); Thu, 8 Apr 2021 08:05:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D89B161159; Thu, 8 Apr 2021 12:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617883542; bh=PkD/GSaUvqTOVLvxjobLh4KOvXJrzJDPIsbDstqOgkI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=peVZyEdp9E0PsT0Nbh8YQwgv5kFuqJ1Ta8lDbS0KP/uT7B02e6DPud4czkNgGccTu H2V46zxkZJrp2+U6vnAtQlmTNxfFqP+9sLx4C2vMUdQXe+HBGIS7LHIAWy3MAguaV/ D22RZmE0M75ke261BPhV7V6ud41ivoPDSNFbrQCpE3ALQjyGJP5YEIzIshTN8Gy/Zh AeIfphkRB5XAPAE/WC7QWTuJt0eWlTUCnr+BIl3kCBzdnxGqF1TrgHQyStE3bke5kc KNljcAWby2fYP6Phj4qRBikK3aVJCAWB4F2fugicQkIR7paIhMqsFOqk1BwrXjHbh6 xHZxFV//lfgXg== Date: Thu, 8 Apr 2021 14:05:33 +0200 From: Jessica Yu To: Stephen Boyd Cc: Andrew Morton , linux-kernel@vger.kernel.org, Jiri Olsa , Alexei Starovoitov , Evan Green , Hsin-Yi Wang , Dave Young , Baoquan He , Vivek Goyal , kexec@lists.infradead.org Subject: Re: [PATCH v3 02/12] buildid: Stash away kernels build ID on init Message-ID: References: <20210331030520.3816265-1-swboyd@chromium.org> <20210331030520.3816265-3-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210331030520.3816265-3-swboyd@chromium.org> X-OS: Linux gunter 5.11.6-1-default x86_64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ 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 >+#include > #include > #include > #include >@@ -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); >+}