Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
deblobed kernel failing to compile the install_firmware mdul
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
Joseph Powers
n00b
n00b


Joined: 26 Nov 2017
Posts: 41

PostPosted: Fri Jan 12, 2018 4:02 am    Post subject: deblobed kernel failing to compile the install_firmware mdul Reply with quote

So I deblobed the 4.14.11 kernel and igenkernel has haled on this step.

Code:

*         >> Installing firmware ('make firmware_install') due to CONFIG_FIRMWARE_IN_KERNEL != y...
* ERROR: Failed to compile the "firmware_install" target...
*
* -- Grepping log... --
*
*  AR      arch/x86/kernel/cpu/mcheck/built-in.o
*  CC      arch/x86/kernel/cpu/microcode/core.o
*  CC      kernel/debug/gdbstub.o
*  CC      arch/x86/kernel/cpu/microcode/intel.o
*arch/x86/kernel/cpu/microcode/intel.c: In function 'load_builtin_intel_microcode':
*arch/x86/kernel/cpu/microcode/intel.c:508:16: warning: too many arguments for format [-Wformat-extra-args]
*  sprintf(name, "/*(DEBLOBBED)*/",
*                ^
*arch/x86/kernel/cpu/microcode/intel.c: In function 'request_microcode_fw':
*arch/x86/kernel/cpu/microcode/intel.c:932:16: warning: too many arguments for format [-Wformat-extra-args]
*--
*                ^
*  AR      kernel/debug/built-in.o
*  CC      kernel/events/core.o
*  CC      arch/x86/kernel/cpu/microcode/amd.o
*arch/x86/kernel/cpu/microcode/amd.c: In function 'get_builtin_microcode':
*arch/x86/kernel/cpu/microcode/amd.c:246:5: warning: too many arguments for format [-Wformat-extra-args]
*     "/*(DEBLOBBED)*/", family);
*     ^
*arch/x86/kernel/cpu/microcode/amd.c: In function 'request_microcode_amd':
*arch/x86/kernel/cpu/microcode/amd.c:721:38: warning: too many arguments for format [-Wformat-extra-args]
*--
*  CC      kernel/module_signing.o
*  CC      kernel/kallsyms.o
*  CC      mm/vmpressure.o
*  CC      mm/swap_cgroup.o
*  CC      kernel/acct.o
*  CC      mm/memory-failure.o
*--
* Running with options: --menuconfig --oldconfig --save-config --symlink --lvm --luks all
* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
*
* ERROR: Failed to compile the "firmware_install" target...
*
* -- End log... --
*

I'm using a 64 bit system (intel, core2duo, x200 thinkpad) so I think that getting rid of genkernel calling up that specific portion of the microcode will do the trick. I'm not sure how though.
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 437

PostPosted: Fri Jan 12, 2018 5:35 am    Post subject: Reply with quote

All the firmware was removed from the kernel in 4.14. This is fixed in both genkernel and genkernel-next, but the version with the fix hasn't been marked as stable yet
Back to top
View user's profile Send private message
Joseph Powers
n00b
n00b


Joined: 26 Nov 2017
Posts: 41

PostPosted: Fri Jan 12, 2018 10:43 pm    Post subject: Reply with quote

salahx wrote:
All the firmware was removed from the kernel in 4.14. This is fixed in both genkernel and genkernel-next, but the version with the fix hasn't been marked as stable yet

Just to make certain that we are both on the right track. This is the deblobed script that I ran.
https://linux-libre.fsfla.org/pub/linux-libre/releases/4.14.11-gnu/deblob-$main as described on Kernel Deblobing - Gentoo Wiki
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5761

PostPosted: Sat Jan 13, 2018 4:03 am    Post subject: Reply with quote

The sole purpose of the microcode driver is to load firmware blobs, so if you want linux-libre, disable microcode.ko entirely.

Beware that if your CPU needs microcode patches to mitigate Meltdown/Spectre, this will leave you vulnerable.
Back to top
View user's profile Send private message
Joseph Powers
n00b
n00b


Joined: 26 Nov 2017
Posts: 41

PostPosted: Sat Jan 13, 2018 5:18 am    Post subject: Reply with quote

Ant P. wrote:
The sole purpose of the microcode driver is to load firmware blobs, so if you want linux-libre, disable microcode.ko entirely.

Beware that if your CPU needs microcode patches to mitigate Meltdown/Spectre, this will leave you vulnerable.

Isn't the code just obfuscated Assembly? Is there other versions of the KPTI patch that is not proprietary? What CPU's have the free version of the patch if that is what you implied?
Back to top
View user's profile Send private message
gengreen
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2017
Posts: 84

PostPosted: Sat Jan 13, 2018 7:44 am    Post subject: Reply with quote

Joseph Powers wrote:
Ant P. wrote:
The sole purpose of the microcode driver is to load firmware blobs, so if you want linux-libre, disable microcode.ko entirely.

Beware that if your CPU needs microcode patches to mitigate Meltdown/Spectre, this will leave you vulnerable.

Isn't the code just obfuscated Assembly? Is there other versions of the KPTI patch that is not proprietary? What CPU's have the free version of the patch if that is what you implied?


I think what you are asking will find no answer here for legal reason, intel microcode is proprietary and is not open firmware.

https://reverseengineering.stackexchange.com/a/16298

Edit :

To complete my answer, the intel-microcode is under license intel-ucode which state :

Quote:
* No reverse engineering, decompilation, or disassembly of this
software is permitted.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13845

PostPosted: Sat Jan 13, 2018 6:10 pm    Post subject: Reply with quote

Joseph Powers wrote:
Isn't the code just obfuscated Assembly? Is there other versions of the KPTI patch that is not proprietary? What CPU's have the free version of the patch if that is what you implied?
In a very strict sense, it probably is, but there's no guarantee that any particular microcode is implemented purely in the same assembly that is used for regular native code meant to run on that CPU. It could be an entirely separate language that the CPU understands.

KPTI is a Linux kernel patch. Kernel code is copyrighted, but licensed under terms generally not described as "proprietary." KPTI can be used without microcode, but there are claims that using it without microcode is less effective than using it with microcode.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43195
Location: 56N 3W

PostPosted: Sat Jan 13, 2018 7:54 pm    Post subject: Reply with quote

Ant P. wrote:
The sole purpose of the microcode driver is to load firmware blobs, so if you want linux-libre, disable microcode.ko entirely.

Beware that if your CPU needs microcode patches to mitigate Meltdown/Spectre, this will leave you vulnerable.


Your CPU has microcode embedded when its manufactured. Its moved to a piece of SRAM in the CPU so that it can be exercised at the full speed of the CPU.
Uses who have a problem with linux-libre need to find other CPUs,

Joseph Powers,

The microcode is not assembly. It controls the individual CPU states as it steps through each possible instruction.
Each assembler opcode (even simple ones) will break down in to many microcode steps.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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