From nobody Fri Apr 19 05:49:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1558120734; cv=none; d=zoho.com; s=zohoarc; b=nzYU0wg1/5+u98VYwbVds4+h+/dHWjp0+C669STid17Iv1moGmctSCn9Pa38cwBweoiFQrt7NuQVfVE+5w8QgGRBFwpiuVj3z/zN1yQQ3iWaU6Lhbo11RjXhJfTuedbhaU5TQhKrQUDlx0vzayZTQtsmTgvHIPQBheupcMWX+68= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558120734; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=LEcwEvLLofOU2BmGHhCXIZuFSpT1bC6KrpdgwFHs2Ds=; b=QvB1cjkZjDPMor0lWqC573+86zfsoGXyzMpfy9bqcRzvrpIAWzU8Kig79OUWtI8KQ/QWSVGNbLIckxG4FzCcZrUuxjUyZhmWY0Z/6XCo18uWfgExz34uolculKCRwYU/2vpJ1A8H9bXacFethnZEVbyhPemxyDPmMdJybSOfxkU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 155812073482190.82789861456513; Fri, 17 May 2019 12:18:54 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hRiMB-0001DC-Jn; Fri, 17 May 2019 19:17:27 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hRiM9-0001D7-Oc for xen-devel@lists.xenproject.org; Fri, 17 May 2019 19:17:25 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 64ea7b80-78d8-11e9-b330-9bf8a6f72940; Fri, 17 May 2019 19:17:21 +0000 (UTC) X-Inumbo-ID: 64ea7b80-78d8-11e9-b330-9bf8a6f72940 Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=SoftFail smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@MIAPEX02MSOL01.citrite.net Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: SoftFail (esa1.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com is inclined to not designate 23.29.105.83 as permitted sender) identity=mailfrom; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 include:spf.citrix.com include:spf2.citrix.com include:ironport.citrix.com exists:%{i}._spf.mta.salesforce.com ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@MIAPEX02MSOL01.citrite.net) identity=helo; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@MIAPEX02MSOL01.citrite.net"; x-conformance=sidf_compatible IronPort-SDR: pecJQ6HQrDz2H5t19OpI+qWHpkB4vHMV/120t1EepMEukaapNZdfPaI2SmjQFTzA6NZr+P3d7m Yy6hNJZFFjITqh78YFX/gw6YlNaVUEZ3BGFiAoqujav705bCqkAFdW2Egbfaina4Z6KbOaoeH1 2X4R1EmSENJuyT8IdSMTf7XamGfa/nX872CHnlbIFvqv4hr1A0JyeWQywURJxeefT63ukokPLu eJkVJRhDtxqwgU+H70SaGNt1A0d4vv2IkztWOYgo3QHr4Ozk2zaMUpwniE/8j6WjIw3IpHey4E fs0= X-SBRS: 2.7 X-MesageID: 588085 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 23.29.105.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.60,481,1549947600"; d="scan'208";a="588085" From: Andrew Cooper To: Xen-devel Date: Fri, 17 May 2019 20:17:18 +0100 Message-ID: <1558120638-3610-1-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] xen/boot: Print the build-id along with the changeset information X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Wei Liu , Andrew Cooper , Julien Grall , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" During initcalls is ok, but is a rather random place to find the build-id: (XEN) Parked 2 CPUs (XEN) build-id: 7ff05f78ebc8141000b9feee4370a408bd935dec (XEN) Running stub recovery selftests... Logically, it is version information, so print with the changeset informati= on in console_init_preirq(): (XEN) Xen version 4.13-unstable (andrewcoop@andrecoop) (gcc (Debian 4.9.2= -10+deb8u2) 4.9.2) debug=3Dy Fri Apr 12 18:24:52 BST 2019 (XEN) Latest ChangeSet: Fri Apr 5 14:39:42 2019 git:fc6c7ae-dirty (XEN) build-id: 7ff05f78ebc8141000b9feee4370a408bd935dec (XEN) PVH start info: (pa 0000ffc0) Nothing has ever cared about xen_build_init()'s return value, so convert it= to void rather than include errno.h into the !BUILD_ID case of version.h Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini CC: Julien Grall --- xen/common/version.c | 9 +++------ xen/drivers/char/console.c | 3 +++ xen/include/xen/version.h | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/xen/common/version.c b/xen/common/version.c index 223cb52..937eb12 100644 --- a/xen/common/version.c +++ b/xen/common/version.c @@ -140,7 +140,7 @@ struct cv_info_pdb70 char pdb_filename[]; }; =20 -static int __init xen_build_init(void) +void __init xen_build_init(void) { const Elf_Note *n =3D __note_gnu_build_id_start; unsigned int sz; @@ -148,11 +148,11 @@ static int __init xen_build_init(void) =20 /* --build-id invoked with wrong parameters. */ if ( __note_gnu_build_id_end <=3D &n[0] ) - return -ENODATA; + return; =20 /* Check for full Note header. */ if ( &n[1] >=3D __note_gnu_build_id_end ) - return -ENODATA; + return; =20 sz =3D (void *)__note_gnu_build_id_end - (void *)n; =20 @@ -188,10 +188,7 @@ static int __init xen_build_init(void) #endif if ( !rc ) printk(XENLOG_INFO "build-id: %*phN\n", build_id_len, build_id_p); - - return rc; } -__initcall(xen_build_init); #endif /* * Local variables: diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 9bbcb0f..38ecd9c 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -934,6 +934,9 @@ void __init console_init_preirq(void) xen_compiler(), debug_build() ? 'y' : 'n', xen_compile_date()); printk("Latest ChangeSet: %s\n", xen_changeset()); =20 + /* Locate and print the buildid, if applicable. */ + xen_build_init(); + if ( opt_sync_console ) { serial_start_sync(sercon_handle); diff --git a/xen/include/xen/version.h b/xen/include/xen/version.h index 97c247a..9ac926d 100644 --- a/xen/include/xen/version.h +++ b/xen/include/xen/version.h @@ -19,8 +19,11 @@ const char *xen_deny(void); int xen_build_id(const void **p, unsigned int *len); =20 #ifdef BUILD_ID +void xen_build_init(void); int xen_build_id_check(const Elf_Note *n, unsigned int n_sz, const void **p, unsigned int *len); +#else +static inline void xen_build_init(void) {}; #endif =20 #endif /* __XEN_VERSION_H__ */ --=20 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel