ndiswrapper icon indicating copy to clipboard operation
ndiswrapper copied to clipboard

Doesn't build with Linux 5.8

Open felixonmars opened this issue 5 years ago • 14 comments

I cannot find a way to allocate PAGE_KERNEL_EXEC anymore in the new version. __vmalloc doesn't have that parameter now and __vmalloc_node_range is no longer exported.

  CC [M]  /tmp/ndiswrapper-arch/trunk/src/ndiswrapper-1.62/driver/loader.o
/tmp/ndiswrapper-arch/trunk/src/ndiswrapper-1.62/driver/loader.c: In function ‘load_sys_files’:
/tmp/ndiswrapper-arch/trunk/src/ndiswrapper-1.62/driver/loader.c:157:4: error: too many arguments to function ‘__vmalloc’
  157 |    __vmalloc(load_driver->sys_files[i].size,
      |    ^~~~~~~~~
In file included from ./include/asm-generic/io.h:911,
                 from ./arch/x86/include/asm/io.h:375,
                 from ./include/linux/scatterlist.h:9,
                 from ./include/linux/dma-mapping.h:11,
                 from ./include/linux/skbuff.h:31,
                 from ./include/linux/if_ether.h:19,
                 from ./include/uapi/linux/ethtool.h:19,
                 from ./include/linux/ethtool.h:18,
                 from ./include/linux/netdevice.h:37,
                 from /tmp/ndiswrapper-arch/trunk/src/ndiswrapper-1.62/driver/ntoskernel.h:25,
                 from /tmp/ndiswrapper-arch/trunk/src/ndiswrapper-1.62/driver/ndis.h:19,
                 from /tmp/ndiswrapper-arch/trunk/src/ndiswrapper-1.62/driver/loader.c:16:
./include/linux/vmalloc.h:111:14: note: declared here
  111 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask);
      |              ^~~~~~~~~
make[2]: *** [scripts/Makefile.build:281: /tmp/ndiswrapper-arch/trunk/src/ndiswrapper-1.62/driver/loader.o] Error 1
make[2]: *** Waiting for unfinished jobs....

felixonmars avatar Aug 04 '20 12:08 felixonmars

Try this patch:

kernel-5.8.patch.txt

rezso avatar Feb 23 '21 23:02 rezso

Can you test above patch and confirm if it works?

pgiri avatar Mar 01 '21 04:03 pgiri

this patch helped me get the installation complete

tkasozi avatar Jun 06 '21 21:06 tkasozi

ndiswrapper 1.6.3, kernel 5.8 patch applied, compile and install driver works fine. Driver: (FritzStick_64bit_winxp_v061228) when i modprobe ndiswrapper i get: kernel tried to execute NX-protected page - exploit attempt? (uid: 0)

maybe__vmalloc does not allow executeable pages any more? Kernel: SMP Debian 5.10.24-1~bpo10+1

xtforever avatar Aug 08 '21 15:08 xtforever

Try this patch:

kernel-5.8.patch.txt

Do you have a patch for 5.13 ??

CoolOmar2020 avatar Aug 29 '21 13:08 CoolOmar2020

Do you have a patch for 5.13 ??

No. I have 5.10.18 kernel.

rezso avatar Aug 29 '21 13:08 rezso

Do you have a patch for 5.13 ??

No. I have 5.10.18

OK send it but patching with patch command fails do you have other suggestions??

CoolOmar2020 avatar Aug 29 '21 14:08 CoolOmar2020

@rezso where's the patch man?

CoolOmar2020 avatar Aug 31 '21 07:08 CoolOmar2020

@CoolOmar2020,

@rezso where's the patch man?

The link to the patch was already provided in this same issue. Click here to see the included patch.

The included patch does work against ndiswrapper-1.63 and it does appear to compile successfully against kernel 5.14.

I have gotten the patch command to work via the following:

patch --no-backup-if-mismatch -p1 -i kernel-5.8.patch.txt

net-wayfarer avatar Sep 14 '21 11:09 net-wayfarer

@CoolOmar2020,

@rezso where's the patch man?

The link to the patch was already provided in this same issue. Click here to see the included patch.

The included patch does work against ndiswrapper-1.63 and it does appear to compile successfully against kernel 5.14.

I have gotten the patch command to work via the following:


patch --no-backup-if-mismatch -p1 -i kernel-5.8.patch.txt

I am looking for the 5.10 patch

CoolOmar2020 avatar Sep 14 '21 13:09 CoolOmar2020

@CoolOmar2020,

@rezso where's the patch man?

The link to the patch was already provided in this same issue. Click here to see the included patch. The included patch does work against ndiswrapper-1.63 and it does appear to compile successfully against kernel 5.14. I have gotten the patch command to work via the following:


patch --no-backup-if-mismatch -p1 -i kernel-5.8.patch.txt

I am looking for the 5.10 patch

Does the said patch not work against 5.10? There is another variant of this kernel-5.8 patch. Personally, I do not know of any patches that are specifically for 5.10.

net-wayfarer avatar Sep 14 '21 14:09 net-wayfarer

@CoolOmar2020,

@rezso where's the patch man?

The link to the patch was already provided in this same issue. Click here to see the included patch.

The included patch does work against ndiswrapper-1.63 and it does appear to compile successfully against kernel 5.14.

I have gotten the patch command to work via the following:

patch --no-backup-if-mismatch -p1 -i kernel-5.8.patch.txt

I am looking for the 5.10 patch

Does the said patch not work against 5.10? There is another variant of this kernel-5.8 patch. Personally, I do not know of any patches that are specifically for 5.10.

@rezso said he has one

CoolOmar2020 avatar Sep 14 '21 15:09 CoolOmar2020

ndiswrapper 1.6.3, kernel 5.8 patch applied, compile and install driver works fine. Driver: (FritzStick_64bit_winxp_v061228) when i modprobe ndiswrapper i get: kernel tried to execute NX-protected page - exploit attempt? (uid: 0)

maybe__vmalloc does not allow executeable pages any more? Kernel: SMP Debian 5.10.24-1~bpo10+1

Same issue.

TBM13 avatar Jan 11 '22 19:01 TBM13

My patches for newer kernels have been merged, It would be nice if others could test it out

jcontoso avatar Feb 24 '24 06:02 jcontoso