1 |
On Mon, Sep 27, 2021 at 4:28 PM Jason A. Donenfeld <zx2c4@g.o> wrote: |
2 |
> |
3 |
> On Mon, Sep 27, 2021 at 11:44 AM Robin H. Johnson <robbat2@g.o> wrote: |
4 |
> > I think we need to strip out a lot of the crap about trying to detect |
5 |
> > things in the stuff being built, and reduce the check to the simplest |
6 |
> > possible form: |
7 |
> > $ time zgrep -w CONFIG_PACKET /proc/config.gz |
8 |
> > CONFIG_PACKET=y |
9 |
> |
10 |
> The results from our current method could of course be cached, and |
11 |
> even cached between runs, by just relying on `/proc/version` changing |
12 |
> for different kernels. This seems easy enough to do. |
13 |
> |
14 |
> Alternatively, sure, we could require that everyone has /proc/config |
15 |
> in their kernel config. Many kernels don't have this (mine doesn't), |
16 |
> but we could add it to the base requirements. |
17 |
|
18 |
I think it would be reasonable to check a couple fallback locations: |
19 |
|
20 |
/proc/config.gz |
21 |
/lib/modules/$(uname -r)/build/.config |
22 |
/boot/config-$(uname-r) |
23 |
|
24 |
The slowness really comes from guessing the kernel build location and |
25 |
invoking the kernel build system via make. Avoiding that is a big |
26 |
improvement. |