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

arm64 allyesconfig build failure with CONFIG_DYNAMIC_DEBUG_RELATIVE_POINTERS #456

Closed
nathanchance opened this issue Apr 25, 2019 · 8 comments
Assignees
Labels
[BUG] linux-next This is an issue only seen in linux-next [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle

Comments

@nathanchance
Copy link
Member

After commit 9d9247d08d72 ("arm64: select DYNAMIC_DEBUG_RELATIVE_POINTERS") and the previous patches, the build explodes.

Build log: https://gist.githubusercontent.com/nathanchance/56deb988c4fc4eb9b450bec4d1484ede/raw/15fb7bf95c09107eb086b81ebdad00ff036e973b/gistfile1.txt

Bisect log:

git bisect log
git bisect start
# good: [12a54b150fb5b6c2f3da932dc0e665355f8a5a48] Merge tag 'nfsd-5.1-1' of git://linux-nfs.org/~bfields/linux
git bisect good 12a54b150fb5b6c2f3da932dc0e665355f8a5a48
# bad: [c392798a85ab955fa9385e84da1a4110d462b7f0] Add linux-next specific files for 20190424
git bisect bad c392798a85ab955fa9385e84da1a4110d462b7f0
# good: [cfcc68ba6c712a457f1ad32a9902193e7ce273ef] Merge remote-tracking branch 'crypto/master'
git bisect good cfcc68ba6c712a457f1ad32a9902193e7ce273ef
# good: [5eb319eaa3373dff941b926739901b5b80ce6ccc] Merge remote-tracking branch 'spi/for-next'
git bisect good 5eb319eaa3373dff941b926739901b5b80ce6ccc
# good: [64048ab2129c661f6faf71a390aadfea04fcb202] Merge remote-tracking branch 'staging/staging-next'
git bisect good 64048ab2129c661f6faf71a390aadfea04fcb202
# good: [d20f1135d063896ab7f9707abad1363974fc8da4] Merge remote-tracking branch 'coresight/next'
git bisect good d20f1135d063896ab7f9707abad1363974fc8da4
# bad: [7a71919c6d480d62f5246b4fe64f9c236c9ac44f] autofs: add description of ignore pseudo mount option
git bisect bad 7a71919c6d480d62f5246b4fe64f9c236c9ac44f
# good: [f8efa622bb611613305e76d5b9f2f14811a929c5] mm: use mm_zero_struct_page from SPARC on all 64b architectures
git bisect good f8efa622bb611613305e76d5b9f2f14811a929c5
# good: [d21718f348b21d1b69a2954d9b32cd1fa8db1396] mm-move-buddy-list-manipulations-into-helpers-fix2
git bisect good d21718f348b21d1b69a2954d9b32cd1fa8db1396
# bad: [baa09d557536cf1fd951cf811e039d466da3d5ef] lib/sort: use more efficient bottom-up heapsort variant
git bisect bad baa09d557536cf1fd951cf811e039d466da3d5ef
# good: [6167b1f85d97daec7e3b863b5a5ee2e4c88699c6] linux/device.h: use unique identifier for each struct _ddebug
git bisect good 6167b1f85d97daec7e3b863b5a5ee2e4c88699c6
# bad: [9d9247d08d7269d9772bd5c3af9e642a3c1bd8bc] arm64: select DYNAMIC_DEBUG_RELATIVE_POINTERS
git bisect bad 9d9247d08d7269d9772bd5c3af9e642a3c1bd8bc
# good: [999b10c70f31c81345ca76381e2ed481d1b79704] lib/dynamic_debug.c: drop use of bitfields in struct _ddebug
git bisect good 999b10c70f31c81345ca76381e2ed481d1b79704
# good: [0adc0fccea2301a923f0c5db0120851b7f2805b5] lib/dynamic_debug.c: add asm-generic implementation for DYNAMIC_DEBUG_RELATIVE_POINTERS
git bisect good 0adc0fccea2301a923f0c5db0120851b7f2805b5
# good: [6c5c9318c1d396a0274992c923127e2e20b5b08a] x86_64: select DYNAMIC_DEBUG_RELATIVE_POINTERS
git bisect good 6c5c9318c1d396a0274992c923127e2e20b5b08a
# first bad commit: [9d9247d08d7269d9772bd5c3af9e642a3c1bd8bc] arm64: select DYNAMIC_DEBUG_RELATIVE_POINTERS
@nathanchance nathanchance added [BUG] Untriaged Something isn't working [BUG] linux-next This is an issue only seen in linux-next labels Apr 25, 2019
@nickdesaulniers
Copy link
Member

cc @Villemoes

@nickdesaulniers
Copy link
Member

/home/nathan/cbl/linux-next/init/initramfs.c:477:3: error: invalid operand in inline asm: '.ifndef __UNIQUE_ID_ddebug18.pushsection __verbose,"aw".type __UNIQUE_ID_ddebug18, STT_OBJECT.size __UNIQUE_ID_ddebug18, ${5:c}1:__UNIQUE_ID_ddebug18:	.int ${0:c} - 1b /* _ddebug::modname_disp */	.int ${1:c} - 1b /* _ddebug::function_disp */	.int ${2:c} - 1b /* _ddebug::filename_disp */	.int ${3:c} - 1b /* _ddebug::format_disp */	.int ${4:c}      /* _ddebug::flags_lineno */	.org 1b+${5:c}.popsection.set __UNIQUE_ID_ddebug18.ddebug.once, ${6:c}.elseif __UNIQUE_ID_ddebug18.ddebug.once - ${6:c}.line 477 - 1.error "'__UNIQUE_ID_ddebug18' used as _ddebug identifier more than once".endif'

I think this is just another symptom of #449. Applying https://reviews.llvm.org/D60887 would confirm/deny.

@Villemoes
Copy link

Hm, yeah, it would be a bit too magical if that piece of asm not only worked across architectures, but also with assemblers other than gas. The trivial temporary fix is to append "if CC_IS_GCC" to the "select DYNAMIC_DEBUG_RELATIVE_POINTERS" statements, perhaps just for arm64 if it seems to work for x86-64 (does clang do ppc64 at all?)

@nickdesaulniers
Copy link
Member

nickdesaulniers commented Apr 25, 2019

The trivial temporary fix

Or I could just land my LLVM patch (code reviewers taking their sweet time 🤡 )

does clang do ppc64 at all?

Yes; see our CI and @shenki's talk

@nathanchance
Copy link
Member Author

@nickdesaulniers Applying https://reviews.llvm.org/D60887 resolves this, thank you for pointing that out :)

We'll still probably want to add a if CLANG_VERSION >= 90000 || CC_IS_GCC to the arm64 and ppc select statements once that patch has landed so the build doesn't break with earlier versions of clang.

@nickdesaulniers nickdesaulniers removed the [BUG] Untriaged Something isn't working label Apr 29, 2019
@nickdesaulniers
Copy link
Member

nickdesaulniers commented Apr 29, 2019

@Villemoes sent 2 patches to fix this up:

@nickdesaulniers nickdesaulniers added the [PATCH] Submitted A patch has been submitted for review label Apr 29, 2019
@nickdesaulniers
Copy link
Member

Also, it seems that the 0day folks are re-engaging, which is good.

@nathanchance
Copy link
Member Author

nathanchance commented Jun 24, 2019

This has been fixed by dropping the patchset from -next and fixing it in a newer version: https://lore.kernel.org/r/20190617222034.10799-1-linux@rasmusvillemoes.dk/

Closing for now.

@nathanchance nathanchance added [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle and removed [PATCH] Submitted A patch has been submitted for review labels Jun 24, 2019
nathanchance pushed a commit that referenced this issue Oct 15, 2020
The interrupt may occur during the gadget deletion, it fixes the
below oops.

[ 2394.974604] configfs-gadget gadget: suspend
[ 2395.042578] configfs-gadget 5b130000.usb: unregistering UDC driver [g1]
[ 2395.382562] irq 229: nobody cared (try booting with the "irqpoll" option)
[ 2395.389362] CPU: 0 PID: 301 Comm: kworker/u12:6 Not tainted 5.8.0-rc3-next-20200703-00060-g2f13b83cbf30-dirty #456
[ 2395.399712] Hardware name: Freescale i.MX8QM MEK (DT)
[ 2395.404782] Workqueue: 2-0051 tcpm_state_machine_work
[ 2395.409832] Call trace:
[ 2395.412289]  dump_backtrace+0x0/0x1d0
[ 2395.415950]  show_stack+0x1c/0x28
[ 2395.419271]  dump_stack+0xbc/0x118
[ 2395.422678]  __report_bad_irq+0x50/0xe0
[ 2395.426513]  note_interrupt+0x2cc/0x38c
[ 2395.430355]  handle_irq_event_percpu+0x88/0x90
[ 2395.434800]  handle_irq_event+0x4c/0xe8
[ 2395.438640]  handle_fasteoi_irq+0xbc/0x168
[ 2395.442740]  generic_handle_irq+0x34/0x48
[ 2395.446752]  __handle_domain_irq+0x68/0xc0
[ 2395.450846]  gic_handle_irq+0x64/0x150
[ 2395.454596]  el1_irq+0xb8/0x180
[ 2395.457733]  __do_softirq+0xac/0x3b8
[ 2395.461310]  irq_exit+0xc0/0xe0
[ 2395.464448]  __handle_domain_irq+0x6c/0xc0
[ 2395.468540]  gic_handle_irq+0x64/0x150
[ 2395.472295]  el1_irq+0xb8/0x180
[ 2395.475436]  _raw_spin_unlock_irqrestore+0x14/0x48
[ 2395.480232]  usb_gadget_disconnect+0x120/0x140
[ 2395.484678]  usb_gadget_remove_driver+0xb4/0xd0
[ 2395.489208]  usb_del_gadget+0x6c/0xc8
[ 2395.492872]  cdns3_gadget_exit+0x5c/0x120
[ 2395.496882]  cdns3_role_stop+0x60/0x90
[ 2395.500634]  cdns3_role_set+0x64/0xd8
[ 2395.504301]  usb_role_switch_set_role.part.0+0x3c/0x90
[ 2395.509444]  usb_role_switch_set_role+0x20/0x30
[ 2395.513978]  tcpm_mux_set+0x60/0xf8
[ 2395.517470]  tcpm_reset_port+0xa4/0xf0
[ 2395.521222]  tcpm_detach.part.0+0x44/0x50
[ 2395.525227]  tcpm_state_machine_work+0x8b0/0x2360
[ 2395.529932]  process_one_work+0x1c8/0x470
[ 2395.533939]  worker_thread+0x50/0x420
[ 2395.537603]  kthread+0x148/0x168
[ 2395.540830]  ret_from_fork+0x10/0x18
[ 2395.544399] handlers:
[ 2395.546671] [<000000008dea28da>] cdns3_wakeup_irq
[ 2395.551375] [<000000009fee5c61>] cdns3_drd_irq threaded [<000000005148eaec>] cdns3_drd_thread_irq
[ 2395.560255] Disabling IRQ #229
[ 2395.563454] configfs-gadget gadget: unbind function 'Mass Storage Function'/000000000132f835
[ 2395.563657] configfs-gadget gadget: unbind
[ 2395.563917] udc 5b130000.usb: releasing '5b130000.usb'

Fixes: 7733f6c ("usb: cdns3: Add Cadence USB3 DRD Driver")
Cc: <stable@vger.kernel.org>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[BUG] linux-next This is an issue only seen in linux-next [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle
Projects
None yet
Development

No branches or pull requests

3 participants