linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"lkp@intel.com" <lkp@intel.com>
Subject: Re: [PATCH] powerpc/security: Provide stubs for when PPC_BARRIER_NOSPEC isn't enabled
Date: Wed, 02 Mar 2022 23:08:07 +0530	[thread overview]
Message-ID: <1646242090.aoirhcmddz.naveen@linux.ibm.com> (raw)
In-Reply-To: <a6751b0c-23ad-0f22-218a-cc808ad1e92c@csgroup.eu>

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


  reply	other threads:[~2022-03-02 17:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 10:07 [PATCH] powerpc/security: Provide stubs for when PPC_BARRIER_NOSPEC isn't enabled Naveen N. Rao
2022-02-23 14:14 ` Christophe Leroy
2022-03-02 17:38   ` Naveen N. Rao [this message]
2022-03-03 13:01   ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1646242090.aoirhcmddz.naveen@linux.ibm.com \
    --to=naveen.n.rao@linux.vnet.ibm.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lkp@intel.com \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).