[PATCH] powerpc/security: Provide stubs for when PPC_BARRIER_NOSPEC isn't enabled

Naveen N. Rao naveen.n.rao at linux.vnet.ibm.com
Thu Mar 3 04:38:07 AEDT 2022


Christophe Leroy wrote:
> 
> 
> Le 10/01/2022 à 11:07, Naveen N. Rao a écrit :
>> kernel test robot reported the below build error with a randconfig:
>>    powerpc64-linux-ld: arch/powerpc/net/bpf_jit_comp64.o:(.toc+0x0):
>>    undefined reference to `powerpc_security_features'
>> 
>> This can happen if CONFIG_PPC_BARRIER_NOSPEC is not enabled. Address
>> this by providing stub functions for security_ftr_enabled() and related
>> helpers when the config option is not enabled.
> 
> Looks like this can happen only when E500 is not selected.
> 
> But what kind of CPU do we have if it's not a E500 ?
> 
> AFAICS in cputable.c, if not a PPC32 and not a BOOK3S_64 is must be a 
> E500 otherwise there's just no CPU.

This was triggered for a 64-bit build and the bug report is:
http://lkml.kernel.org/r/202201082018.ACTZm4jh-lkp@intel.com

The randconfig used is:
https://download.01.org/0day-ci/archive/20220108/202201082018.ACTZm4jh-lkp@intel.com/config

It just selects the generic cpu and BOOK3E_64:

#
# Processor support
#
# CONFIG_PPC_BOOK3S_64 is not set
CONFIG_PPC_BOOK3E_64=y
CONFIG_GENERIC_CPU=y
CONFIG_PPC_BOOK3E=y
CONFIG_PPC_FPU_REGS=y
CONFIG_PPC_FPU=y
CONFIG_BOOKE=y
CONFIG_PPC_MMU_NOHASH=y
CONFIG_PPC_BOOK3E_MMU=y
CONFIG_PMU_SYSFS=y
# CONFIG_SMP is not set
CONFIG_NR_CPUS=1
CONFIG_PPC_DOORBELL=y
# end of Processor support

> 
> Should we make Kconfig stricter instead to avoid the Robot selecting a 
> crazy config ?

If that config is indeed not possible, it sure will be nice to prevent 
that.


- Naveen



More information about the Linuxppc-dev mailing list