ipx icon indicating copy to clipboard operation
ipx copied to clipboard

Linux kernel 6.16

Open geosone opened this issue 4 months ago • 4 comments

Build Problems with kernel 6.16

Emerging (21 of 28) net-misc/ipx-modules-9999::linamh

  • Determining the location of the kernel source code
  • Found kernel source directory:
  • /usr/src/linux
    
  • Found sources for kernel version:
  • 6.16.1-gentoo-dist
    
  • Checking for suitable kernel configuration options ... [ ok ]

Unpacking source...

  • Repository id: pasis_ipx.git
  • To override fetched repository properties, use:
  • EGIT_OVERRIDE_REPO_PASIS_IPX
  • EGIT_OVERRIDE_BRANCH_PASIS_IPX
  • EGIT_OVERRIDE_COMMIT_PASIS_IPX
  • EGIT_OVERRIDE_COMMIT_DATE_PASIS_IPX
  • Fetching https://github.com/pasis/ipx.git ... git fetch https://github.com/pasis/ipx.git +HEAD:refs/git-r3/HEAD git symbolic-ref refs/git-r3/net-misc/ipx-modules/0/main refs/git-r3/HEAD
  • Checking out https://github.com/pasis/ipx.git to /var/tmp/portage/net-misc/ipx-modules-9999/work/ipx-modules-9999 ... git checkout --quiet refs/git-r3/HEAD GIT update --> repository: https://github.com/pasis/ipx.git at the commit: 3583528108295c915c42e3a396bd8a9a33df0c1b

Source unpacked in /var/tmp/portage/net-misc/ipx-modules-9999/work Preparing source in /var/tmp/portage/net-misc/ipx-modules-9999/work/ipx-modules-9999 ... Source prepared. Configuring source in /var/tmp/portage/net-misc/ipx-modules-9999/work/ipx-modules-9999 ... Source configured. Compiling source in /var/tmp/portage/net-misc/ipx-modules-9999/work/ipx-modules-9999 ... ln: failed to create symbolic link 'Module.symvers': File exists

  • Preparing ipx module make -j12 -s HOSTCC=x86_64-pc-linux-gnu-gcc 'LDFLAGS=-m elf_x86_64' KERNELDIR=/usr/src/linux M=/var/tmp/portage/net-misc/ipx-modules-9999/work/ipx-modules-9999 build Building with KERNELRELEASE = 6.16.1-gentoo-dist af_ipx.c:51:10: fatal error: net/p8022.h: No such file or directory 51 | #include <net/p8022.h> | ^~~~~~~~~~~~~ compilation terminated. make[4]: *** [/usr/src/linux-6.16.1-gentoo-dist/scripts/Makefile.build:287: af_ipx.o] Error 1 make[4]: *** Waiting for unfinished jobs.... p8023.c:25:10: fatal error: net/p8022.h: No such file or directory 25 | #include <net/p8022.h> | ^~~~~~~~~~~~~ compilation terminated. make[4]: *** [/usr/src/linux-6.16.1-gentoo-dist/scripts/Makefile.build:287: p8023.o] Error 1 make[3]: *** [/usr/src/linux-6.16.1-gentoo-dist/Makefile:2004: .] Error 2 make[2]: *** [/usr/src/linux-6.16.1-gentoo-dist/Makefile:248: __sub-make] Error 2 make[1]: *** [Makefile:248: __sub-make] Error 2 make: *** [Makefile:7: build] Error 2
  • ERROR: net-misc/ipx-modules-9999::linamh failed (compile phase):
  • emake failed
  • If you need support, post the output of emerge --info '=net-misc/ipx-modules-9999::linamh',
  • the complete build log and the output of emerge -pqv '=net-misc/ipx-modules-9999::linamh'.
  • The complete build log is located at '/var/tmp/portage/net-misc/ipx-modules-9999/temp/build.log'.
  • The ebuild environment file is located at '/var/tmp/portage/net-misc/ipx-modules-9999/temp/environment'.
  • Working directory: '/var/tmp/portage/net-misc/ipx-modules-9999/work/ipx-modules-9999'
  • S: '/var/tmp/portage/net-misc/ipx-modules-9999/work/ipx-modules-9999'

geosone avatar Aug 17 '25 20:08 geosone

looks like p8022 was driped fromn 6.16 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=45bd443bfd8697a7da308c16c3e75e2bb353b3d1

geosone avatar Aug 17 '25 20:08 geosone

`diff '--color=auto' -uNr ipx-modules-9999.orig/Makefile ipx-modules-9999/Makefile --- ipx-modules-9999.orig/Makefile 2025-08-17 22:51:50.176137868 +0200 +++ ipx-modules-9999/Makefile 2025-08-17 22:53:18.176972123 +0200 @@ -13,6 +13,6 @@

$(info Building with KERNELRELEASE = ${KERNELRELEASE}) obj-m := ipx.o -ipx-y := af_ipx.o ipx_route.o ipx_proc.o pe2.o p8023.o sysctl_net_ipx.o +ipx-y := af_ipx.o ipx_route.o ipx_proc.o pe2.o p8022.o p8023.o sysctl_net_ipx.o

endif diff '--color=auto' -uNr ipx-modules-9999.orig/net/p8022.h ipx-modules-9999/net/p8022.h --- ipx-modules-9999.orig/net/p8022.h 1970-01-01 01:00:00.000000000 +0100 +++ ipx-modules-9999/net/p8022.h 2025-08-17 22:53:05.132211359 +0200 @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _NET_P8022_H +#define _NET_P8022_H + +struct net_device; +struct packet_type; +struct sk_buff; + +struct datalink_proto * +register_8022_client(unsigned char type,

  •                int (*func)(struct sk_buff *skb,
    
  •                            struct net_device *dev,
    
  •                            struct packet_type *pt,
    
  •                            struct net_device *orig_dev));
    

+void unregister_8022_client(struct datalink_proto proto); +#endif diff '--color=auto' -uNr ipx-modules-9999.orig/p8022.c ipx-modules-9999/p8022.c --- ipx-modules-9999.orig/p8022.c 1970-01-01 01:00:00.000000000 +0100 +++ ipx-modules-9999/p8022.c 2025-08-17 22:52:35.260453062 +0200 @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/

    • NET3:   Support for 802.2 demultiplexing off Ethernet
      
    •         Demultiplex 802.2 encoded protocols. We match the entry by the
      
    •         SSAP/DSAP pair and then deliver to the registered datalink that
      
    •         matches. The control byte is ignored and handling of such items
      
    •         is up to the routine passed the frame.
      
    •         Unlike the 802.3 datalink we have a list of 802.2 entries as
      
    •         there are multiple protocols to demux. The list is currently
      
    •         short (3 or 4 entries at most). The current demux assumes this.
      
  • */ +#include <linux/module.h> +#include <linux/netdevice.h> +#include <linux/skbuff.h> +#include <linux/slab.h> +#include <net/datalink.h> +#include <linux/mm.h> +#include <linux/in.h> +#include <linux/init.h> +#include <net/llc.h> +#include "net/p8022.h"

+static int p8022_request(struct datalink_proto *dl, struct sk_buff *skb,

  •                    const unsigned char *dest)
    

+{

  •   llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap);
    
  •   return 0;
    

+} + +struct datalink_proto *register_8022_client(unsigned char type,

  •                                       int (*func)(struct sk_buff *skb,
    
  •                                                   struct net_device *dev,
    
  •                                                   struct packet_type *pt,
    
  •                                                   struct net_device *orig_dev))
    

+{

  •   struct datalink_proto *proto;
    
  •   proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
    
  •   if (proto) {
    
  •           proto->type[0]          = type;
    
  •           proto->header_length    = 3;
    
  •           proto->request          = p8022_request;
    
  •           proto->sap = llc_sap_open(type, func);
    
  •           if (!proto->sap) {
    
  •                   kfree(proto);
    
  •                   proto = NULL;
    
  •           }
    
  •   }
    
  •   return proto;
    

+} + +void unregister_8022_client(struct datalink_proto *proto) +{

  •   llc_sap_put(proto->sap);
    
  •   kfree(proto);
    

+} + +EXPORT_SYMBOL(register_8022_client); +EXPORT_SYMBOL(unregister_8022_client); + +MODULE_DESCRIPTION("Support for 802.2 demultiplexing off Ethernet"); +MODULE_LICENSE("GPL"); diff '--color=auto' -uNr ipx-modules-9999.orig/af_ipx.c ipx-modules-9999/af_ipx.c --- ipx-modules-9999.orig/af_ipx.c 2025-08-17 22:57:10.325385728 +0200 +++ ipx-modules-9999/af_ipx.c 2025-08-17 22:57:21.746373078 +0200 @@ -48,7 +48,7 @@ #include <linux/termios.h> #include <linux/version.h>

-#include <net/p8022.h> +#include "net/p8022.h" #include <net/psnap.h> #include <net/sock.h> #include <net/datalink.h> diff '--color=auto' -uNr ipx-modules-9999.orig/p8023.c ipx-modules-9999/p8023.c --- ipx-modules-9999.orig/p8023.c 2025-08-18 00:01:58.355870320 +0200 +++ ipx-modules-9999/p8023.c 2025-08-18 00:02:13.191093761 +0200 @@ -22,7 +22,7 @@ #include <linux/version.h>

#include <net/datalink.h> -#include <net/p8022.h> +#include "net/p8022.h"

#include "net/ipx.h" `

my fix to get it compile with 6.16 at the monet get the missong code from 6.15.* and patch the code to get it compile

geosone avatar Aug 21 '25 06:08 geosone

@geosone , thank you for the report. I will adopt the fix once I have some spare time. Feel free to ping me in a while.

pasis avatar Aug 21 '25 08:08 pasis

and 6.16.6 adds another problem.

make -j12 -s HOSTCC=x86_64-pc-linux-gnu-gcc 'LDFLAGS=-m elf_x86_64' KERNELDIR=/usr/src/linux M=/var/tmp/portage/net-misc/ipx-modules-9999/work/ipx-modules-9999 build 
Building with KERNELRELEASE = 6.16.6-xanmod1-dist
ipx_proc.c: In function ‘ipx_seq_socket_show’:
ipx_proc.c:222:55: error: implicit declaration of function ‘sock_i_uid’; did you mean ‘sock_net_uid’? [-Wimplicit-function-declaration]
  222 |                    from_kuid_munged(seq_user_ns(seq), sock_i_uid(s)));
      |                                                       ^~~~~~~~~~
      |                                                       sock_net_uid
ipx_proc.c:222:55: error: incompatible type for argument 2 of ‘from_kuid_munged’
  222 |                    from_kuid_munged(seq_user_ns(seq), sock_i_uid(s)));
      |                                                       ^~~~~~~~~~~~~
      |                                                       |
      |                                                       int
In file included from /usr/src/linux-6.16.6-xanmod1-dist/include/linux/stat.h:20,
                 from /usr/src/linux-6.16.6-xanmod1-dist/include/linux/fs.h:11,
                 from /usr/src/linux-6.16.6-xanmod1-dist/include/linux/proc_fs.h:10,
                 from ipx_proc.c:10:
/usr/src/linux-6.16.6-xanmod1-dist/include/linux/uidgid.h:120:65: note: expected ‘kuid_t’ but argument is of type ‘int’
  120 | extern uid_t from_kuid_munged(struct user_namespace *to, kuid_t uid);
      |                                                          ~~~~~~~^~~
make[4]: *** [/usr/src/linux-6.16.6-xanmod1-dist/scripts/Makefile.build:287: ipx_proc.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [/usr/src/linux-6.16.6-xanmod1-dist/Makefile:2009: .] Error 2
make[2]: *** [/usr/src/linux-6.16.6-xanmod1-dist/Makefile:248: __sub-make] Error 2
make[1]: *** [Makefile:248: __sub-make] Error 2
make: *** [Makefile:7: build] Error 2
 * ERROR: net-misc/ipx-modules-9999::linamh failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=net-misc/ipx-modules-9999::linamh'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/ipx-modules-9999::linamh'`.
 * The complete build log is located at '/var/tmp/portage/net-misc/ipx-modules-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/ipx-modules-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/ipx-modules-9999/work/ipx-modules-9999'
 * S: '/var/tmp/portage/net-misc/ipx-modules-9999/work/ipx-modules-9999'

geosone avatar Sep 11 '25 02:09 geosone