<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/elfutils.git/libcpu/ChangeLog, branch debuginfod-submit</title>
<subtitle>sourceware.org: git/elfutils.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/'/>
<entry>
<title>libcpu: Fix bounds checks and replace asserts with errors.</title>
<updated>2019-10-26T00:28:48+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-10-19T12:01:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=99dc63b10b3878616b85df2dfd2e4e7103e414b8'/>
<id>99dc63b10b3878616b85df2dfd2e4e7103e414b8</id>
<content type='text'>
Add a missing bounds check, fix an off-by-one bounds check and replace
asserts with error messages.

https://sourceware.org/bugzilla/show_bug.cgi?id=25068

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a missing bounds check, fix an off-by-one bounds check and replace
asserts with error messages.

https://sourceware.org/bugzilla/show_bug.cgi?id=25068

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcpu: Make sure left shifts are done in unsigned context.</title>
<updated>2019-09-07T19:45:31+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-09-07T19:45:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=65a29626e327b0173174cb25f390426e7808d272'/>
<id>65a29626e327b0173174cb25f390426e7808d272</id>
<content type='text'>
Use UINT64_C (0) instead of INT64_C (0) to make sure the calculation
is done on unsigned values. Otherwise the gcc undefined sanitizer will
warn:

libcpu/riscv_disasm.c:457:57: runtime error: left shift of negative value -1

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use UINT64_C (0) instead of INT64_C (0) to make sure the calculation
is done on unsigned values. Otherwise the gcc undefined sanitizer will
warn:

libcpu/riscv_disasm.c:457:57: runtime error: left shift of negative value -1

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add PIC and non-PIC variants of libcpu and libebl</title>
<updated>2019-08-28T19:45:26+00:00</updated>
<author>
<name>Omar Sandoval</name>
<email>osandov@fb.com</email>
</author>
<published>2019-08-26T17:51:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=823ee0c48e6db1134a36c6ae165a983466600fed'/>
<id>823ee0c48e6db1134a36c6ae165a983466600fed</id>
<content type='text'>
Currently, libcpu and libebl are always compiled as PIC. An upcoming
change will add the objects from libcpu.a and libebl.a to libdw.a, which
should not be PIC unless configured that way. So, make libcpu.a and
libebl.a non-PIC and add libcpu_pic.a and libebl_pic.a.

Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, libcpu and libebl are always compiled as PIC. An upcoming
change will add the objects from libcpu.a and libebl.a to libdw.a, which
should not be PIC unless configured that way. So, make libcpu.a and
libebl.a non-PIC and add libcpu_pic.a and libebl_pic.a.

Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcpu: merge libcpu_{i386,x86_64,bpf} into one library</title>
<updated>2019-08-28T19:29:18+00:00</updated>
<author>
<name>Omar Sandoval</name>
<email>osandov@fb.com</email>
</author>
<published>2019-08-26T17:51:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=4fcb7ec9d788d09f1525a506e1cbe8a39fc1b8eb'/>
<id>4fcb7ec9d788d09f1525a506e1cbe8a39fc1b8eb</id>
<content type='text'>
In preparation for combining the libebl backend modules, combine all of
the libcpu backends into libcpu.a.

Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation for combining the libebl backend modules, combine all of
the libcpu backends into libcpu.a.

Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcpu: Recognize bpf jump variants BPF_JLT, BPF_JLE, BPF_JSLT and BPF_JSLE</title>
<updated>2018-11-09T17:26:38+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2018-11-04T20:34:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=cff53f1784c9a4344604bedf41b7d499b3eb30d5'/>
<id>cff53f1784c9a4344604bedf41b7d499b3eb30d5</id>
<content type='text'>
Linux kernel 4.13 introduced 4 more jump class variants.

  commit 92b31a9af73b3a3fc801899335d6c47966351830
  Author: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
  Date:   Thu Aug 10 01:39:55 2017 +0200

    bpf: add BPF_J{LT,LE,SLT,SLE} instructions

For conditional jumping on unsigned and signed &lt; and &lt;= between a register
and another register or immediate.

Add these new constants to bpf.h, recognize them in bpf_disasm and update
the testfile-bpf-dis1.expect file.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Linux kernel 4.13 introduced 4 more jump class variants.

  commit 92b31a9af73b3a3fc801899335d6c47966351830
  Author: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
  Date:   Thu Aug 10 01:39:55 2017 +0200

    bpf: add BPF_J{LT,LE,SLT,SLE} instructions

For conditional jumping on unsigned and signed &lt; and &lt;= between a register
and another register or immediate.

Add these new constants to bpf.h, recognize them in bpf_disasm and update
the testfile-bpf-dis1.expect file.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use fallthrough attribute.</title>
<updated>2018-02-10T02:19:26+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2018-02-09T16:27:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=555e15ebe8bf1eb33d00747173cfc80cc65648a4'/>
<id>555e15ebe8bf1eb33d00747173cfc80cc65648a4</id>
<content type='text'>
Use __attribute__ ((fallthrough)) to indicate switch case fall through
instead of a comment. This ensures that the fallthrough warning is not
triggered even if the file is pre-processed (hence stripping the
comments) before it is compiled.

The actual fallback implementation is hidden behind a FALLBACK macro in
case the compiler doesn't support it.

Finally, the -Wimplict-fallthrough warning was upgraded to only allow
the attribute to satisfy it; a comment alone is no longer sufficient.

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use __attribute__ ((fallthrough)) to indicate switch case fall through
instead of a comment. This ensures that the fallthrough warning is not
triggered even if the file is pre-processed (hence stripping the
comments) before it is compiled.

The actual fallback implementation is hidden behind a FALLBACK macro in
case the compiler doesn't support it.

Finally, the -Wimplict-fallthrough warning was upgraded to only allow
the attribute to satisfy it; a comment alone is no longer sufficient.

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure packed structs follow the gcc memory layout</title>
<updated>2017-09-20T19:40:31+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2017-08-18T12:05:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=17d7194d291bf91d130b78e06cbe27b290e0376d'/>
<id>17d7194d291bf91d130b78e06cbe27b290e0376d</id>
<content type='text'>
gcc defaults to using struct layouts that follow the native conventions,
even if __attribute__((packed)) is given. In order to get the layout we
expect, we need to tell gcc to always use the gcc struct layout, at
least for packed structs. To do this, we can use the gcc_struct
attribute.

This is important, not only for porting to windows, but also potentially
for other platforms, as the bugs resulting from struct layout
differences are rather subtle and hard to find.

Signed-off-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc defaults to using struct layouts that follow the native conventions,
even if __attribute__((packed)) is given. In order to get the layout we
expect, we need to tell gcc to always use the gcc struct layout, at
least for packed structs. To do this, we can use the gcc_struct
attribute.

This is important, not only for porting to windows, but also potentially
for other platforms, as the bugs resulting from struct layout
differences are rather subtle and hard to find.

Signed-off-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Check for -z,defs, -z,relro, -fPIC, -fPIE before using them</title>
<updated>2017-08-18T20:29:46+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2017-08-18T10:41:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=07737584e73714eff3481fcf17f9f0331c8a5b88'/>
<id>07737584e73714eff3481fcf17f9f0331c8a5b88</id>
<content type='text'>
Those flags are not available on all platforms, and omitting them when
not available will not cause any harm. In particular:

-z,defs disallows undefined symbols in object files. This option is
unsupported if the target binary format enforces the same condition
already. Furthermore it is only a compile time sanity check. When it is
omitted, the same binary is produced.

-z,relro instructs the loader to mark sections read-only after loading
the library, where possible. This is a hardening mechanism. If it is
unavailable, the functionality of the code is not affected in any way.

-fPIC instructs the compiler to produce position independent code. While
this is preferable to relocatable code, relocatable code also works and
may even be faster. Relocatable code might just be loaded into memory
multiple times for different processes.

-fPIE is the same thing as -fPIC for executables rather than shared
libraries.

Signed-off-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Those flags are not available on all platforms, and omitting them when
not available will not cause any harm. In particular:

-z,defs disallows undefined symbols in object files. This option is
unsupported if the target binary format enforces the same condition
already. Furthermore it is only a compile time sanity check. When it is
omitted, the same binary is produced.

-z,relro instructs the loader to mark sections read-only after loading
the library, where possible. This is a hardening mechanism. If it is
unavailable, the functionality of the code is not affected in any way.

-fPIC instructs the compiler to produce position independent code. While
this is preferable to relocatable code, relocatable code also works and
may even be faster. Relocatable code might just be loaded into memory
multiple times for different processes.

-fPIE is the same thing as -fPIC for executables rather than shared
libraries.

Signed-off-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>backends: Don't depend on linux/bpf.h to compile bpf disassembler.</title>
<updated>2017-07-24T10:06:14+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2017-07-18T12:12:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=1609679b1ef3611c71a08900c2f6b94bb97d454d'/>
<id>1609679b1ef3611c71a08900c2f6b94bb97d454d</id>
<content type='text'>
We only need a few constants and one structure definition from linux/bpf.
Just define those in a local lib/bpf.h file. This makes sure the bpf
disassembler is always build and included even when elfutils is build
on older GNU/Linux systems (and even on other platforms).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We only need a few constants and one structure definition from linux/bpf.
Just define those in a local lib/bpf.h file. This makes sure the bpf
disassembler is always build and included even when elfutils is build
on older GNU/Linux systems (and even on other platforms).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add EXEEXT to gendis</title>
<updated>2017-04-26T15:22:15+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2017-04-20T15:02:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=28149ca8173a49c6c4fcc3a3eb919bb2420517be'/>
<id>28149ca8173a49c6c4fcc3a3eb919bb2420517be</id>
<content type='text'>
Otherwise the build will fail on systems that actually need file
extension for executables.

Signed-off-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise the build will fail on systems that actually need file
extension for executables.

Signed-off-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
