Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-efivar: List of commits

external/efivar


RSS
Rev. Time Author
ac61c4c nougat-x86 android-x86-7.1-r1 android-x86-7.1-r2 android-x86-7.1-r3 android-x86-7.1-r4 android-x86-7.1-r5 2018-01-12 12:31:18 Chih-Wei Huang

Android: inital porting of libefivar

The static library is linked by efibootmgr.

e668fe9 2017-12-05 07:46:13 Peter Jones

makeguids: use builtins for bswap() functions.

e04281e 2017-12-05 07:39:23 A. Wilcox

makeguids: Ensure compatibility with other libcs

The musl libc does not provide __bswap_constant_XX.
If <endian.h> does not provide these macros, use our own.

This fixes issue #84.

be657aa 2017-12-05 07:27:57 Peter Jones

Add NVDIMM-P support

d735fda 2017-12-05 07:27:25 Peter Jones

better error reports in linux and creator code

11834d0 2017-12-05 07:23:17 Peter Jones

fixup for 3a2a35f638e

95d3a27 2017-12-05 05:12:29 Peter Jones

add protocol guids list

3a2a35f 2017-12-05 00:47:12 Peter Jones

Add the external management mechanism guid

eb76603 2017-09-27 03:05:02 Peter Jones

efivarfs_set_variable(): don't test access before creating variables.

Coverity, possibly correctly (though it's hard to see what the resulting
problem would be in this case), believes checking access(path, F_OK)
before doing open(path, ...) is a TOCTOU error. And it arguably is,
except you have to be root to do this and we're operating entirely in
sysfs, so... hard to see how you could race it or what you could gain.
Maybe something at a higher level can be convinced to race stupidly if
you're calling libefivar. I dunno.

Anyway, attempt to fix it.

Signed-off-by: Peter Jones <pjones@redhat.com>

1f18f47 2017-09-27 02:47:59 Peter Jones

Work around coverity being stupid (CID 182336/REVERSE_INULL)

Coverity *really* doesn't like testing a string that's been previously
dereferenced, because they believe programs are written once and nothing
ever changes, and they don't believe common error paths should plan for
that to happen.

Thus, if you do:

int
foo(void)
{
int ret = -1, rc;
char *path = NULL;

rc = asprintf(&path, "foo");
if (rc < 0)
return -1; // because this is return, not goto err ...

// lots of stuff ...
if (rc < 0)
goto err; // ... and this is goto err ...

// stuff ...
ret = 0;
err:
if (path) // ... CID 182336 (REVERSE_INULL) triggers here
free(path);
return ret;
}

Even though this is perfectly reasonable code that does not contain any
actual bugs, coverity's REVERSE_INULL check complains about the test on
path. This isn't a complaint about the code - it's an error message
about coverity's inability to infer why you've done it. And why you've
done it is so that if the code above changes, the error path doesn't
suddenly become unsafe.

So change the error path usage so that it will also jump to the common
error path, which is completely unnecessary, when path could be NULL.

Yes, this is stupid.

Signed-off-by: Peter Jones <pjones@redhat.com>

c8c7df1 2017-09-27 02:43:45 Peter Jones

efivar: prepare_data(): check for invalid filename.

Signed-off-by: Peter Jones <pjones@redhat.com>

d91f28d 2017-09-27 02:21:59 Peter Jones

Make a checker for coverity being installed

Signed-off-by: Peter Jones <pjones@redhat.com>

03a9e81 2017-09-27 02:04:33 David Cantrell

Remove popt-devel from BuildRequires in the spec file.

Signed-off-by: David Cantrell <david.l.cantrell@gmail.com>

4613a8e 2017-09-27 02:04:33 David Cantrell

Remove PKGS=popt from src/Makefile

Signed-off-by: David Cantrell <david.l.cantrell@gmail.com>

1aec5e7 2017-09-27 02:04:33 David Cantrell

Replace popt usage with getopt_long in efivar.c.

efivar does not make use of popt in a way that really requires the
dependency. Since this is a low level system utility, it's possible
some system builders want to reduce redundant libraries they need to
build and install. popt is arguably redundant with getopt_long. It's
possible to just drop long option handling entirely so it works with
plain old getopt. The intent with this patch was to provide the same
command line options but just using what the C library provides rather
than popt.

The attributes variable in main() has also been changed to a uint32_t
size and sign consistency with its usage in edit_variable().

Signed-off-by: David Cantrell <david.l.cantrell@gmail.com>

bbd2b98 2017-09-27 02:04:05 rtlanceroad

test: Fix efivar.h location

When other bits of the source got fixed to use a different include path
for efivars, the test directory did not.

6a2c5b8 2017-09-27 02:02:56 Peter Jones

Revert "Enable C11 mode" (d7e8e4c6) and do it the right way.

This reverts commit d7e8e4c646ff02ec7e308998de5f2318d6607dbc.

We already have -std=gnu11 in gcc.specs, we just need it on the clang
side as well, so put it there.

Signed-off-by: Peter Jones <pjones@redhat.com>

1366afb 2017-09-26 05:30:19 Peter Jones

Make pkg-config test if CROSS_COMPILE applies...

Signed-off-by: Peter Jones <pjones@redhat.com>

8f326bd 2017-09-26 05:30:18 Peter Jones

Make.defaults: honor COMPILER to make CI easier.

Signed-off-by: Peter Jones <pjones@redhat.com>

e3fa2e4 2017-09-26 05:29:33 Peter Jones

add some travis CI bits here to see if it works

Signed-off-by: Peter Jones <pjones@redhat.com>

6667354 2017-09-26 03:50:38 Peter Jones

make: improve 'clean' target

Signed-off-by: Peter Jones <pjones@redhat.com>

361cb22 2017-09-26 01:30:32 Peter Jones

Make format_ucs2() not use a variable-length array.

Coverity complains (during the build, as a "recoverable" error):

"dp.h", line 134: warning #1234: a variable-length array is not allowed inside
of a statement expression
uint16_t _ucs2buf[(len)]; \
^

So don't do that.

Signed-off-by: Peter Jones <pjones@redhat.com>

647e819 2017-09-26 01:11:03 Peter Jones

Use fwupdate's Make.coverity instead of implementing it inline.

Signed-off-by: Peter Jones <pjones@redhat.com>

d7e8e4c 2017-09-26 00:49:41 Gabriel Majeri

Enable C11 mode

71f2fdd 2017-09-26 00:46:39 Gabriel Majeri

Do not warn on taking address of packed member

506821d 2017-09-26 00:46:39 Gabriel Majeri

Cast port to 16-bit integer

651cf8a 2017-09-26 00:46:39 Gabriel Majeri

Use `__typeof__` instead of `typeof`

907d0d0 2017-09-26 00:45:14 Gabriel Majeri

Improve __nonnull__ usage on clang

On gcc, we use the pragma "-Wnonnull-compare" to avoid GCC's complaints
of checking for NULL on a function marked with __nonnull__. This adds
clang's -Wpointer-bool-conversion to avoid the same kind of thing there.

42978fb 2017-09-26 00:38:08 Gabriel Majeri

Fix const to non-const pointer cast

e20ed1f 2017-09-26 00:31:45 Gabriel Majeri

Replace zero-length arrays with C99 flexible array member

Show on old repository browser