tp-smapi module dkms install error with grsecurity patched kernel

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

tp-smapi module dkms install error with grsecurity patched kernel

Sean Behan
I recently installed a package from the Arch Linux User repositories
called tp_smapi-dkms. You can see how it installed in it's PKGBUILD here
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=tp_smapi-dkms

It installs correctly, and dkms installs it correctly for my regular
vanilla kernel, but I have issues when adding it to my grsecurity
patched kernel.

<pre><code>
/home/codebam$ sudo dkms install -m tp_smapi-dkms -v 0.42 -k
4.6.4.201607112205-1-grsec

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make KERNELRELEASE=4.6.4.201607112205-1-grsec
KVER=4.6.4.201607112205-1-grsec HDAPS=1...(bad exit status: 2)
Error! Bad return status for module build on kernel:
4.6.4.201607112205-1-grsec (x86_64)
Consult /var/lib/dkms/tp_smapi-dkms/0.42/build/make.log for more
information.
/home/codebam$
</code></pre>

I attached the make.log that's referenced there as an attachment. Any
help would be appreciated.

Thanks,

Sean Behan

make.log (1K) Download Attachment
signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: tp-smapi module dkms install error with grsecurity patched kernel

Evgeni Golov-3
Hi Sean,

On Sat, Jul 16, 2016 at 01:47:02AM -0400, Sean Behan wrote:

> /var/lib/dkms/tp_smapi-dkms/0.42/build/hdaps.c:738:33: error: constified variable ‘hdaps_whitelist’ placed into writable section ".init.data"
>  struct dmi_system_id __initdata hdaps_whitelist[] = {

Can you try the following patch please?

--- a/hdaps.c
+++ b/hdaps.c
@@ -735,7 +735,7 @@ static int __init hdaps_dmi_match_invert(const struct dmi_system_id *id)
    Note that HDAPS_DMI_MATCH_NORMAL("ThinkPad T42") would match
    "ThinkPad T42p", and enumeration stops after first match,
    so the order of the entries matters. */
-struct dmi_system_id __initdata hdaps_whitelist[] = {
+struct dmi_system_id __initconst hdaps_whitelist[] = {
        HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad R50p", HDAPS_ORIENT_INVERT_XY),
        HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad R60", HDAPS_ORIENT_INVERT_XY),
        HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T41p", HDAPS_ORIENT_INVERT_XY),

Basically just change __initdata to __initconst.

Greets
Evgeni



--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad