View Issue Details

IDProjectCategoryView StatusLast Update
0015639CentOS-7pciutilspublic2019-06-11 22:52
Reportertesthpt 
PriorityurgentSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformASUS Z87OSCentOSOS VersionCentOS7.6
Product Version7.6.1810 
Target VersionFixed in Version 
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  

RR272x_1x_Linux_Src_v1.10.3_18_11_14.tar.gz (1,272,144 bytes)
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)
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

View 2 revisions

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 View Revisions
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