Skip to content

Conversation

jkroonza
Copy link

@jkroonza jkroonza commented Mar 16, 2025

This builds on top of #233.

After pushing this and looking at the comment logs of some other PRs, I think #230, #221, #217 and #216 might also be covered by this. This was tested against kernel 6.12.1.

There is one question in my mind still:

  1. The check for strscpy could be simplified to have nothing in gen_compat_def, and merely rely on:
#ifndef strscpy
#define strcpy(...) strlcpy(__VA_ARGS__)
#endif

The definition here is also slightly different, and arguably better, cleaner.

Otherwise I believe this covers everything required.

anbe42 and others added 12 commits March 1, 2025 04:57
Fixes: 40fefb2 ("compat: Fix __has_attribute usage")
Signed-off-by: Andreas Beckmann <[email protected]>
and do not query unrelated modules

Signed-off-by: Andreas Beckmann <[email protected]>
the recursive calls slowed down the configure script significantly

Signed-off-by: Andreas Beckmann <[email protected]>
skb_reset_mac_len() was introduced in v3.0-rc3
and is used unconditionally

Signed-off-by: Andreas Beckmann <[email protected]>
netif_is_bridge_port() was introduced in v4.4-rc2 by
"vlan: Do not put vlan headers back on bridge and macvlan ports"
(28f9ee22bcdd84726dbf6267d0b58f254166b900)

Signed-off-by: Andreas Beckmann <[email protected]>
adapt to "move asm/unaligned.h to linux/unaligned.h"
(5f60d5f6bbc12e782fac78110b0ee62698f3b576) in v6.12-rc2

Fixes: aabc#237
Signed-off-by: Andreas Beckmann <[email protected]>
strscpy has been around since 4.3, and strlcpy got removed in 6.8.

This patch switches to the plainly preferred strscpy whenever it is
available, but will define that to strlcpy if strscpy (sized_strscpy due
to strscpy really being a macro) is not available.

Ideally we want to compile a test-call, but kbuild_test_symbol() doesn't
work that way.

We could also simply go "#ifndef strscpy ... # define strscpy strlcpy"
if that would be preferred.

Signed-off-by: Jaco Kroon <[email protected]>
I've verified and traced this back to the initial import into git,
around version 2.6.12 of the kernel.  If anybody fails to compile
against older than that I think we can look into this but highly doubt
that'll be an issue.

Signed-off-by: Jaco Kroon <[email protected]>
@jkroonza jkroonza changed the title Dkms fixes general updates for kernel version compatiblity Mar 16, 2025
Signed-off-by: Jaco Kroon <[email protected]>
Signed-off-by: Jaco Kroon <[email protected]>
For backwards compatiblity this gets pretty nasty.  This should work
fairly well.

Signed-off-by: Jaco Kroon <[email protected]>
@jkroonza
Copy link
Author

Updated PR with non-default ./configure options too. primarily for the u32 random stuff, much of the history is difficult to track to specific version numbers, so linux/random.h is included always, and prandom.h only if available and needed.

jkroonza added a commit to jkroonza/gentoo that referenced this pull request Mar 17, 2025
Snapshot version of aabc/ipt-netflow#239

Naming is such that if an official 2.6.x gets released, this will
supercede that, but 2.7 will be "newer".  This isn't quite live, and I
don't like this, one bit, but it's a workable solution.  Extra .0 so
that we can bump these "semi live" versions at a later stage.

I also updated the -gentoo.patch to sort out LDFLAGS not respected QA
error.

Signed-off-by: Jaco Kroon <[email protected]>
Bug: https://bugs.gentoo.org/950506
Bug: https://bugs.gentoo.org/831306
@jkroonza
Copy link
Author

Tested with more combinations of /configure now, that matters for Gentoo, and I'm 99% sure of these commits. Would appreciate review on this, and pointers please if there is anything anyone is unhappy with.

jkroonza added a commit to jkroonza/gentoo that referenced this pull request Mar 17, 2025
Snapshot version of aabc/ipt-netflow#239

I also updated the -gentoo.patch to sort out LDFLAGS not respected QA
error.

Signed-off-by: Jaco Kroon <[email protected]>
Bug: https://bugs.gentoo.org/950506
Bug: https://bugs.gentoo.org/831306
jkroonza added a commit to jkroonza/gentoo that referenced this pull request Mar 17, 2025
Snapshot version of aabc/ipt-netflow#239

Updated the -gentoo.patch to sort out LDFLAGS not respected QA error.

Signed-off-by: Jaco Kroon <[email protected]>
Bug: https://bugs.gentoo.org/950506
Bug: https://bugs.gentoo.org/831306
@k0ste
Copy link

k0ste commented May 1, 2025

Tested with more combinations of /configure now, that matters for Gentoo, and I'm 99% sure of these commits. Would appreciate review on this, and pointers please if there is anything anyone is unhappy with.

Added to Arch ✔️

gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request May 21, 2025
Snapshot version of aabc/ipt-netflow#239

Updated the -gentoo.patch to sort out LDFLAGS not respected QA error.

Signed-off-by: Jaco Kroon <[email protected]>
Bug: https://bugs.gentoo.org/950506
Bug: https://bugs.gentoo.org/831306
Part-of: #41138
Closes: #41138
Signed-off-by: Sam James <[email protected]>
@jkroonza
Copy link
Author

Just to note: I've abandoned pursuing ipt_netflow. It's simply not going to do what we need. Would have loved if it did, but we'll stack some netflow capable switches in front of the relevant and just get the info from there. This kernel module is simply not going to work for us.

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.

3 participants