-
Notifications
You must be signed in to change notification settings - Fork 55
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
common/partitions/efi: fix gpt detection #6
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On some boards (such as i.MX) the buffer might contain both: A barebox image *and* a GPT partition table. Thus, irrelevant filetypes should be ignored.
Pulled |
shcgit
added a commit
to shcgit/barebox-github
that referenced
this pull request
Oct 13, 2020
This patch fixes the parsing of the display timings options if the range is specified (min/typ/max). Also fixed the double release of memory in case of failure. barebox 2018.12.0-00341-g23b28d33a-dirty barebox#6 Fri Mar 15 09:20:25 MSK 2019 Board: Mega-Milas Informer i.MX6 detected i.MX6 Quad revision 1.2 i.MX reset reason POR (SRSR: 0x00000001) mdio_bus: miibus0: probed eth0: got preset MAC address: 50:2d:f4:07:71:0b nand: NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit), 1024MiB, page size: 2048, OOB size: 64 Bad block table found at page 524224, version 0x01 Bad block table found at page 524160, version 0x01 m25p80 flash@00: n25q128a13 (16384 Kbytes) imx-usb 2184000.usb@2184000: USB EHCI 1.00 imx-usb 2184200.usb@2184200: USB EHCI 1.00 imx-esdhc 2198000.usdhc@2198000: registered as mmc2 imx-ipuv3 2400000.ipu@2400000: IPUv3H probed ERROR: /ldb/lvds-channel@0/display-timings/PH320240T: illegal timing specification in clock-frequency ERROR: /ldb/lvds-channel@0/display-timings/PH320240T: error reading timing properties ERROR: /ldb/lvds-channel@0: error in timing 1 ERROR: unable to handle NULL pointer dereference at address 0x00000013 pc : [<4fe05742>] lr : [<4fe05849>] sp : 4ffefa80 ip : ffffffff fp : 2fefe84c r10: 2ff656e8 r9 : 0000002c r8 : 2ff19630 r7 : 00000000 r6 : 0000004c r5 : 2ff65960 r4 : 00000007 r3 : 00000013 r2 : 00000000 r1 : 4fe87584 r0 : 2fefb460 Flags: nzcv IRQs off FIQs off Mode SVC_32 [<4fe05742>] (remove_free_block+0xe/0x3e) from [<4fe05849>] (block_locate_free+0x7f/0x88) [<4fe05849>] (block_locate_free+0x7f/0x88) from [<4fe0599b>] (tlsf_malloc+0x17/0x32) [<4fe0599b>] (tlsf_malloc+0x17/0x32) from [<4fe0559b>] (malloc+0x13/0x24) [<4fe0559b>] (malloc+0x13/0x24) from [<4fe3a1f3>] (strdup+0x11/0x22) [<4fe3a1f3>] (strdup+0x11/0x22) from [<4fe006f3>] (pr_puts+0x33/0x84) [<4fe006f3>] (pr_puts+0x33/0x84) from [<4fe00803>] (dev_printf+0x6f/0x8c) [<4fe00803>] (dev_printf+0x6f/0x8c) from [<00000000>] (0x0) [<4fe54715>] (unwind_backtrace+0x1/0x60) from [<4fe00de1>] (panic+0x1d/0x34) [<4fe00de1>] (panic+0x1d/0x34) from [<4fe5285d>] (do_exception+0xd/0x10) [<4fe5285d>] (do_exception+0xd/0x10) from [<4fe528bd>] (do_data_abort+0x21/0x2c) [<4fe528bd>] (do_data_abort+0x21/0x2c) from [<4fe524d4>] (do_abort_6+0x48/0x54) ### ERROR ### Please RESET the board ### Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
saschahauer
pushed a commit
that referenced
this pull request
Mar 22, 2021
For the sandbox architecture, we use __sanitizer_start_switch_fiber and __sanitizer_finish_switch_fiber to tell ASan when we switch stacks. If we don't, ASan complains that: ==2472828==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0xff9fc000; bottom 0xf3be8000; size: 0x0be14000 (199311360) False positive error reports may follow For details see google/sanitizers#189 This works on 64-bit sandbox, but 32-bit sandbox currently crashes on bthread -v: ==2469590==AddressSanitizer CHECK failed: ../../../../../src/libsanitizer/asan/asan_poisoning.cpp:37 "((AddrIsAlignedByGranularity(addr + size))) != (0)" (0x0, 0x0) #0 0xf7a4aa46 in AsanCheckFailed ../../../../../src/libsanitizer/asan/asan_rtl.cpp:73 #1 0xf7a6b5cf in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) ../../../../../src/libsanitizer/sanitizer_common/sanitizer_termination.cpp:78 #2 0xf7a4489f in __asan::PoisonShadow(unsigned long, unsigned long, unsigned char) ../../../../../src/libsanitizer/asan/asan_poisoning.cpp:37 #3 0xf7a4c81b in __asan_handle_no_return ../../../../../src/libsanitizer/asan/asan_rtl.cpp:595 #4 0x566a1ce7 in bthread_schedule /home/a3f/dl/barebox-stm32mp/common/bthread.c:178 #5 0x566a1d54 in bthread_reschedule /home/a3f/dl/barebox-stm32mp/common/bthread.c:165 #6 0x566a1d80 in bthread_trampoline /home/a3f/dl/barebox-stm32mp/common/bthread.c:56 #7 0x567f5bfb in coroutine_bootstrap (/home/a3f/dl/build/barebox/sandbox/barebox+0x1bdbfb) #8 0x567f5c4b in coroutine_trampoline (/home/a3f/dl/build/barebox/sandbox/barebox+0x1bdc4b) #9 0xf7f7056f (linux-gate.so.1+0x56f) #10 0xf7f70558 (linux-gate.so.1+0x558) #11 0x56892fff (/home/a3f/dl/build/barebox/sandbox/barebox+0x25afff) Just disable the special ASan accounting there until this is figured out. bthreads still function there, but ASan may yield false positives according to the message. This does not affect non-sandbox platforms. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
saschahauer
pushed a commit
that referenced
this pull request
Mar 24, 2021
For the sandbox architecture, we use __sanitizer_start_switch_fiber and __sanitizer_finish_switch_fiber to tell ASan when we switch stacks. If we don't, ASan complains that: ==2472828==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0xff9fc000; bottom 0xf3be8000; size: 0x0be14000 (199311360) False positive error reports may follow For details see google/sanitizers#189 This works on 64-bit sandbox, but 32-bit sandbox currently crashes on bthread -v: ==2469590==AddressSanitizer CHECK failed: ../../../../../src/libsanitizer/asan/asan_poisoning.cpp:37 "((AddrIsAlignedByGranularity(addr + size))) != (0)" (0x0, 0x0) #0 0xf7a4aa46 in AsanCheckFailed ../../../../../src/libsanitizer/asan/asan_rtl.cpp:73 #1 0xf7a6b5cf in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) ../../../../../src/libsanitizer/sanitizer_common/sanitizer_termination.cpp:78 #2 0xf7a4489f in __asan::PoisonShadow(unsigned long, unsigned long, unsigned char) ../../../../../src/libsanitizer/asan/asan_poisoning.cpp:37 #3 0xf7a4c81b in __asan_handle_no_return ../../../../../src/libsanitizer/asan/asan_rtl.cpp:595 #4 0x566a1ce7 in bthread_schedule /home/a3f/dl/barebox-stm32mp/common/bthread.c:178 #5 0x566a1d54 in bthread_reschedule /home/a3f/dl/barebox-stm32mp/common/bthread.c:165 #6 0x566a1d80 in bthread_trampoline /home/a3f/dl/barebox-stm32mp/common/bthread.c:56 #7 0x567f5bfb in coroutine_bootstrap (/home/a3f/dl/build/barebox/sandbox/barebox+0x1bdbfb) #8 0x567f5c4b in coroutine_trampoline (/home/a3f/dl/build/barebox/sandbox/barebox+0x1bdc4b) #9 0xf7f7056f (linux-gate.so.1+0x56f) #10 0xf7f70558 (linux-gate.so.1+0x558) #11 0x56892fff (/home/a3f/dl/build/barebox/sandbox/barebox+0x25afff) Just disable the special ASan accounting there until this is figured out. bthreads still function there, but ASan may yield false positives according to the message. This does not affect non-sandbox platforms. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
shcgit
added a commit
to shcgit/barebox-github
that referenced
this pull request
Apr 14, 2022
This patch fixes the parsing of the display timings options if the range is specified (min/typ/max). Also fixed the double release of memory in case of failure. barebox 2018.12.0-00341-g23b28d33a-dirty barebox#6 Fri Mar 15 09:20:25 MSK 2019 Board: Mega-Milas Informer i.MX6 detected i.MX6 Quad revision 1.2 i.MX reset reason POR (SRSR: 0x00000001) mdio_bus: miibus0: probed eth0: got preset MAC address: 50:2d:f4:07:71:0b nand: NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit), 1024MiB, page size: 2048, OOB size: 64 Bad block table found at page 524224, version 0x01 Bad block table found at page 524160, version 0x01 m25p80 flash@00: n25q128a13 (16384 Kbytes) imx-usb 2184000.usb@2184000: USB EHCI 1.00 imx-usb 2184200.usb@2184200: USB EHCI 1.00 imx-esdhc 2198000.usdhc@2198000: registered as mmc2 imx-ipuv3 2400000.ipu@2400000: IPUv3H probed ERROR: /ldb/lvds-channel@0/display-timings/PH320240T: illegal timing specification in clock-frequency ERROR: /ldb/lvds-channel@0/display-timings/PH320240T: error reading timing properties ERROR: /ldb/lvds-channel@0: error in timing 1 ERROR: unable to handle NULL pointer dereference at address 0x00000013 pc : [<4fe05742>] lr : [<4fe05849>] sp : 4ffefa80 ip : ffffffff fp : 2fefe84c r10: 2ff656e8 r9 : 0000002c r8 : 2ff19630 r7 : 00000000 r6 : 0000004c r5 : 2ff65960 r4 : 00000007 r3 : 00000013 r2 : 00000000 r1 : 4fe87584 r0 : 2fefb460 Flags: nzcv IRQs off FIQs off Mode SVC_32 [<4fe05742>] (remove_free_block+0xe/0x3e) from [<4fe05849>] (block_locate_free+0x7f/0x88) [<4fe05849>] (block_locate_free+0x7f/0x88) from [<4fe0599b>] (tlsf_malloc+0x17/0x32) [<4fe0599b>] (tlsf_malloc+0x17/0x32) from [<4fe0559b>] (malloc+0x13/0x24) [<4fe0559b>] (malloc+0x13/0x24) from [<4fe3a1f3>] (strdup+0x11/0x22) [<4fe3a1f3>] (strdup+0x11/0x22) from [<4fe006f3>] (pr_puts+0x33/0x84) [<4fe006f3>] (pr_puts+0x33/0x84) from [<4fe00803>] (dev_printf+0x6f/0x8c) [<4fe00803>] (dev_printf+0x6f/0x8c) from [<00000000>] (0x0) [<4fe54715>] (unwind_backtrace+0x1/0x60) from [<4fe00de1>] (panic+0x1d/0x34) [<4fe00de1>] (panic+0x1d/0x34) from [<4fe5285d>] (do_exception+0xd/0x10) [<4fe5285d>] (do_exception+0xd/0x10) from [<4fe528bd>] (do_data_abort+0x21/0x2c) [<4fe528bd>] (do_data_abort+0x21/0x2c) from [<4fe524d4>] (do_abort_6+0x48/0x54) ### ERROR ### Please RESET the board ###
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On some boards (such as i.MX) the buffer might contain both:
A barebox image and a GPT partition table.
Thus, irrelevant filetypes should be ignored.