Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail more informatively when failing to set a variable #4

Closed
AdamWill opened this issue Feb 3, 2014 · 1 comment
Closed

Fail more informatively when failing to set a variable #4

AdamWill opened this issue Feb 3, 2014 · 1 comment

Comments

@AdamWill
Copy link

AdamWill commented Feb 3, 2014

As per Red Hat #952644, it's a known problem in the old efibootmgr that when it calls set_variable() and that fails, efibootmgr just fails silently. This means that downstream we get lots of bug reports that are fairly useless unless we can get the reporters to post their kernel logs - all we know is efibootmgr failed, for some reason.

As per IRC this morning, it sounds like the kernel is now returning useful enough information that efivar could fail more informatively in this case:

<pjones> adamw: eh, the errors we get back should be something we can work with actually, at least in linus's current tree (where I just looked)
<pjones> we just aren't yet.
<adamw> even in efivar?
<pjones> yeah

then efibootmgr, and consequently the whole anaconda/libreport military-industrial complex, could also fail more informatively, and we would all curse at bugzilla slightly less.

@vathpela
Copy link
Contributor

vathpela commented Feb 5, 2014

I think this should be fixed when I release efibootmgr 0.7 ; see vathpela#3 . If you've got ideas for how to be /more/ informative, feel free to reopen this and say what you'd like it to look like.

@vathpela vathpela closed this as completed Feb 5, 2014
hmtheboy154 added a commit to android-generic/external_efivar that referenced this issue Oct 8, 2023
Disable debugging will cause crash with a FORTIFY failure:

Abort message: 'FORTIFY: fprintf: null FILE*'
    rax 0000000000000000  rbx 0000000000000d14  rcx 00007c3d0749069f  rdx 0000000000000006
    r8  0000000000000000  r9  0000000000000000  r10 00007ffdefe13030  r11 0000000000000217
    r12 0000000000000000  r13 0000000000000000  r14 00007ffdefe13028  r15 0000000000000d14
    rdi 0000000000000d14  rsi 0000000000000d14
    rbp 000000000000009d  rsp 00007ffdefe13020  rip 00007c3d0749069f

backtrace:
      #00 pc 000000000005f69f  /apex/com.android.runtime/lib64/bionic/libc.so (abort+191) (BuildId: cbf2c6babf4ce509f78a7963e811ace3)
      rhboot#1 pc 00000000000612f0  /apex/com.android.runtime/lib64/bionic/libc.so (__fortify_fatal(char const*, ...)+160) (BuildId: cbf2c6babf4ce509f78a7963e811ace3)
      rhboot#2 pc 00000000000c5d9a  /apex/com.android.runtime/lib64/bionic/libc.so (fprintf+282) (BuildId: cbf2c6babf4ce509f78a7963e811ace3)
      rhboot#3 pc 000000000002bc72  /system/bin/efibootmgr (log_+178) (BuildId: 0e8d9a0cd8994623ec86c1005c9d5e8b)
      rhboot#4 pc 000000000002ab87  /system/bin/efibootmgr (_format_acpi_dn+583) (BuildId: 0e8d9a0cd8994623ec86c1005c9d5e8b)
      rhboot#5 pc 0000000000029f63  /system/bin/efibootmgr (efidp_format_device_path+515) (BuildId: 0e8d9a0cd8994623ec86c1005c9d5e8b)
      rhboot#6 pc 000000000001a1a0  /system/bin/efibootmgr (show_vars+336) (BuildId: 0e8d9a0cd8994623ec86c1005c9d5e8b)
      rhboot#7 pc 0000000000018e3a  /system/bin/efibootmgr (main+7578) (BuildId: 0e8d9a0cd8994623ec86c1005c9d5e8b)
      rhboot#8 pc 0000000000050d19  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+89) (BuildId: cbf2c6babf4ce509f78a7963e811ace3)

So we need to bring debugging to Android. Our target to support is 11+ so we got memfd_create. Also
for fopencookie() we can use https://gitlab.com/Conan_Kudo/portable-fopencookie

This reverts commit 79c490e.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants