<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">The patches are all same. There was an error in the subject due to which it wasn’t reflecting in the submitted patches on open embedded core.</p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows 10</p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> akuster808 &lt;akuster808@gmail.com&gt;<br>
<b>Sent:</b> Monday, September 23, 2019 2:19:15 PM<br>
<b>To:</b> Shubham Agrawal &lt;shuagr@microsoft.com&gt;; openembedded-core@lists.openembedded.org &lt;openembedded-core@lists.openembedded.org&gt;<br>
<b>Subject:</b> Re: [OE-core] [”OE-core][thud][PATCH”] elfutils: CVE fix for elfutils</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
<br>
On 9/23/19 2:14 PM, shuagr97@gmail.com wrote:<br>
&gt; From: Shubham Agrawal &lt;shuagr@microsoft.com&gt;<br>
&gt;<br>
&gt; CVE: CVE-2019-7664.patch<br>
&gt; CVE: CVE-2019-7665.patch<br>
<br>
This is the third email patch on the same issues. Are they different?<br>
<br>
regards,<br>
Armin<br>
&gt;<br>
&gt; Sign off: Shubham Agrawal &lt;shuagr@microsoft.com&gt;<br>
&gt; ---<br>
&gt;&nbsp; meta/recipes-devtools/elfutils/elfutils_0.175.bb&nbsp;&nbsp; |&nbsp;&nbsp; 2 &#43;<br>
&gt;&nbsp; .../elfutils/files/CVE-2019-7664.patch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; 65 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
&gt;&nbsp; .../elfutils/files/CVE-2019-7665.patch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 154 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
&gt;&nbsp; 3 files changed, 221 insertions(&#43;)<br>
&gt;&nbsp; create mode 100644 meta/recipes-devtools/elfutils/files/CVE-2019-7664.patch<br>
&gt;&nbsp; create mode 100644 meta/recipes-devtools/elfutils/files/CVE-2019-7665.patch<br>
&gt;<br>
&gt; diff --git a/meta/recipes-devtools/elfutils/elfutils_0.175.bb b/meta/recipes-devtools/elfutils/elfutils_0.175.bb<br>
&gt; index e94a48e..862a9b6 100644<br>
&gt; --- a/meta/recipes-devtools/elfutils/elfutils_0.175.bb<br>
&gt; &#43;&#43;&#43; b/meta/recipes-devtools/elfutils/elfutils_0.175.bb<br>
&gt; @@ -31,6 &#43;31,8 @@ SRC_URI = &quot;<a href=""></a>https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Felfutils%2Fftp%2F%24&amp;amp;data=02%7C01%7Cshuagr%40microsoft.com%7C0a3b7e85865a440119d508d7406bb255%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637048703613961219&amp;amp;sdata=J1z7WGLoV1xEpBxRaWekNFf0HDIvmCtUMpLYUb1nR%2Fk%3D&amp;amp;reserved=0{PV}/${BP}.tar.bz2
 \<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="file://CVE-2019-7150.patch">file://CVE-2019-7150.patch</a> \<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="file://CVE-2019-7146_p1.patch">file://CVE-2019-7146_p1.patch</a> \<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="file://CVE-2019-7146_p2.patch">file://CVE-2019-7146_p2.patch</a> \<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="file://CVE-2019-7664.patch">file://CVE-2019-7664.patch</a> \<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="file://CVE-2019-7665.patch">file://CVE-2019-7665.patch</a> \<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;<br>
&gt;&nbsp; SRC_URI_append_libc-musl = &quot; <a href="file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch">
file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch</a>&quot;<br>
&gt;&nbsp; <br>
&gt; diff --git a/meta/recipes-devtools/elfutils/files/CVE-2019-7664.patch b/meta/recipes-devtools/elfutils/files/CVE-2019-7664.patch<br>
&gt; new file mode 100644<br>
&gt; index 0000000..e55dc5a<br>
&gt; --- /dev/null<br>
&gt; &#43;&#43;&#43; b/meta/recipes-devtools/elfutils/files/CVE-2019-7664.patch<br>
&gt; @@ -0,0 &#43;1,65 @@<br>
&gt; &#43;From 3ed05376e7b2c96c1d6eb24d2842cc25b79a4f07 Mon Sep 17 00:00:00 2001<br>
&gt; &#43;From: Mark Wielaard &lt;mark@klomp.org&gt;<br>
&gt; &#43;Date: Wed, 16 Jan 2019 12:25:57 &#43;0100<br>
&gt; &#43;Subject: [PATCH] CVE: CVE-2019-7664<br>
&gt; &#43;<br>
&gt; &#43;Upstream-Status: Backport<br>
&gt; &#43;libelf: Correct overflow check in note_xlate.<br>
&gt; &#43;<br>
&gt; &#43;We want to make sure the note_len doesn't overflow and becomes shorter<br>
&gt; &#43;than the note header. But the namesz and descsz checks got the note header<br>
&gt; &#43;size wrong). Replace the wrong constant (8) with a sizeof cvt_Nhdr (12).<br>
&gt; &#43;<br>
&gt; &#43;https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D24084&amp;amp;data=02%7C01%7Cshuagr%40microsoft.com%7C0a3b7e85865a440119d508d7406bb255%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637048703613961219&amp;amp;sdata=XDpI1uUOmF4w%2FdtsO%2BspaDCLIOEdoGQr6PNxaJh3u%2Fc%3D&amp;amp;reserved=0<br>
&gt; &#43;<br>
&gt; &#43;Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;<br>
&gt; &#43;Signed-off-by: Ubuntu &lt;lisa@shuagr-yocto-build.mdn4q2lr1oauhmizmzsslly3ad.xx.internal.cloudapp.net&gt;<br>
&gt; &#43;---<br>
&gt; &#43; libelf/ChangeLog&nbsp;&nbsp;&nbsp; | 13 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
&gt; &#43; libelf/note_xlate.h |&nbsp; 4 &#43;&#43;--<br>
&gt; &#43; 2 files changed, 15 insertions(&#43;), 2 deletions(-)<br>
&gt; &#43;<br>
&gt; &#43;diff --git a/libelf/ChangeLog b/libelf/ChangeLog<br>
&gt; &#43;index 68c4fbd..892e6e7 100644<br>
&gt; &#43;--- a/libelf/ChangeLog<br>
&gt; &#43;&#43;&#43;&#43; b/libelf/ChangeLog<br>
&gt; &#43;@@ -1,3 &#43;1,16 @@<br>
&gt; &#43;&#43;&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD<br>
&gt; &#43;&#43;=======<br>
&gt; &#43;&#43;2019-01-16&nbsp; Mark Wielaard&nbsp; &lt;mark@klomp.org&gt;<br>
&gt; &#43;&#43;<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp; * note_xlate.h (elf_cvt_note): Check n_namesz and n_descsz don't<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp; overflow note_len into note header.<br>
&gt; &#43;&#43;<br>
&gt; &#43;&#43;2018-11-17&nbsp; Mark Wielaard&nbsp; &lt;mark@klomp.org&gt;<br>
&gt; &#43;&#43;<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp; * elf32_updatefile.c (updatemmap): Make sure to call convert<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp; function on a properly aligned destination.<br>
&gt; &#43;&#43;<br>
&gt; &#43;&#43;&gt;&gt;&gt;&gt;&gt;&gt;&gt; e65d91d... libelf: Correct overflow check in note_xlate.<br>
&gt; &#43; 2018-11-16&nbsp; Mark Wielaard&nbsp; &lt;mark@klomp.org&gt;<br>
&gt; &#43; <br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * libebl.h (__elf32_msize): Mark with const attribute.<br>
&gt; &#43;diff --git a/libelf/note_xlate.h b/libelf/note_xlate.h<br>
&gt; &#43;index 9bdc3e2..bc9950f 100644<br>
&gt; &#43;--- a/libelf/note_xlate.h<br>
&gt; &#43;&#43;&#43;&#43; b/libelf/note_xlate.h<br>
&gt; &#43;@@ -46,13 &#43;46,13 @@ elf_cvt_note (void *dest, const void *src, size_t len, int encode,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* desc needs to be aligned.&nbsp; */<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note_len &#43;= n-&gt;n_namesz;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note_len = nhdr8 ? NOTE_ALIGN8 (note_len) : NOTE_ALIGN4 (note_len);<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (note_len &gt; len || note_len &lt; 8)<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (note_len &gt; len || note_len &lt; sizeof *n)<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&gt; &#43; <br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* data as a whole needs to be aligned.&nbsp; */<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note_len &#43;= n-&gt;n_descsz;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note_len = nhdr8 ? NOTE_ALIGN8 (note_len) : NOTE_ALIGN4 (note_len);<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (note_len &gt; len || note_len &lt; 8)<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (note_len &gt; len || note_len &lt; sizeof *n)<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&gt; &#43; <br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Copy or skip the note data.&nbsp; */<br>
&gt; &#43;-- <br>
&gt; &#43;2.7.4<br>
&gt; &#43;<br>
&gt; diff --git a/meta/recipes-devtools/elfutils/files/CVE-2019-7665.patch b/meta/recipes-devtools/elfutils/files/CVE-2019-7665.patch<br>
&gt; new file mode 100644<br>
&gt; index 0000000..a1bb309<br>
&gt; --- /dev/null<br>
&gt; &#43;&#43;&#43; b/meta/recipes-devtools/elfutils/files/CVE-2019-7665.patch<br>
&gt; @@ -0,0 &#43;1,154 @@<br>
&gt; &#43;From 4323d46c4a369b614aa1f574805860b3434552df Mon Sep 17 00:00:00 2001<br>
&gt; &#43;From: Mark Wielaard &lt;mark@klomp.org&gt;<br>
&gt; &#43;Date: Wed, 16 Jan 2019 15:41:31 &#43;0100<br>
&gt; &#43;Subject: [PATCH] CVE: CVE-2019-7665<br>
&gt; &#43;<br>
&gt; &#43;Upstream-Status: Backport<br>
&gt; &#43;<br>
&gt; &#43;Sign off: Shubham Agrawal &lt;shuagr@microsoft.com&gt;<br>
&gt; &#43;<br>
&gt; &#43;libebl: Check NT_PLATFORM core notes contain a zero terminated string.<br>
&gt; &#43;<br>
&gt; &#43;Most strings in core notes are fixed size. But NT_PLATFORM contains just<br>
&gt; &#43;a variable length string. Check that it is actually zero terminated<br>
&gt; &#43;before passing to readelf to print.<br>
&gt; &#43;<br>
&gt; &#43;https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D24089&amp;amp;data=02%7C01%7Cshuagr%40microsoft.com%7C0a3b7e85865a440119d508d7406bb255%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637048703613961219&amp;amp;sdata=WQe4updGnCdqEq%2FgiVbXZT%2FWc4sUd%2FoBef7x9f7jGE8%3D&amp;amp;reserved=0<br>
&gt; &#43;<br>
&gt; &#43;Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;<br>
&gt; &#43;Signed-off-by: Ubuntu &lt;lisa@shuagr-yocto-build.mdn4q2lr1oauhmizmzsslly3ad.xx.internal.cloudapp.net&gt;<br>
&gt; &#43;---<br>
&gt; &#43; libdwfl/linux-core-attach.c |&nbsp; 9 &#43;&#43;&#43;&#43;&#43;----<br>
&gt; &#43; libebl/eblcorenote.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 39 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;--------------------<br>
&gt; &#43; libebl/libebl.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; 3 &#43;&#43;-<br>
&gt; &#43; src/readelf.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; 2 &#43;-<br>
&gt; &#43; 4 files changed, 27 insertions(&#43;), 26 deletions(-)<br>
&gt; &#43;<br>
&gt; &#43;diff --git a/libdwfl/linux-core-attach.c b/libdwfl/linux-core-attach.c<br>
&gt; &#43;index 6c99b9e..c0f1b0d 100644<br>
&gt; &#43;--- a/libdwfl/linux-core-attach.c<br>
&gt; &#43;&#43;&#43;&#43; b/libdwfl/linux-core-attach.c<br>
&gt; &#43;@@ -137,7 &#43;137,7 @@ core_next_thread (Dwfl *dwfl __attribute__ ((unused)), void *dwfl_arg,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Ebl_Register_Location *reglocs;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size_t nitems;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Ebl_Core_Item *items;<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (! ebl_core_note (core_arg-&gt;ebl, &amp;nhdr, name,<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (! ebl_core_note (core_arg-&gt;ebl, &amp;nhdr, name, desc,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;regs_offset, &amp;nregloc, &amp;reglocs, &amp;nitems, &amp;items))<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* This note may be just not recognized, skip it.&nbsp; */<br>
&gt; &#43;@@ -191,8 &#43;191,9 @@ core_set_initial_registers (Dwfl_Thread *thread, void *thread_arg_voidp)<br>
&gt; &#43;&nbsp;&nbsp; const Ebl_Register_Location *reglocs;<br>
&gt; &#43;&nbsp;&nbsp; size_t nitems;<br>
&gt; &#43;&nbsp;&nbsp; const Ebl_Core_Item *items;<br>
&gt; &#43;-&nbsp; int core_note_err = ebl_core_note (core_arg-&gt;ebl, &amp;nhdr, name, &amp;regs_offset,<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;nregloc, &amp;reglocs, &amp;nitems, &amp;items);<br>
&gt; &#43;&#43;&nbsp; int core_note_err = ebl_core_note (core_arg-&gt;ebl, &amp;nhdr, name, desc,<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;regs_offset, &amp;nregloc, &amp;reglocs,<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;nitems, &amp;items);<br>
&gt; &#43;&nbsp;&nbsp; /* __libdwfl_attach_state_for_core already verified the note is there.&nbsp; */<br>
&gt; &#43;&nbsp;&nbsp; assert (core_note_err != 0);<br>
&gt; &#43;&nbsp;&nbsp; assert (nhdr.n_type == NT_PRSTATUS);<br>
&gt; &#43;@@ -383,7 &#43;384,7 @@ dwfl_core_file_attach (Dwfl *dwfl, Elf *core)<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Ebl_Register_Location *reglocs;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size_t nitems;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Ebl_Core_Item *items;<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (! ebl_core_note (ebl, &amp;nhdr, name,<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (! ebl_core_note (ebl, &amp;nhdr, name, desc,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;regs_offset, &amp;nregloc, &amp;reglocs, &amp;nitems, &amp;items))<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* This note may be just not recognized, skip it.&nbsp; */<br>
&gt; &#43;diff --git a/libebl/eblcorenote.c b/libebl/eblcorenote.c<br>
&gt; &#43;index 783f981..7fab397 100644<br>
&gt; &#43;--- a/libebl/eblcorenote.c<br>
&gt; &#43;&#43;&#43;&#43; b/libebl/eblcorenote.c<br>
&gt; &#43;@@ -36,11 &#43;36,13 @@<br>
&gt; &#43; #include &lt;inttypes.h&gt;<br>
&gt; &#43; #include &lt;stdio.h&gt;<br>
&gt; &#43; #include &lt;stddef.h&gt;<br>
&gt; &#43;&#43;#include &lt;string.h&gt;<br>
&gt; &#43; #include &lt;libeblP.h&gt;<br>
&gt; &#43; <br>
&gt; &#43; <br>
&gt; &#43; int<br>
&gt; &#43; ebl_core_note (Ebl *ebl, const GElf_Nhdr *nhdr, const char *name,<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const char *desc,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GElf_Word *regs_offset, size_t *nregloc,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Ebl_Register_Location **reglocs, size_t *nitems,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Ebl_Core_Item **items)<br>
&gt; &#43;@@ -51,28 &#43;53,25 @@ ebl_core_note (Ebl *ebl, const GElf_Nhdr *nhdr, const char *name,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* The machine specific function did not know this type.&nbsp; */<br>
&gt; &#43; <br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *regs_offset = 0;<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *nregloc = 0;<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *reglocs = NULL;<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; switch (nhdr-&gt;n_type)<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* NT_PLATFORM is kind of special since it needs a zero terminated<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string (other notes often have a fixed size string).&nbsp; */<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; static const Ebl_Core_Item platform[] =<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&gt; &#43;-#define ITEMS(type, table)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case type:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *items = table;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *nitems = sizeof table / sizeof table[0];&nbsp;&nbsp;&nbsp; \<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result = 1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .name = &quot;Platform&quot;,<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .type = ELF_T_BYTE, .count = 0, .format = 's'<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp; };<br>
&gt; &#43; <br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; static const Ebl_Core_Item platform[] =<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .name = &quot;Platform&quot;,<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .type = ELF_T_BYTE, .count = 0, .format = 's'<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
&gt; &#43;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ITEMS (NT_PLATFORM, platform);<br>
&gt; &#43;-<br>
&gt; &#43;-#undef&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ITEMS<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (nhdr-&gt;n_type == NT_PLATFORM<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; memchr (desc, '\0', nhdr-&gt;n_descsz) != NULL)<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *regs_offset = 0;<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *nregloc = 0;<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *reglocs = NULL;<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *items = platform;<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *nitems = 1;<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result = 1;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt; &#43; <br>
&gt; &#43;diff --git a/libebl/libebl.h b/libebl/libebl.h<br>
&gt; &#43;index ca9b9fe..24922eb 100644<br>
&gt; &#43;--- a/libebl/libebl.h<br>
&gt; &#43;&#43;&#43;&#43; b/libebl/libebl.h<br>
&gt; &#43;@@ -319,7 &#43;319,8 @@ typedef struct<br>
&gt; &#43; <br>
&gt; &#43; /* Describe the format of a core file note with the given header and NAME.<br>
&gt; &#43;&nbsp;&nbsp;&nbsp; NAME is not guaranteed terminated, it's NHDR-&gt;n_namesz raw bytes.&nbsp; */<br>
&gt; &#43;-extern int ebl_core_note (Ebl *ebl, const GElf_Nhdr *nhdr, const char *name,<br>
&gt; &#43;&#43;extern int ebl_core_note (Ebl *ebl, const GElf_Nhdr *nhdr,<br>
&gt; &#43;&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const char *name, const char *desc,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GElf_Word *regs_offset, size_t *nregloc,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const Ebl_Register_Location **reglocs,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size_t *nitems, const Ebl_Core_Item **items)<br>
&gt; &#43;diff --git a/src/readelf.c b/src/readelf.c<br>
&gt; &#43;index 3a73710..71651e0 100644<br>
&gt; &#43;--- a/src/readelf.c<br>
&gt; &#43;&#43;&#43;&#43; b/src/readelf.c<br>
&gt; &#43;@@ -12153,7 &#43;12153,7 @@ handle_core_note (Ebl *ebl, const GElf_Nhdr *nhdr,<br>
&gt; &#43;&nbsp;&nbsp; size_t nitems;<br>
&gt; &#43;&nbsp;&nbsp; const Ebl_Core_Item *items;<br>
&gt; &#43; <br>
&gt; &#43;-&nbsp; if (! ebl_core_note (ebl, nhdr, name,<br>
&gt; &#43;&#43;&nbsp; if (! ebl_core_note (ebl, nhdr, name, desc,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;regs_offset, &amp;nregloc, &amp;reglocs, &amp;nitems, &amp;items))<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
&gt; &#43; <br>
&gt; &#43;-- <br>
&gt; &#43;2.7.4<br>
&gt; &#43;<br>
<br>
</div>
</span></font></div>
</body>
</html>