lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 07 Apr 2021 23:20:32 -0700
From:   Stephen Boyd <swboyd@...omium.org>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Jessica Yu <jeyu@...nel.org>,
        Evan Green <evgreen@...omium.org>,
        Hsin-Yi Wang <hsinyi@...omium.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH v3 03/12] dump_stack: Add vmlinux build ID to stack traces

Quoting Petr Mladek (2021-04-07 07:03:19)
> # readelf -Wn vmlinux-5.12.0-rc6-default+ 
> 
> Displaying notes found in: .notes
>   Owner                 Data size       Description
>   Xen                  0x00000006       Unknown note type: (0x00000006)    description data: 6c 69 6e 75 78 00 
>   Xen                  0x00000004       Unknown note type: (0x00000007)    description data: 32 2e 36 00 
>   Xen                  0x00000008       Unknown note type: (0x00000005)    description data: 78 65 6e 2d 33 2e 30 00 
>   Xen                  0x00000008       Unknown note type: (0x00000003)    description data: 00 00 00 ffffff80 ffffffff ffffffff ffffffff ffffffff 
> 

Thanks for the readelf output. That was most helpful to see what's going
on. The buildid code isn't prepared for this it seems. We'll need to
check the note data to see if it starts with "GNU\0" and if it does then
we use it as the buildid. I'm not sure what this Xen note is that has a
type of 3 but I think that's OK, it won't have "GNU" in there so we
should ignore it. Does this patch work?

----8<----
diff --git a/lib/buildid.c b/lib/buildid.c
index 483abf71eeec..f281dbe6fb83 100644
--- a/lib/buildid.c
+++ b/lib/buildid.c
@@ -25,6 +25,7 @@ static int parse_build_id_buf(unsigned char *build_id,
 
 		if (nhdr->n_type == BUILD_ID &&
 		    nhdr->n_namesz == sizeof("GNU") &&
+		    !strcmp((char *)(nhdr + 1), "GNU") &&
 		    nhdr->n_descsz > 0 &&
 		    nhdr->n_descsz <= BUILD_ID_SIZE_MAX) {
 			memcpy(build_id,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ