Re: [PATCH] page flags: prioritize kasan bits over last-cpuid

From: Arnd Bergmann
Date: Tue Aug 06 2019 - 07:22:42 EST


On Mon, Aug 5, 2019 at 10:19 PM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> On Mon, Aug 05, 2019 at 09:57:59PM +0200, Arnd Bergmann wrote:
> > On Mon, Aug 5, 2019 at 8:52 PM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> > > On Mon, Aug 05, 2019 at 08:35:40PM +0200, Arnd Bergmann wrote:
> > >
> > > No. I see the failure in next-20190729..next-20190805.
> > >
> > > I didn't try to apply that patch, but I don't see
> > > arch/mips/vdso/vdso.h in the tree. I only see
> > >
> > > arch/mips/include/asm/vdso.h
> > > arch/mips/include/asm/vdso/vdso.h
> > >
> > > Are you sure that your patch can be applied as-is ?
> >
> > Ah, right, we now have support for the generic vdso on mips,
> > so the file got moved from arch/mips/vdso/vdso.h to
> > arch/mips/include/asm/vdso/vdso.h
> >
> > Try applying it to the new location then. I think it should still apply,
> > but have not tried it.
> >
>
> Turns out it is applied there (it looks like it was merged into
> the original patch). But it doesn't help; the build failure is
> still there. Reverting "page flags: prioritize kasan bits over
> last-cpuid" on top of next-20190805 fixes the problem for me.

I found the problem now: the vdso conversion added a new file
arch/mips/vdso/config-n32-o32-env.c that contains this block

#if defined(CONFIG_MIPS32_O32) || defined(CONFIG_MIPS32_N32)
#undef CONFIG_64BIT
#define CONFIG_32BIT 1
#define CONFIG_GENERIC_ATOMIC64 1
#endif

while the header contains

#if _MIPS_SIM != _MIPS_SIM_ABI64 && defined(CONFIG_64BIT)
/* Building 32-bit VDSO for the 64-bit kernel. Fake a 32-bit Kconfig. */
#define BUILD_VDSO32_64
#undef CONFIG_64BIT
#define CONFIG_32BIT 1
#ifndef __ASSEMBLY__
#include <asm-generic/atomic64.h>
#endif
#endif

The lsecond #if check thus never triggers as CONFIG_64BIT
is already disabled by the time we get there.

I'll send a fixup.

Arnd