Skip to content

Add Netconsole Support as a Module - #113

Closed
aeshra wants to merge 1 commit into
ni:nilrt/master/5.15from
aeshra:patch-1
Closed

aeshra wants to merge 1 commit into
ni:nilrt/master/5.15from
aeshra:patch-1

Conversation

@aeshra

@aeshra aeshra commented Apr 24, 2023

Copy link
Copy Markdown

No description provided.

@bstreiff bstreiff self-assigned this Apr 24, 2023
@bstreiff

Copy link
Copy Markdown
Contributor

Hi @aeshra,

I see a couple problems with this commit:

  1. commit style - we follow the upstream Linux style standards for commits, which means
    • commit should have a subject line that indicates what subsystem it modifies and a short summary
    • commit should have a short description describing what it's doing and why
    • commit should be properly Signed-off-by.
    • for examples of defconfig updates specifically, look at baa47c5 or 9f2c2bb
  2. the lines that you've added look to be out of order. The usual flow for making a change to defconfigs would be:
    • make nati_x86_64_defconfig
    • (make your changes to .config either via a text editor, make menuconfig, or what have you)
    • make savedefconfig
    • cp defconfig arch/x86/configs/nati_x86_64_defconfig

Please correct these and then submit an update to this PR. Thanks!

@aeshra
aeshra marked this pull request as draft April 25, 2023 17:42
@aeshra

aeshra commented Apr 25, 2023

Copy link
Copy Markdown
Author

Hello @bstreiff,

Thanks for your patience, it is my first time submitting a request.

I have made another pull request with the correct procedure #114, and will close this one after the other one is approved.

Thanks for your help.

@bstreiff

Copy link
Copy Markdown
Contributor

For future reference: You can force-push into your own branch (the patch-1 branch on aeshra/linux) to replace the commits in the PR there, and that updates this PR. It's not necessary to create a new PR for each revision.

I'll close this one and we can continue in #114.

@bstreiff bstreiff closed this Apr 25, 2023
@aeshra
aeshra deleted the patch-1 branch April 25, 2023 21:37
gratian pushed a commit that referenced this pull request May 11, 2026
[ Upstream commit 34b11cc56e4369bc08b1f4c4a04222d75ed596ce ]

If hardware doesn't support RX Flow Filters, rx_fs_lock spinlock is not
initialized leading to the following assertion splat triggerable via
set_rxnfc callback.

INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 1 PID: 949 Comm: syz.0.6 Not tainted 6.1.164+ #113
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x8d/0xba lib/dump_stack.c:106
 assign_lock_key kernel/locking/lockdep.c:974 [inline]
 register_lock_class+0x141b/0x17f0 kernel/locking/lockdep.c:1287
 __lock_acquire+0x74f/0x6c40 kernel/locking/lockdep.c:4928
 lock_acquire kernel/locking/lockdep.c:5662 [inline]
 lock_acquire+0x190/0x4b0 kernel/locking/lockdep.c:5627
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x33/0x50 kernel/locking/spinlock.c:162
 gem_del_flow_filter drivers/net/ethernet/cadence/macb_main.c:3562 [inline]
 gem_set_rxnfc+0x533/0xac0 drivers/net/ethernet/cadence/macb_main.c:3667
 ethtool_set_rxnfc+0x18c/0x280 net/ethtool/ioctl.c:961
 __dev_ethtool net/ethtool/ioctl.c:2956 [inline]
 dev_ethtool+0x229c/0x6290 net/ethtool/ioctl.c:3095
 dev_ioctl+0x637/0x1070 net/core/dev_ioctl.c:510
 sock_do_ioctl+0x20d/0x2c0 net/socket.c:1215
 sock_ioctl+0x577/0x6d0 net/socket.c:1320
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x18c/0x210 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x35/0x80 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x6e/0xd8

A more straightforward solution would be to always initialize rx_fs_lock,
just like rx_fs_list.  However, in this case the driver set_rxnfc callback
would return with a rather confusing error code, e.g. -EINVAL.  So deny
set_rxnfc attempts directly if the RX filtering feature is not supported
by hardware.

Fixes: ae8223d ("net: macb: Added support for RX filtering")
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Link: https://patch.msgid.link/20260316103826.74506-2-pchelkin@ispras.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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

Successfully merging this pull request may close these issues.

2 participants