2021-08-12 11:29:22

by Jeremy Kerr

[permalink] [raw]
Subject: Re: [PATCH net-next v3 01/16] mctp: Add MCTP base

Hi Geert,

Thanks for the testing!

> When building an allmodconfig kernel, I got:

[...]

I don't see this on a clean allmodconfig build, nor when building the
previous commit then the MCTP commit with something like:

git checkout bc49d81^
make O=obj.allmodconfig allmodconfig
make O=obj.allmodconfig -j16
git checkout bc49d81
make O=obj.allmodconfig -j16

- but it seems like it might be up to the ordering of a parallel build.

From your description, it does sound like it's not regenerating flask.h;
the kbuild rules would seem to have a classmap.h -> flask.h dependency:

$(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h

quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h
cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h

targets += flask.h av_permissions.h
$(obj)/flask.h: $(src)/include/classmap.h FORCE
$(call if_changed,flask)

however, classmap.h is #include-ed as part of the genheaders binary
build, rather than read at runtime; maybe $(obj)/flask.h should depend
on the genheaders binary, rather than $(src)/include/classmap.h ?

If you can reproduce, can you compare the ctimes with:

stat scripts/selinux/genheaders/genheaders security/selinux/flask.h

in your object dir?

Cheers,


Jeremy


2021-08-12 12:26:40

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH net-next v3 01/16] mctp: Add MCTP base

Hi Jeremy,

On Thu, Aug 12, 2021 at 1:15 PM Jeremy Kerr <[email protected]> wrote:
> > When building an allmodconfig kernel, I got:
>
> [...]
>
> I don't see this on a clean allmodconfig build, nor when building the
> previous commit then the MCTP commit with something like:
>
> git checkout bc49d81^
> make O=obj.allmodconfig allmodconfig
> make O=obj.allmodconfig -j16
> git checkout bc49d81
> make O=obj.allmodconfig -j16
>
> - but it seems like it might be up to the ordering of a parallel build.
>
> From your description, it does sound like it's not regenerating flask.h;
> the kbuild rules would seem to have a classmap.h -> flask.h dependency:
>
> $(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h
>
> quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h
> cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
>
> targets += flask.h av_permissions.h
> $(obj)/flask.h: $(src)/include/classmap.h FORCE
> $(call if_changed,flask)
>
> however, classmap.h is #include-ed as part of the genheaders binary
> build, rather than read at runtime; maybe $(obj)/flask.h should depend
> on the genheaders binary, rather than $(src)/include/classmap.h ?
>
> If you can reproduce, can you compare the ctimes with:
>
> stat scripts/selinux/genheaders/genheaders security/selinux/flask.h
>
> in your object dir?

Unfortunately I can't seem to reproduce this anymore.
Goodbye, Heisenbug!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2021-10-03 21:12:01

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH net-next v3 01/16] mctp: Add MCTP base

On Thu, 12 Aug 2021 19:15:24 +0800
Jeremy Kerr <[email protected]> wrote:

> Hi Geert,
>
> Thanks for the testing!
>
> > When building an allmodconfig kernel, I got:
>
> [...]
>
> I don't see this on a clean allmodconfig build, nor when building the
> previous commit then the MCTP commit with something like:
>
> git checkout bc49d81^
> make O=obj.allmodconfig allmodconfig
> make O=obj.allmodconfig -j16
> git checkout bc49d81
> make O=obj.allmodconfig -j16
>
> - but it seems like it might be up to the ordering of a parallel build.
>
> >From your description, it does sound like it's not regenerating flask.h;
> the kbuild rules would seem to have a classmap.h -> flask.h dependency:
>
> $(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h
>
> quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h
> cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
>
> targets += flask.h av_permissions.h
> $(obj)/flask.h: $(src)/include/classmap.h FORCE
> $(call if_changed,flask)
>
> however, classmap.h is #include-ed as part of the genheaders binary
> build, rather than read at runtime; maybe $(obj)/flask.h should depend
> on the genheaders binary, rather than $(src)/include/classmap.h ?
>
> If you can reproduce, can you compare the ctimes with:
>
> stat scripts/selinux/genheaders/genheaders security/selinux/flask.h

I just hit the exact same issue. I build with O=../build/ and by removing
security/selinux/flask.h and av_permission.h, it built fine afterward.
Appears to be a dependency issue.

-- Steve

>
> in your object dir?
>
> Cheers,
>
>
> Jeremy
>