Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 891691

Summary: sys-kernel/gentoo-kernel: Error (installing?) nouveau firmware to /lib/firmware/nvidia
Product: Gentoo Linux Reporter: Mirko Guenther <renegart>
Component: Current packagesAssignee: Distribution Kernel Project <dist-kernel>
Status: RESOLVED INVALID    
Severity: normal CC: jstein, mgorny
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Build log
Kernel Config
firmware file permissions
dump whole firmware directory

Description Mirko Guenther 2023-01-22 10:59:11 UTC
I'm try to switch from 'gentoo-sources' to 'gentoo-kernel' (6.1.7)
Compiling the 'gentoo-sources' package works fine, with 'gentoo-kernel' I get always an error building the nouveau driver.

'make[6]: stat: /lib/firmware/nvidia/gp108/sec2/desc.bin: Permission denied' and more

Reproducible: Always



Expected Results:  
works same as with 'gentoo-sources' package
Comment 1 Mirko Guenther 2023-01-22 11:01:00 UTC
Created attachment 848985 [details]
Build log
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-01-23 07:09:59 UTC
Hmm, that's interesting.  I presume you're using the generic config and not a customized kernel config?

Our -bin builds are done on top of installation image without linux-firmware installed, so I guess this is not strictly necessary.

However, this also seems to indicate a permission problem.  FWICS all files installed by linux-firmware are world-readable.  Not sure if this is necessarily the best approach, though.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-01-23 07:11:09 UTC
Oh wait, you are using a custom config.  Please include your config then.
Comment 4 Mirko Guenther 2023-01-23 10:38:42 UTC
Created attachment 849079 [details]
Kernel Config

This config work with 'gentoo-sources'
Comment 5 Mirko Guenther 2023-01-23 10:40:42 UTC
'sys-kernel/linux-firmware' is installed on my system.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-01-23 11:31:46 UTC
What are the directory permissions all the way down to:

/lib/firmware/nvidia/gp108/sec2/desc.bin

?
Comment 7 Mirko Guenther 2023-01-28 13:15:00 UTC
Created attachment 849357 [details]
firmware file permissions

I've dumped the whole tree of 'nvidia' firmware installed by 'sys-kernel/linux-firmware'
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-01-28 13:18:26 UTC
(In reply to Mirko Guenther from comment #7)
> Created attachment 849357 [details]
> firmware file permissions
> 
> I've dumped the whole tree of 'nvidia' firmware installed by
> 'sys-kernel/linux-firmware'

I don't see anything obviously wrong here, though portage:portage ownership looks suspicious.  Please list the parent directories as well.
Comment 9 Mirko Guenther 2023-02-05 09:02:11 UTC
Created attachment 849888 [details]
dump whole firmware directory

I've attached the whole firmware directory
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-05 10:33:55 UTC
[drwx------ root     root    ]  firmware

That's your problem.  If unprivileged users can't access firmware files, you can't expect userpriv builds to work.