<feed xmlns='http://www.w3.org/2005/Atom'>
<title>efi-boot-shim.git/include/compiler.h, branch rolling</title>
<subtitle> (mirror of https://github.com/vyos/efi-boot-shim.git)
</subtitle>
<id>https://git.amelek.net/vyos/efi-boot-shim.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/efi-boot-shim.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/'/>
<updated>2025-02-24T20:22:28+00:00</updated>
<entry>
<title>compiler.h: minor ALIGN_... fixes</title>
<updated>2025-02-24T20:22:28+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2024-06-27T19:16:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=765f2944fb392be2e8f76f3503ae7ceab301fea4'/>
<id>urn:sha1:765f2944fb392be2e8f76f3503ae7ceab301fea4</id>
<content type='text'>
This fixes some minor errors with the testing of how ALIGN() and similar
are defined, and makes an explicit "ALIGN_UP()" macro to complement the
existing ALIGN_DOWN() macro.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>includes: work around CLANG_PREREQ() double-definition</title>
<updated>2024-12-17T18:35:41+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2024-12-17T16:00:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=5f541823991d26f80f66f6e8e188c7cb246fe316'/>
<id>urn:sha1:5f541823991d26f80f66f6e8e188c7cb246fe316</id>
<content type='text'>
Right now when doing test builds with clang, we wind up getting an error
from two different definitions of CLANG_PREREQ() in the headers.

It might be that we can just rip one of these out, but for now I'm just
making one of them conditional.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>pe-relocate: Avoid __builtin_add_overflow() on GCC &lt; 5</title>
<updated>2024-01-22T19:17:20+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2023-12-06T22:07:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=13abd9f51b285db7eb46bf375cae623bf1153404'/>
<id>urn:sha1:13abd9f51b285db7eb46bf375cae623bf1153404</id>
<content type='text'>
GCC 4 doesn't have __builtin_add_overflow() and friends, so this results
in a compiler error.

On platforms using that version, do the arithmetic without it.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Add primitives for overflow-checked arithmetic operations.</title>
<updated>2023-12-05T18:17:19+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2023-07-27T19:13:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=f27182695d88350b48c8b9a6dce54bb513d7aa4e'/>
<id>urn:sha1:f27182695d88350b48c8b9a6dce54bb513d7aa4e</id>
<content type='text'>
We need to do arithmetic on untrusted values sometimes, so this patch
adds the following primitives as macros that wrap the compiler builtins.

  bool checked_add(TYPE addend0, TYPE addend1, TYPE *sum)
  bool checked_sub(TYPE minuend, TYPE subtrahend, TYPE *difference)
  bool checked_mul(TYPE factor0, TYPE factor1, TYPE *product)

And also the following primitive which returns True if divisor is 0 and
False otherwise:

  bool checked_div(TYPE dividend, TYPE divisor, TYPE *quotient)

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>shim: Flush the memory region from i-cache before execution</title>
<updated>2022-10-04T17:53:11+00:00</updated>
<author>
<name>dann frazier</name>
<email>dann.frazier@canonical.com</email>
</author>
<published>2022-09-06T15:28:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=5c537b3d0cf8c393dad2e61d49aade68f3af1401'/>
<id>urn:sha1:5c537b3d0cf8c393dad2e61d49aade68f3af1401</id>
<content type='text'>
We've seen crashes in early GRUB code on an ARM Cortex-A72-based
platform that point at seemingly harmless instructions. Flushing
the i-cache of those instructions prior to executing has been
shown to avoid the problem, which has parallels with this story:
  https://www.mail-archive.com/osv-dev@googlegroups.com/msg06203.html

Add a cache flushing utility function and provide an implementation
using a GCC intrinsic. This will need to be extended to support other
compilers. Note that this intrinsic is a no-op for x86 platforms.

This fixes issue #498.

Signed-off-by: dann frazier &lt;dann.frazier@canonical.com&gt;
</content>
</entry>
<entry>
<title>Give the Coverity scanner some more GCC blinders...</title>
<updated>2022-05-23T20:49:53+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2022-05-19T19:55:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=aa61fdf490d16aaa23de0cbe5e9f16d3bc72e582'/>
<id>urn:sha1:aa61fdf490d16aaa23de0cbe5e9f16d3bc72e582</id>
<content type='text'>
Coverity complains:

  CID 373676 (#3 of 3): Unrecoverable parse warning (PARSE_ERROR)
  1. arguments_provided_for_attribute: attribute "__malloc__" does not take arguments

This is, of course, just plain wrong.  Even so, I'm tired of looking at
it, so this patch wraps the #define we use for that attribute in a check
to see if it's being built by Coverity.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Fix compilation for older gcc</title>
<updated>2021-03-10T21:41:32+00:00</updated>
<author>
<name>Alex Burmashev</name>
<email>alexander.burmashev@oracle.com</email>
</author>
<published>2021-03-10T13:49:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=4033d1fd0f25196f9a35e944679676277cd51960'/>
<id>urn:sha1:4033d1fd0f25196f9a35e944679676277cd51960</id>
<content type='text'>
Signed-off-by: Alex Burmashev &lt;alexander.burmashev@oracle.com&gt;
</content>
</entry>
<entry>
<title>Consolidate most of our standard lib functions to lib</title>
<updated>2021-03-10T20:54:20+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2021-03-09T16:54:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=766aac4d5cfbe76026be5ce718b0883ee211f323'/>
<id>urn:sha1:766aac4d5cfbe76026be5ce718b0883ee211f323</id>
<content type='text'>
Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>compiler.h: fix a typo and add some more function attribute macros</title>
<updated>2021-02-25T15:15:14+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2021-02-22T17:03:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=c1722924cee57e1eb27cad656baf079bf809b8f6'/>
<id>urn:sha1:c1722924cee57e1eb27cad656baf079bf809b8f6</id>
<content type='text'>
This fixes the ifndef guard on NONNULL and __CONCAT3 and adds
definitions for:
- __CONCAT() for a##b with the intermediate tokenization step
- ALLOCFUNC for __malloc__
- DEPRECATED for __deprecated__
- PURE for __pure__
- RETURNS_NONNULL for __nonnull__

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Make sure MIN() and MAX() are always defined.</title>
<updated>2021-02-16T08:12:48+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2020-12-10T16:24:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=9c64b6278c160e8db8c3d6b3f66803f3d5906074'/>
<id>urn:sha1:9c64b6278c160e8db8c3d6b3f66803f3d5906074</id>
<content type='text'>
Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
</feed>
