[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-06-06 Thread Timo Aaltonen
oh well, the fix came via stable backports, so marking verified ** Changed in: linux-oem-5.17 (Ubuntu) Status: Confirmed => Invalid ** Tags removed: verification-needed-jammy ** Tags added: verification-done-jammy -- You received this bug notification because you are a member of Ubuntu

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-06-03 Thread Timo Aaltonen
oem-5.17 verification missing -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes UBSAN error during kernel boot To manage notifications about this bug go

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-06-01 Thread Timo Aaltonen
the fix for oem-5.14 comes via stable updates ** Also affects: linux-oem-5.14 (Ubuntu) Importance: Undecided Status: New ** Also affects: linux (Ubuntu Focal) Importance: Undecided Status: New ** Also affects: linux-oem-5.14 (Ubuntu Focal) Importance: Undecided

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-31 Thread Kay-Michael Voit
I experience this with Ubuntu kernel 5.15.0-33, but not with 5.15.0-25. I installed the system with the latter, and then updated to the former, with which it stopped working. Selecting 5.15.0-25 in grub still works. -- You received this bug notification because you are a member of Ubuntu Bugs,

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-29 Thread bsdz
I followed instructions under the wiki (https://wiki.ubuntu.com/Testing/EnableProposed) using the "Developer Options" to enable pre-released updates (jammy-proposed); I then also followed section "Selective upgrading from -proposed" to set a pin- priority of 400. I then installed proposed kernel

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-27 Thread Ubuntu Kernel Bot
This bug is awaiting verification that the linux-oem-5.14/5.14.0-1040.44 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-20 Thread Ubuntu Kernel Bot
This bug is awaiting verification that the linux-oem-5.17/5.17.0-1006.6 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-18 Thread Mario Limonciello
https://www.kernel.org/doc/html/latest/process/submitting-patches.html You can use tags like "Suggested-by:" for the email of KH and bsdz. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title:

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-18 Thread populationless
How would I go about doing so, while giving credit to bsdz and you? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes UBSAN error during kernel boot To

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-15 Thread Kai-Heng Feng
Great! Please consider to send it to upstream mailing list. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes UBSAN error during kernel boot To manage

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-13 Thread populationless
OK, so far everything seems to be working great. Performance is good, no UBSAN messages, no other abnormalities. I think we are good now. ** Patch added: "aq_nic.c.patch" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958770/+attachment/5589555/+files/aq_nic.c.patch -- You received

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-13 Thread Kai-Heng Feng
Yes, that one looks correct. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes UBSAN error during kernel boot To manage notifications about this bug go

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-12 Thread populationless
Sorry. Like this? for (tc = 0U; tc < self->aq_nic_cfg.tcs; tc++) { for (i = 0U; self->aq_vecs > i; ++i) { aq_vec = self->aq_vec[i]; if (!aq_vec) break; data += count; count = aq_vec_get_sw_stats(aq_vec, tc, data); } } -- You received this bug notification because you are

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-12 Thread Kai-Heng Feng
The following two lines shouldn't be omitted: data += count; count = aq_vec_get_sw_stats(aq_vec, tc, data); -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-12 Thread populationless
I have implemented your suggestion, so far no issues. I'm going to kick off my backup now and do some more testing later. ** Patch added: "aq_nic.c.patch" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958770/+attachment/5589366/+files/aq_nic.c.patch -- You received this bug

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-12 Thread Kai-Heng Feng
I think that's a bit different to the original version, which breaks out the loop as soon as "aq_vec" evaluates to false. So, instead of if (aq_vec) { ... } Should be if (!aq_vec) break; -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-12 Thread populationless
Thank you @bsdz, compiles and works flawlessly since yesterday. UBSAN is happy, performance is as expected. @kaihengfeng, is this patch suitable for inclusion upstream? ** Patch added: "aq_nic.c.patch"

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-11 Thread bsdz
I think the last/3rd one might be rewritten like: for (tc = 0U; tc < self->aq_nic_cfg.tcs; tc++) { for (i = 0U; self->aq_vecs > i; ++i) { aq_vec = self->aq_vec[i]; if (aq_vec) { data += count;

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-11 Thread populationless
I have successfully modified two of the mentioned three functions and tested the module, so far UBSAN does not complain anymore :) Unfdortunately I can't rewrite the third function, since it does not match the pattern (and I have no idea what I'm doing) for (tc = 0U; tc < self->aq_nic_cfg.tcs;

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-11 Thread populationless
I tried changing the function, now the module doesn't compile. EDIT: Sorry, forgot to close the curly bracket... -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-10 Thread Kai-Heng Feng
Nice catch, mind to send a patch to fix it? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes UBSAN error during kernel boot To manage notifications about

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-10 Thread bsdz
Actually I took a look at the aq_nic.c and it looks like there are still places in the code that need patching to avoid UB. For example, from your dmesg I see it pointing to this section of code

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-09 Thread populationless
** Attachment added: "dmesg.log" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958770/+attachment/5588060/+files/dmesg.log -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title:

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-05-09 Thread populationless
Sorry for the delay, life happened... After mucking about with this for the past few days and not being able to get the module to compile on 5.15 for the life of me (always same error "implicit declaration of function ‘platform_get_ethdev_address’ [-Werror=implicit-function-declaration]"), I have

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-04-26 Thread bsdz
Just a couple of other suggestions. You can generate a patch file from the upstream kernel repo. eg cd linux-jammy curl https://github.com/torvalds/linux/commit/8d3a6c37d50d5a0504c126c932cc749e6dd9c78f.patch -o ./atlantic.patch git diff git apply ./atlantic.patch git diff I was wrong about

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-04-26 Thread populationless
I'm not 100% sure if I loaded the new module correctly, but I believe that I did. Here are the steps I took to compile the module and load it, which resulted in the output of #21: git clone git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy linux-jammy cd linux-jammy/ uname

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-04-25 Thread bsdz
This might be fixed in a future kernel release. I see the above patches in github (18 days old). https://github.com/torvalds/linux/commit/8d3a6c37d50d5a0504c126c932cc749e6dd9c78f I can see aq_vec_stop in your stack trace and I can see the above patch addresses that frame. That said, are you

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-04-25 Thread populationless
I'm gonna chime in too. I have applied both patches from #18 and #20 and recompiled the module, however I still get the UBSAN: array-index-out- of-bounds messsage. NIC seems to work though. I am not a programmer, so unfortunately I can't come up with a solution, but I am willing to test. Kernel:

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-04-08 Thread Mario Limonciello
** Also affects: linux-oem-5.17 (Ubuntu) Importance: Undecided Status: New ** Changed in: linux-oem-5.17 (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-03-04 Thread bsdz
Patch as file. ** Patch added: "aq_nic.patch" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958770/+attachment/5565904/+files/aq_nic.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-03-04 Thread bsdz
This new patch doesn't appear to resolve issue either. However, I did get it to work if I extended your technique to aq_nic.c. See following comment with patch. Then I see the following in my dmesg: [ 2991.604548] atlantic :07:00.0 enp7s0: renamed from eth0 -- You received this bug

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-03-04 Thread Kai-Heng Feng
Please try this one: https://lore.kernel.org/netdev/20220304050812.7472-1-kai.heng.f...@canonical.com/ which converts all the usage pattern to a safer form. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-03-04 Thread bsdz
Oh I forgot to add that i also applied the patch before compiling. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes UBSAN error during kernel boot To

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-03-04 Thread bsdz
This doesn't seem to resolve it for me. It's been a long time since I recompiled kernel modules, these are the steps I took: # module compile instructions from https://wiki.ubuntu.com/Kernel/SourceCode $ uname -r 5.15.0-18-generic $ git clone

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-03-03 Thread Mario Limonciello
@KH: Yeah that fixes it for me. I applied on top of a 5.15 kernel and would have seen UBSAN error at bootup. Feel free to added a "Tested-by: Mario Limonciello " tag for it when you submit up if you don't change it. -- You received this bug notification because you are a member of Ubuntu

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-03-03 Thread Ubuntu Foundations Team Bug Bot
** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes UBSAN error during kernel boot To manage notifications about this bug go to:

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-03-02 Thread Kai-Heng Feng
Please give this patch a try, thanks! ** Patch added: "0001-net-atlantic-Fix-LP-1958770.patch" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958770/+attachment/5565201/+files/0001-net-atlantic-Fix-LP-1958770.patch -- You received this bug notification because you are a member of

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-03-01 Thread Mario Limonciello
I checked on 5.17-rc3 most recently and reproduced it. AFAICT this code hasn't changed since 5.16-rc4. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-03-01 Thread Kai-Heng Feng
Does latest mainline kernel have this issue? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes UBSAN error during kernel boot To manage notifications

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-02-24 Thread bsdz
This bug returned on my machine. Not sure why it disappeared & reappeared. Also now on 5.15.0-18-generic. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-01-30 Thread Mario Limonciello
Out of bounds still happens to me in 5.15.0-18.18. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes UBSAN error during kernel boot To manage

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-01-29 Thread bsdz
My system seems to be working now. My dmesg shows the driver as loading: [1.439880] atlantic :07:00.0 enp7s0: renamed from eth0 I had some problems with my distribution upgrade and had to re-run it, ie "apt dist-upgrade" along with other commands. -- You received this bug notification

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-01-28 Thread Sigmund Ørjavik
reverted to 5.13.0-28-generic from impish and aqc107 is still broken. is this caused by some updated firmware blob in jammy? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-01-27 Thread Sigmund Ørjavik
Updated to 5.15.0-18-generic and now the network adapter doesn't work at all. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title: Aquantia GbE LAN driver causes UBSAN error during kernel

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-01-27 Thread Sigmund Ørjavik
lspci logfile ** Attachment added: "lspci logfile" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958770/+attachment/5557857/+files/lspci-vvnn.log -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-01-27 Thread Sigmund Ørjavik
uname logfile ** Attachment added: "uname logfile" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958770/+attachment/5557858/+files/uname-a.log -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-01-27 Thread Sigmund Ørjavik
dmesg logfile ** Attachment added: "dmesg.log" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958770/+attachment/5557856/+files/dmesg.log -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-01-27 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: linux (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1958770 Title:

[Bug 1958770] Re: Aquantia GbE LAN driver causes UBSAN error during kernel boot

2022-01-27 Thread Sigmund Ørjavik
Same in my system: [ 294.432996] UBSAN: array-index-out-of-bounds in /build/linux-Qow4fL/linux-5.15.0/drivers/net/ethernet/aquantia/atlantic/aq_nic.c:484:48 [ 294.433695] index 8 is out of range for type 'aq_vec_s *[8]' [ 294.434372] CPU: 5 PID: 1341 Comm: systemd-network Tainted: P