Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]Can't sign kernel module. Unrecognized character.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Frustration
n00b
n00b


Joined: 17 Sep 2016
Posts: 26

PostPosted: Fri Sep 30, 2016 5:31 pm    Post subject: [Solved]Can't sign kernel module. Unrecognized character. Reply with quote

Hi,

I'm trying to sign kernel modules:
Code:
# perl /usr/src/linux/scripts/sign-file sha512 /usr/src/linux/certs/signing_key.pem /usr/src/linux/certs/signing_key.x509 /lib/modules/4.4.21-gentoo/video/nvidia-drm.ko

However I get:
Code:
Unrecognized character \x7F; marked by <-- HERE after <-- HERE near column 1 at /usr/src/linux/scripts/sign-file line 1.


Googling didn't help me at all, very rare problem. I've tried appending "use utf8" parameter to perl command and using .priv key instead of .pem, but that doesn't help.

My kernel settings if that helps:
Code:
zcat /proc/config.gz | grep CONFIG_MODULE_SIG


CONFIG_MODULE_SIG=y
CONFIG_MODULE_SIG_FORCE=y
CONFIG_MODULE_SIG_ALL=y
# CONFIG_MODULE_SIG_SHA1 is not set
# CONFIG_MODULE_SIG_SHA224 is not set
# CONFIG_MODULE_SIG_SHA256 is not set
# CONFIG_MODULE_SIG_SHA384 is not set
CONFIG_MODULE_SIG_SHA512=y
CONFIG_MODULE_SIG_HASH="sha512"
CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"


Thanks!


Last edited by Frustration on Sat Oct 01, 2016 10:57 am; edited 1 time in total
Back to top
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1330

PostPosted: Fri Sep 30, 2016 7:09 pm    Post subject: Re: Can't sign kernel module. Unrecognized character. Reply with quote

Frustration wrote:
...
Googling didn't help me at all, very rare problem
...

https://wiki.gentoo.org/wiki/Signed_kernel_module_support#Manually_signing_modules
See if this helps.
Back to top
View user's profile Send private message
Frustration
n00b
n00b


Joined: 17 Sep 2016
Posts: 26

PostPosted: Sat Oct 01, 2016 10:59 am    Post subject: Reply with quote

quilosaq,

Thanks, man!
It did help me. Sorry for my inattentiveness, I had seen that wiki page before but for some reason thought that it was all the same perl script, not a binary. Everything works now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum