* Re: [PATCH net-next v3 01/16] mctp: Add MCTP base [not found] ` <20210723082932.3570396-2-jk@codeconstruct.com.au> @ 2021-08-12 9:45 ` Geert Uytterhoeven 2021-08-12 11:15 ` Jeremy Kerr 0 siblings, 1 reply; 4+ messages in thread From: Geert Uytterhoeven @ 2021-08-12 9:45 UTC (permalink / raw To: Jeremy Kerr Cc: Masahiro Yamada, Michal Marek, netdev, linux-kbuild, linux-kernel, Matt Johnston, Andrew Jeffery Hi Jeremy, CC kbuild On Fri, 23 Jul 2021, Jeremy Kerr wrote: > Add basic Kconfig, an initial (empty) af_mctp source object, and > {AF,PF}_MCTP definitions, and the required selinux definitions. > > Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Thanks for your patch, which is now commit bc49d8169aa72295 ("mctp: Add MCTP base") in net-next. > --- a/security/selinux/hooks.c > +++ b/security/selinux/hooks.c > @@ -1330,7 +1330,9 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc > return SECCLASS_SMC_SOCKET; > case PF_XDP: > return SECCLASS_XDP_SOCKET; > -#if PF_MAX > 45 > + case PF_MCTP: > + return SECCLASS_MCTP_SOCKET; When building an allmodconfig kernel, I got: security/selinux/hooks.c: In function 'socket_type_to_security_class': security/selinux/hooks.c:1334:32: error: 'SECCLASS_MCTP_SOCKET' undeclared (first use in this function); did you mean 'SECCLASS_SCTP_SOCKET'? 1334 | return SECCLASS_MCTP_SOCKET; | ^~~~~~~~~~~~~~~~~~~~ | SECCLASS_SCTP_SOCKET > +#if PF_MAX > 46 > #error New address family defined, please update this function. > #endif > } > diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h > index 62d19bccf3de..084757ff4390 100644 > --- a/security/selinux/include/classmap.h > +++ b/security/selinux/include/classmap.h > @@ -246,6 +246,8 @@ struct security_class_mapping secclass_map[] = { > NULL } }, > { "xdp_socket", > { COMMON_SOCK_PERMS, NULL } }, > + { "mctp_socket", > + { COMMON_SOCK_PERMS, NULL } }, > { "perf_event", > { "open", "cpu", "kernel", "tracepoint", "read", "write", NULL } }, > { "lockdown", The needed definition should be auto-generated from the above file, but there seems to be an issue with the dependencies, as the file was not regenerated. Manually removing security/selinux/flask.h in the build dir fixed the issue. I'm building in a separate build directory, using make -j 12. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v3 01/16] mctp: Add MCTP base 2021-08-12 9:45 ` [PATCH net-next v3 01/16] mctp: Add MCTP base Geert Uytterhoeven @ 2021-08-12 11:15 ` Jeremy Kerr 2021-08-12 11:32 ` Geert Uytterhoeven 2021-10-03 21:08 ` Steven Rostedt 0 siblings, 2 replies; 4+ messages in thread From: Jeremy Kerr @ 2021-08-12 11:15 UTC (permalink / raw To: Geert Uytterhoeven Cc: Masahiro Yamada, Michal Marek, netdev, linux-kbuild, linux-kernel, Matt Johnston, Andrew Jeffery 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v3 01/16] mctp: Add MCTP base 2021-08-12 11:15 ` Jeremy Kerr @ 2021-08-12 11:32 ` Geert Uytterhoeven 2021-10-03 21:08 ` Steven Rostedt 1 sibling, 0 replies; 4+ messages in thread From: Geert Uytterhoeven @ 2021-08-12 11:32 UTC (permalink / raw To: Jeremy Kerr Cc: Masahiro Yamada, Michal Marek, netdev, linux-kbuild, Linux Kernel Mailing List, Matt Johnston, Andrew Jeffery Hi Jeremy, On Thu, Aug 12, 2021 at 1:15 PM Jeremy Kerr <jk@codeconstruct.com.au> 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 -- geert@linux-m68k.org 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v3 01/16] mctp: Add MCTP base 2021-08-12 11:15 ` Jeremy Kerr 2021-08-12 11:32 ` Geert Uytterhoeven @ 2021-10-03 21:08 ` Steven Rostedt 1 sibling, 0 replies; 4+ messages in thread From: Steven Rostedt @ 2021-10-03 21:08 UTC (permalink / raw To: Jeremy Kerr Cc: Geert Uytterhoeven, Masahiro Yamada, Michal Marek, netdev, linux-kbuild, linux-kernel, Matt Johnston, Andrew Jeffery On Thu, 12 Aug 2021 19:15:24 +0800 Jeremy Kerr <jk@codeconstruct.com.au> 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 > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-03 21:08 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20210723082932.3570396-1-jk@codeconstruct.com.au> [not found] ` <20210723082932.3570396-2-jk@codeconstruct.com.au> 2021-08-12 9:45 ` [PATCH net-next v3 01/16] mctp: Add MCTP base Geert Uytterhoeven 2021-08-12 11:15 ` Jeremy Kerr 2021-08-12 11:32 ` Geert Uytterhoeven 2021-10-03 21:08 ` Steven Rostedt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).