Unable to install NI-VISA nikal kernel module because of GPL-only symbol 'pgprot_writecombine'

Bug #1564470 reported by Norbert
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Steps to reproduce:
1. Login to National Instruments site
2. Download NI-VISA 15.0 for linux (NI-VISA-15.0.0.iso).
3. Launch its installation by "sudo ./INSTALL"
4. Get errors on nikal kernel modules compilation about "pgprot_writecombine" symbol
(

sudo /usr/local/natinst/nikal/bin/updateNIDrivers
Configuring NI-KAL for kernel version 4.4.0-16-generic...
Building module nikal...
<11>Mar 31 23:04:51 nikal: CC [M] /var/lib/nikal/4.4.0-16-generic/nikal/nikal.o
<11>Mar 31 23:04:51 nikal: Building modules, stage 2.
<11>Mar 31 23:04:51 nikal: MODPOST 1 modules
<11>Mar 31 23:04:51 nikal: FATAL: modpost: GPL-incompatible module nikal.ko uses GPL-only symbol 'pgprot_writecombine'
<11>Mar 31 23:04:51 nikal: scripts/Makefile.modpost:91: recipe for target '__modpost' failed
<11>Mar 31 23:04:51 nikal: make[2]: *** [__modpost] Error 1
<11>Mar 31 23:04:51 nikal: Makefile:1399: recipe for target 'modules' failed
<11>Mar 31 23:04:51 nikal: make[1]: *** [modules] Error 2
<11>Mar 31 23:04:51 nikal: Makefile:32: recipe for target 'nikal.ko' failed
<11>Mar 31 23:04:51 nikal: make: *** [nikal.ko] Error 2
<11>Mar 31 23:04:51 nikal: ERROR: failed to build nikal
<11>Mar 31 23:04:51 nikal: ERROR: NI-KAL update failed.
<11>Mar 31 23:04:51 nikal: ERROR: make of nikal kernel module failed, not installing kernel module.
<11>Mar 31 23:04:51 nikal: ERROR: updateNIDrivers should be called again after fixing the problem.
<11>Mar 31 23:04:51 nikal: ERROR: Logging failure...
find: ‘/lib/modules/4.4.0-15-generic/kernel/natinst’: No such file or directory
<11>Mar 31 23:04:51 nikal: ERROR: Include the file /tmp/niSystemReport.out.gz when contacting
<11>Mar 31 23:04:51 nikal: ERROR: National Instruments for support.
<11>Mar 31 23:04:51 nikal: ERROR: Update of National Instruments drivers failed.

)

Temporary solution:
1. Edit /usr/src/linux-headers-4.4.0-16-generic/Module.symvers
and change line
   0xd544e902 pgprot_writecombine vmlinux EXPORT_SYMBOL_GPL
to
   0xd544e902 pgprot_writecombine vmlinux EXPORT_SYMBOL
2. Edit /boot/abi-4.4.0-16-generic
and change line
   EXPORT_SYMBOL_GPL vmlinux 0xd544e902 pgprot_writecombine
to
   EXPORT_SYMBOL vmlinux 0xd544e902 pgprot_writecombine

but it does not help - I get "nikal: Unknown symbol pgprot_writecombine (err 0)" in syslog.

Expected results:
0. The 'pgprot_writecombine' symbol is exported as EXPORT_SYMBOL
1. Ubuntu can compile and load NI nikal module.

Actual results:
Unable to use NI-VISA under Ubuntu.

Reference (openSUSE):
http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/GPL-incompatible-module-nikal-ko/td-p/3218730

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-16-generic 4.4.0-16.32
ProcVersionSignature: Ubuntu 4.4.0-16.32-generic 4.4.6
Uname: Linux 4.4.0-16-generic i686
ApportVersion: 2.20-0ubuntu3
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: flash 1549 F.... pulseaudio
 /dev/snd/controlC0: flash 1549 F.... pulseaudio
CurrentDesktop: Unity
Date: Thu Mar 31 18:16:37 2016
InstallationDate: Installed on 2016-03-26 (4 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Beta i386 (20160323)
IwConfig:
 lo no wireless extensions.

 enp1s0 no wireless extensions.
MachineType: Gigabyte Technology Co., Ltd. To be filled by O.E.M.
ProcFB: 0 radeondrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-16-generic root=UUID=eab7b488-5040-499c-afd8-21a7ce9e2383 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-16-generic N/A
 linux-backports-modules-4.4.0-16-generic N/A
 linux-firmware 1.157
RfKill:

SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/09/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: FD
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: F2A55M-DS2
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrFD:bd01/09/2014:svnGigabyteTechnologyCo.,Ltd.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnGigabyteTechnologyCo.,Ltd.:rnF2A55M-DS2:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: To be filled by O.E.M.
dmi.product.version: To be filled by O.E.M.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Norbert (nrbrtx) wrote :
description: updated
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Norbert (nrbrtx)
description: updated
Revision history for this message
Tim Gardner (timg-tpi) wrote :

Commit 92b9af9e4f144535c65aee673cfad309f25fa465 ('x86: i915 needs pgprot_writecombine() and is_io_mapping_possible()') is where that symbol is exported. You could send an email to Ingo Molnar <email address hidden> and see if he is interested in relaxing that export.

Revision history for this message
Norbert (nrbrtx) wrote : Re: [Bug 1564470] Re: Unable to install NI-VISA nikal kernel module because of GPL-only symbol 'pgprot_writecombine'
Download full text (4.4 KiB)

Dear Ingo Molnar!

I have a problem with *EXPORT_SYMBOL_GPL(pgprot_writecombine)* with Linux
4.4.0.16 on Ubuntu 16.04.
The *pgprot_writecombine* symbol is used in NI_VISA nikal driver (see
forwarded bugreport <https://bugs.launchpad.net/bugs/1564470>).

Is it safe to change *EXPORT_SYMBOL_GPL(pgprot_writecombine) *to
*EXPORT_SYMBOL(pgprot_writecombine)*?

With best regards,
Norbert.

---------- Forwarded message ----------
From: Tim Gardner <email address hidden>
Date: Thu, Mar 31, 2016 at 7:01 PM
Subject: [Bug 1564470] Re: Unable to install NI-VISA nikal kernel module
because of GPL-only symbol 'pgprot_writecombine'
To: <email address hidden>

Commit 92b9af9e4f144535c65aee673cfad309f25fa465 ('x86: i915 needs
pgprot_writecombine() and is_io_mapping_possible()') is where that
symbol is exported. You could send an email to Ingo Molnar
<email address hidden> and see if he is interested in relaxing that export.

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1564470

Title:
  Unable to install NI-VISA nikal kernel module because of GPL-only
  symbol 'pgprot_writecombine'

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Steps to reproduce:
  1. Login to National Instruments site
  2. Download NI-VISA 15.0 for linux (NI-VISA-15.0.0.iso).
  3. Launch its installation by "sudo ./INSTALL"
  4. Get errors on nikal kernel modules compilation about
"pgprot_writecombine" symbol ("nikal: FATAL: modpost: GPL-incompatible
module nikal.ko uses GPL-only symbol 'pgprot_writecombine'")

  Temporary solution:
  1. Edit /usr/src/linux-headers-4.4.0-16-generic/Module.symvers
  and change line
     0xd544e902 pgprot_writecombine vmlinux EXPORT_SYMBOL_GPL
  to
     0xd544e902 pgprot_writecombine vmlinux EXPORT_SYMBOL
  2. Edit /boot/abi-4.4.0-16-generic
  and change line
     EXPORT_SYMBOL_GPL vmlinux 0xd544e902 pgprot_writecombine
  to
     EXPORT_SYMBOL vmlinux 0xd544e902 pgprot_writecombine

  but it does not help - I get "nikal: Unknown symbol
  pgprot_writecombine (err 0)" in syslog.

  Expected results:
  0. The 'pgprot_writecombine' symbol is exported as EXPORT_SYMBOL
  1. Ubuntu can compile and load NI nikal module.

  Actual results:
  Unable to use NI-VISA under Ubuntu.

  Reference (openSUSE):

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/GPL-incompatible-module-nikal-ko/td-p/3218730

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: linux-image-4.4.0-16-generic 4.4.0-16.32
  ProcVersionSignature: Ubuntu 4.4.0-16.32-generic 4.4.6
  Uname: Linux 4.4.0-16-generic i686
  ApportVersion: 2.20-0ubuntu3
  Architecture: i386
  AudioDevicesInUse:
   USER PID ACCESS COMMAND
   /dev/snd/controlC1: flash 1549 F.... pulseaudio
   /dev/snd/controlC0: flash 1549 F.... pulseaudio
  CurrentDesktop: Unity
  Date: Thu Mar 31 18:16:37 2016
  InstallationDate: Installed on 2016-03-26 (4 days ago)
  InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Beta i386 (20160323)
  IwConfig:
   lo no wireless extensions.

   enp1s0 no wireless extensions.
  MachineType: Gigabyte Technology Co., Ltd. To be filled by O.E.M.
  ProcFB: 0 radeond...

Read more...

Norbert (nrbrtx)
tags: added: trusty
Norbert (nrbrtx)
tags: removed: trusty
Norbert (nrbrtx)
description: updated
Revision history for this message
Norbert (nrbrtx) wrote :

What is interesting nikal.ko module builds and loads successfully without any manual patching on
* Ubuntu 14.04.1 LTS with linux-3.13.
* Ubuntu 12.04.5 LTS with linux-3.2.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Norbert (nrbrtx) wrote :
Download full text (12.2 KiB)

Got similar error messages on Ubuntu 16.04 with Linux 4.4 and NI-VISA-15.5.0.iso .

Apr 4 20:50:41 flash nikal: CC [M] /var/lib/nikal/4.4.0-16-generic/nikal/nikal.o
Apr 4 20:50:41 flash nikal: Building modules, stage 2.
Apr 4 20:50:41 flash nikal: MODPOST 1 modules
Apr 4 20:50:41 flash nikal: FATAL: modpost: GPL-incompatible module nikal.ko uses GPL-only symbol 'pgprot_writecombine'
Apr 4 20:50:41 flash nikal: scripts/Makefile.modpost:91: recipe for target '__modpost' failed
Apr 4 20:50:41 flash nikal: make[2]: *** [__modpost] Error 1
Apr 4 20:50:41 flash nikal: Makefile:1399: recipe for target 'modules' failed
Apr 4 20:50:41 flash nikal: make[1]: *** [modules] Error 2
Apr 4 20:50:41 flash nikal: Makefile:32: recipe for target 'nikal.ko' failed
Apr 4 20:50:41 flash nikal: make: *** [nikal.ko] Error 2
Apr 4 20:50:41 flash nikal: ERROR: failed to build nikal
Apr 4 20:50:41 flash nikal: ERROR: NI-KAL update failed.
Apr 4 20:50:41 flash nikal: ERROR: make of nikal kernel module failed, not installing kernel module.
Apr 4 20:50:41 flash nikal: ERROR: updateNIDrivers should be called again after fixing the problem.
Apr 4 20:50:41 flash nikal: ERROR: Update of National Instruments drivers failed.
Apr 4 20:50:41 flash nimDNSResponder: mDNSResponder (Engineering Build) (Mar 4 2014 10:27:18) starting
Apr 4 20:50:41 flash nimDNSResponder: mDNS_AddDNSServer: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
Apr 4 20:50:41 flash kernel: [ 1448.939299] nipalk: Unknown symbol nNIKAL100_mapKernelToUser (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939308] nipalk: Unknown symbol nNIKAL100_pageUnlockUserPointer (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939313] nipalk: Unknown symbol nNIKAL100_releaseSpinLockDPC (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939317] nipalk: Unknown symbol nNIKAL100_acquireSemaphoreZeroTimeout (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939321] nipalk: Unknown symbol nNIKAL100_scheduleDPC (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939326] nipalk: Unknown symbol nNIKAL100_usbGetEndpointDescriptor (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939330] nipalk: Unknown symbol nNIKAL100_pciConfigRead16 (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939334] nipalk: Unknown symbol nNIKAL100_usbGetConfigurationDescriptor (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939338] nipalk: Unknown symbol nNIKAL100_usbUnlinkURB (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939343] nipalk: Unknown symbol nNIKAL100_printToDebugger (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939347] nipalk: Unknown symbol nNIKAL150_createMutex (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939351] nipalk: Unknown symbol nNIKAL150_releaseMutex (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939355] nipalk: Unknown symbol nNIKAL100_waitForSingleUseEvent (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939359] nipalk: Unknown symbol nNIKAL100_enumeratePCIBuses (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939363] nipalk: Unknown symbol nNIKAL100_waitForSingleUseEventTimeoutInterruptible (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939368] nipalk: Unknown symbol nNIKAL100_unregisterPCIDriver (err 0)
Apr 4 20:50:41 flash kernel: [ 1448.939372] nipalk:...

Revision history for this message
Norbert (nrbrtx) wrote :

Got NI-VISA-15.5.0.iso installed with all kernel modules (without errors) on Ubuntu 16.04 LTS after manual installation of /sbin/chkconfig and /sbin/insserv from Debian stretch (they are missed on Ubuntu - see bug 1565926 and bug 1565932 ).

So it seems that 'pgprot_writecombine' is not a real problem.

Revision history for this message
Pamir Talazan (pamir-talazan) wrote :

I confirm Norbert's diagnosis.

Revision history for this message
Enrico Weigelt, metux ITS (metux) wrote :

It's neither a Ubuntu bug, nor a upstream one.

Instead it's entirely NI's fault: they're using an GPL-only symbol (which IIRC always has been GPL-only!) in their proprietary kernel driver. (the idea of binary-only kernel drivers alone is quite insane in the first place).

The only serious fix is NI releasing their driver as GPL, or somebody reverse-engineering it and writing a free driver.

Don't use that stuff in production (inherently dangerous), and dont bother the kernel developers with that (there's a reason for the tainted-flags).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.