| Summary: | Cannot strip and sign kernel modules | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Ross Burton <ross.burton> |
| Component: | kernel | Assignee: | Bougrine Anis <anis.bougrine10> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | anis.bougrine10, anuj.mittal, ccasciato, jonathan.yong, mathieu.dubois-briand, randy.macleod, tim.orling, tom.zanussi |
| Version: | 2.6 | ||
| Target Milestone: | 6.99 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Ross Burton
2018-09-21 16:13:58 UTC
That approach should work, and is very similar to what I was thinking. Manual signing is the way to go, since we don't want to mess with how things are stripped (or if they are stripped, etc). We'd want a distro feature (or an existing security flag) to control this optional step (since poking at the .config for kernel options is prone to breakage). I'm not sure how much flexibility is required in any initial attempts, letting the kernel generate the key itself is probably the best thing to do, and allow overrides later. The question of course is then, what to do with the private key. Since SDK and other extensions to the kernel would also need it if signed loading is enforced. With an external key, that is easier, with the autogenerated one, it could be more of an issue. Were you planning to work on this ? or was it headed in my direction ? There's some prior work in oe-core 4c47e5f171fa2603355e2f9183065ce8137a18c7 but that simply disables stripping for signed modules. Very much a work around and not a solution. Please also take into account compressed module support in stripping/signing. Bulk move from 4.99 or 0.00 to 5.99 A patch has been submitted to fix this issue. Thank you Ross Burton for reporting this issue. Fixes merged: https://git.openembedded.org/openembedded-core/commit/?id=1a330e61be8953aee5ef31a066e83a23eb8ac950 https://git.openembedded.org/openembedded-core/commit/?id=c4dd28c7d102497a3851c867eb6a0ae1bcfff2ca https://git.openembedded.org/openembedded-core/commit/?id=a608d107cca13587cd45be45ddfbc4bfdc228f2c |