On Wed, May 31, 2023 at 10:13 PM Luiz Capitulino <luizcap@xxxxxxxxxx> wrote: > > Hi Paul, > > A number of stable kernels recently backported this upstream commit: > > """ > commit 4ce1f694eb5d8ca607fed8542d32a33b4f1217a5 > Author: Paul Moore <paul@xxxxxxxxxxxxxx> > Date: Wed Apr 12 13:29:11 2023 -0400 > > selinux: ensure av_permissions.h is built when needed > """ > > We're seeing a build issue with this commit where the "crash" tool will fail > to start, it complains that the vmlinux image and /proc/version don't match. > > A minimum reproducer would be having "make" version before 4.3 and building > the kernel with: > > $ make bzImages > $ make modules ... > This only happens with commit 4ce1f694eb5 applied and older "make", in my case I > have "make" version 3.82. > > If I revert 4ce1f694eb5 or use "make" version 4.3 I get identical strings (except > for the "Linux version" part): Thanks Luiz, this is a fun one :/ Based on a quick search, it looks like the grouped target may be the cause, especially for older (pre-4.3) versions of make. Looking through the rest of the kernel I don't see any other grouped targets, and in fact the top level Makefile even mentions holding off on using grouped targets until make v4.3 is common/required. I don't have an older userspace immediately available, would you mind trying the fix/patch below to see if it resolves the problem on your system? It's a cut-n-paste so the patch may not apply directly, but it basically just removes the '&' from the make rule, turning it into an old-fashioned non-grouped target. diff --git a/security/selinux/Makefile b/security/selinux/Makefile index 0aecf9334ec3..df35d4ec46f0 100644 --- a/security/selinux/Makefile +++ b/security/selinux/Makefile @@ -26,5 +26,5 @@ quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions .h cmd_flask = $< $(obj)/flask.h $(obj)/av_permissions.h targets += flask.h av_permissions.h -$(obj)/flask.h $(obj)/av_permissions.h &: scripts/selinux/genheaders/genheaders FORCE +$(obj)/flask.h $(obj)/av_permissions.h: scripts/selinux/genheaders/genheaders F ORCE $(call if_changed,flask) -- paul-moore.com