View Issue Details

IDProjectCategoryView StatusLast Update
0015639CentOS-7pciutilspublic2019-06-11 22:52
Reportertesthpt Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformASUS Z87OSCentOSOS VersionCentOS7.6
Product Version7.6.1810 
Summary0015639: CentOS7.6编译驱动程序提示sme_active,编译失败
Description主板上接了一块HighPoint的RR2720 RAID阵列卡,在CentOS7.6上编译RR2720的驱动时提示‘sme_active’,编译失败。
经过检查,发现是pci_set_consistent_dma_mask()函数导致了该问题,该函数本身是一个非GPL函数,但是通过追踪该函数的调用,最后其调用了sme_active()函数,sme_active()被声明为GPL函数。

bool sme_active(void)
{
    return sme_me_mask && !sev_enabled;
}
EXPORT_SYMBOL_GPL(sme_active);
Steps To Reproduce安装CentOS7.6 http://ftp.sjtu.edu.cn/centos/7.6.1810/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso
安装RR2720的驱动: #./rr272x_1x-linux-src-v1.10.3-18_11_14.bin
安装完成后,可以在查看安装信息/var/log/hptdrv.log ,安装信息可以查看到编译失败产生的“sme_acive”信息。
Additional Informationhttps://elixir.bootlin.com/linux/v4.20/source/arch/x86/mm/mem_encrypt.c#L338
在linux kernel 4.20.0中sme_active()函数并未被声明GPL

bool sme_active(void)
{
    return sme_me_mask && !sev_enabled;
}
EXPORT_SYMBOL(sme_active);
Tags7.6
abrt_hash
URL

Activities

testhpt

testhpt

2018-12-25 04:40

reporter  

CentOS7.6.PNG (65,209 bytes)   
CentOS7.6.PNG (65,209 bytes)   
Linux_kernel_4.20.PNG (25,664 bytes)   
Linux_kernel_4.20.PNG (25,664 bytes)   
testhpt

testhpt

2018-12-25 09:36

reporter  

hptdrv.log (6,437 bytes)   
--- --- --- --- 20181226052849 --- --- --- ---
kernelver:kernel /boot/vmlinuz-3.10.0-957.el7.x86_64
kernelver:kernel version from name: 3.10.0-957.el7.x86_64
kernelver:kernel version from magic: 3.10.0-957.el7.x86_64
kernelver:--------------------
--- --- --- ---
compile:default boot kernel: /boot/vmlinuz-3.10.0-957.el7.x86_64
dumpkernels:kernel installed
kernel-3.10.0-957.el7.x86_64
dumpkernels:kernel-devel installed
kernel-devel-3.10.0-957.el7.x86_64
dumpkernels:repo list kernel-devel

dumpkernels:end
kernelver:kernel /boot/vmlinuz-3.10.0-957.el7.x86_64
kernelver:kernel version from name: 3.10.0-957.el7.x86_64
kernelver:kernel version from magic: 3.10.0-957.el7.x86_64
kernelver:--------------------
compile:kernel file /boot/vmlinuz-3.10.0-957.el7.x86_64 version 3.10.0-957.el7.x86_64 [default boot kernel]
compile:existed module file for rr272x_1x: .
compile:prepare build rr272x_1x.
compile:building driver rr272x_1x for kernel 3.10.0-957.el7.x86_64
/var/tmp/build_hpt_driver/product/rr272x/linux/build.log:
make[1]: Entering directory `/usr/src/kernels/3.10.0-957.el7.x86_64'
  CC [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/os_linux.o
  CC [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/osm_linux.o
  CC [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/div64.o
  CC [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/hptinfo.o
  CC [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/config.o
  LD [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/rr272x_1x.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: could not find /var/tmp/build_hpt_driver/product/rr272x/linux/.build/.him_rr272x.o.cmd for /var/tmp/build_hpt_driver/product/rr272x/linux/.build/him_rr272x.o
FATAL: modpost: GPL-incompatible module rr272x_1x.ko uses GPL-only symbol 'sme_active'
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-957.el7.x86_64'
make: *** [rr272x_1x.ko] Error 2
--- --- --- end content --- --- ---
compile:failed to build driver rr272x_1x for kernel 3.10.0-957.el7.x86_64
/var/tmp/hptdrvdl-std/log:
--2018-12-26 05:28:53--  http://www.highpoint-tech.com/linux/std/filelist
Resolving www.highpoint-tech.com (www.highpoint-tech.com)... failed: Name or service not known.
wget: unable to resolve host address ‘www.highpoint-tech.com’
--- --- --- end content --- --- ---
update:failed to download filelist from http://www.highpoint-tech.com/linux/std/filelist. Updating rr272x_1x is skipped.
--- --- --- --- 20181226052849 --- --- --- ---
kernelver:kernel /boot/vmlinuz-3.10.0-957.el7.x86_64
kernelver:kernel version from name: 3.10.0-957.el7.x86_64
kernelver:kernel version from magic: 3.10.0-957.el7.x86_64
kernelver:--------------------
--- --- --- ---
compile:default boot kernel: /boot/vmlinuz-3.10.0-957.el7.x86_64
dumpkernels:kernel installed
kernel-3.10.0-957.el7.x86_64
dumpkernels:kernel-devel installed
kernel-devel-3.10.0-957.el7.x86_64
dumpkernels:repo list kernel-devel

dumpkernels:end
kernelver:kernel /boot/vmlinuz-3.10.0-957.el7.x86_64
kernelver:kernel version from name: 3.10.0-957.el7.x86_64
kernelver:kernel version from magic: 3.10.0-957.el7.x86_64
kernelver:--------------------
compile:kernel file /boot/vmlinuz-3.10.0-957.el7.x86_64 version 3.10.0-957.el7.x86_64 [default boot kernel]
compile:existed module file for rr272x_1x: .
compile:prepare build rr272x_1x.
compile:building driver rr272x_1x for kernel 3.10.0-957.el7.x86_64
/var/tmp/build_hpt_driver/product/rr272x/linux/build.log:
make[1]: Entering directory `/usr/src/kernels/3.10.0-957.el7.x86_64'
  CC [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/os_linux.o
  CC [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/osm_linux.o
  CC [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/div64.o
  CC [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/hptinfo.o
  CC [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/config.o
  LD [M]  /var/tmp/build_hpt_driver/product/rr272x/linux/.build/rr272x_1x.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: could not find /var/tmp/build_hpt_driver/product/rr272x/linux/.build/.him_rr272x.o.cmd for /var/tmp/build_hpt_driver/product/rr272x/linux/.build/him_rr272x.o
FATAL: modpost: GPL-incompatible module rr272x_1x.ko uses GPL-only symbol 'sme_active'
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-957.el7.x86_64'
make: *** [rr272x_1x.ko] Error 2
--- --- --- end content --- --- ---
compile:failed to build driver rr272x_1x for kernel 3.10.0-957.el7.x86_64
/var/lock/subsys/hptdrv-monitor:

hostdrivers="ahci"
builtin=""
current=/boot/vmlinuz-3.10.0-957.el7.x86_64
compress=
initrdtype=2
lsinitrd=/bin/lsinitrd
--- --- --- end content --- --- ---
fixboot:host drivers: ahci; modules: rr272x_1x; builtins: ; conflictmods: mvsas
kernelver:kernel /boot/vmlinuz-3.10.0-957.el7.x86_64
kernelver:kernel version from name: 3.10.0-957.el7.x86_64
kernelver:kernel version from magic: 3.10.0-957.el7.x86_64
kernelver:--------------------
fixboot:try to fixboot on kernel /boot/vmlinuz-3.10.0-957.el7.x86_64 version 3.10.0-957.el7.x86_64.
before:crc32c-intel crct10dif-pclmul iosf_mbi async_memcpy async_pq async_raid6_recov async_tx async_xor crct10dif_common crct10dif_generic xor video ahci ata_piix libahci libata loop cdrom iscsi_ibft drm_kms_helper drm drm_panel_orientation_quirks i915 i2c-algo-bit serio_raw dm-bufio dm-crypt dm-log dm-mirror dm-mod dm-multipath dm-region-hash dm-round-robin dm-snapshot dm-zero linear raid0 raid10 raid1 raid456 e1000e r8169 mii pps_core ptp fcoe libfcoe iscsi_boot_sysfs libfc libiscsi scsi_tgt scsi_transport_fc scsi_transport_iscsi sd_mod sr_mod usb-storage fb_sys_fops syscopyarea sysfillrect sysimgblt xfs crc-t10dif libcrc32c raid6_pq 8021q garp mrp stp llc:

kernelver:kernel /boot/vmlinuz-3.10.0-957.el7.x86_64
kernelver:kernel version from name: 3.10.0-957.el7.x86_64
kernelver:kernel version from magic: 3.10.0-957.el7.x86_64
kernelver:--------------------
detectenv:current:3.10.0-957.el7.x86_64
/boot/vmlinuz-3.10.0-957.el7.x86_64
kernelver:kernel /boot/vmlinuz-3.10.0-957.el7.x86_64
kernelver:kernel version from name: 3.10.0-957.el7.x86_64
kernelver:kernel version from magic: 3.10.0-957.el7.x86_64
kernelver:--------------------
`-3.10.0-957.el7.x86_64
3.10.0-957.el7.x86_64 - 3.10.0-957.el7.x86_64
hptdrv.log (6,437 bytes)   
pgreco

pgreco

2018-12-25 14:11

developer   ~0033451

@toracat, this seems to be the commit that fixes this issue https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9d5f38ba6c82359b7cec31fb27fb78ecc02f3946
Since EXPORT_SYMBOL is less restrictive than EXPORT_SYMBOL_GPL, it should work.
@testhpt, please write in english, google translate wasn't exactly helpful.
toracat

toracat

2018-12-25 14:23

manager   ~0033452

@pgreco

I'll try to get the patch into the plus kernel.

Merry Christmas to all !
toracat

toracat

2018-12-25 17:23

manager   ~0033453

@testhpt

A set of the centosplus kernel (kernel-plus) has been built with the patch referenced by @pgreco is now available from:

https://people.centos.org/toracat/kernel/7/plus/bug15639/

Can you give it a try?
testhpt

testhpt

2018-12-26 05:22

reporter   ~0033458

The centosplus kernel with the patch is useful. Will you update that to the official version?
tigalch

tigalch

2018-12-26 12:39

manager   ~0033460

It is best if you raise a bug at RedHats bugzilla regarding this issue and the code fix for it. If/when RH adds the fix to their kernel, CentOS will inherit the fix in the regular kernel and it will be dropped from the plus kernel.
testhpt

testhpt

2019-01-02 00:47

reporter   ~0033491

Sorry,i can't connect to REDHAT. Maybe you have a better communication between you.
TrevorH

TrevorH

2019-01-02 01:45

manager   ~0033492

Anyone can open an account on bugzilla.redhat.com - it does not require a license or anything.

There is no communication between the CentOS project and Redhat.
pgreco

pgreco

2019-01-02 10:11

developer   ~0033494

@toracat, filed https://bugzilla.redhat.com/show_bug.cgi?id=1662887 and added you to it
toracat

toracat

2019-01-02 14:49

manager   ~0033496

@pgreco

Well done.
testhpt

testhpt

2019-01-04 02:18

reporter   ~0033511

Have you submitted the bug to REDHAT?
tigalch

tigalch

2019-01-04 06:05

manager   ~0033512

Last edited: 2019-01-04 08:24

See pgrecos post:
"filed https://bugzilla.redhat.com/show_bug.cgi?id=1662887 "

toracat

toracat

2019-01-31 18:30

manager   ~0033741

kernel-plus-3.10.0-957.5.1.el7.centos.plus now has the patch.
toracat

toracat

2019-06-04 17:45

manager   ~0034595

The distro kernel 3.10.0-957.21.2.el7 now has this patch.
toracat

toracat

2019-06-11 22:52

manager   ~0034641

Closing as resolved.

Issue History

Date Modified Username Field Change
2018-12-25 04:40 testhpt New Issue
2018-12-25 04:40 testhpt File Added: RR272x_1x_Linux_Src_v1.10.3_18_11_14.tar.gz
2018-12-25 04:40 testhpt File Added: CentOS7.6.PNG
2018-12-25 04:40 testhpt File Added: Linux_kernel_4.20.PNG
2018-12-25 04:40 testhpt Tag Attached: 7.6
2018-12-25 09:36 testhpt File Added: hptdrv.log
2018-12-25 14:11 pgreco Status new => assigned
2018-12-25 14:11 pgreco Note Added: 0033451
2018-12-25 14:23 toracat Note Added: 0033452
2018-12-25 17:23 toracat Note Added: 0033453
2018-12-26 05:22 testhpt Note Added: 0033458
2018-12-26 12:39 tigalch Note Added: 0033460
2019-01-02 00:47 testhpt Note Added: 0033491
2019-01-02 01:45 TrevorH Note Added: 0033492
2019-01-02 10:11 pgreco Note Added: 0033494
2019-01-02 14:49 toracat Note Added: 0033496
2019-01-04 02:18 testhpt Note Added: 0033511
2019-01-04 06:05 tigalch Note Added: 0033512
2019-01-04 08:24 toracat Note Edited: 0033512
2019-01-31 18:30 toracat Note Added: 0033741
2019-06-04 17:45 toracat Note Added: 0034595
2019-06-11 22:52 toracat Status assigned => resolved
2019-06-11 22:52 toracat Resolution open => fixed
2019-06-11 22:52 toracat Note Added: 0034641