public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stuart Yoder <stuart.yoder@arm.com>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Thorsten Leemhuis <linux@leemhuis.info>,
	jarkko@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, lenb@kernel.org, rafael@kernel.org,
	jgg@ziepe.ca, peterhuewe@gmx.de, linux-integrity@vger.kernel.org,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: Build error on -next due to tpm_crb.c changes?
Date: Wed, 12 Mar 2025 15:47:10 -0500	[thread overview]
Message-ID: <25269252-e45f-4692-a519-a0703b6800a1@arm.com> (raw)
In-Reply-To: <20250311211700.bwizwecxyxorrwql@bogus>



On 3/11/25 4:17 PM, Sudeep Holla wrote:
> On Tue, Mar 11, 2025 at 01:25:50PM -0500, Stuart Yoder wrote:
>>
>>
>> On 3/11/25 11:51 AM, Thorsten Leemhuis wrote:
>>> On 11.03.25 16:53, Stuart Yoder wrote:
>>>> On 3/11/25 10:21 AM, Thorsten Leemhuis wrote:
>>>>> On 05.03.25 18:36, Stuart Yoder wrote:
>>>> [...]
>>>> So, it should not be possible on one had have
>>>> CONFIG_TCG_ARM_CRB_FFA being true when building tpm_crb.c
>>>> and false resulting in the tpm_crb_ffa.o not being
>>>> picked up in the build.
>>>
>>> Many thx for the answer. Maybe Fedora's way to prepare the .config files
>>> (which my package builds use to be close to Fedora's official packages)
>>> is doing something odd/wrong. Will take a closer look and report back.
>>
>> I've been experimenting with some different build config combinations
>> and have reproduced what must be the issue.
>>
>> This works fine:
>> <*>   TPM 2.0 CRB Interface                                         < >
>> TPM CRB over Arm FF-A Transport
>>
>> This works fine:
>> < >   TPM 2.0 CRB Interface                                         <*>
>> TPM CRB over Arm FF-A Transport
>>
>> This works fine:
>> <*>   TPM 2.0 CRB Interface                                         <*>
>> TPM CRB over Arm FF-A Transport
>>
>> This works fine:
>> <M>   TPM 2.0 CRB Interface                                         <M>
>> TPM CRB over Arm FF-A Transport
>>
>> This fails:
>> <*>   TPM 2.0 CRB Interface                                         <M>
>> TPM CRB over Arm FF-A Transport
>>
>> The 2 drivers are coupled, so we can't have one built as a module
>> and the other built-in.
>>
>> I'm not a Kconfig expert, and need to do some fiddling to see
>> if I can find a Kconfig syntax that prevents that failure scenario.
>>
> 
> 	default y if (TCG_CRB && ARM_FFA_TRANSPORT)
> 
> is the issue here. You can select it as built-in if either or one of the
> TCG_CRB and ARM_FFA_TRANSPORT is a module, but that is exactly what happens.
> Not sure if default value is a must for you. But just depends on each of
> these should be good enough and enable it in defconfig if needed. Or
> you can have multiple default at least 4 combinations I can see. Both
> are =y and either and both are =m

I would like a default, because if someone enables both
ARM_FFA_TRANSPORT and TPM_CRB I don't want them to forget to
turn on TCG_ARM_CRB_FFA.

I've experimented with a few ways of doing this and I think
this is simplest and gives the behavior we want:

config TCG_ARM_CRB_FFA
         tristate "TPM CRB over Arm FF-A Transport"
         depends on ARM_FFA_TRANSPORT && TCG_CRB
         default TCG_CRB

The TCG_ARM_CRB_FFA option only appears if both FFA and
TPM_CRB are enabled. And the default tracks the value
of TPM_CRB.

Thanks,
Stuart




  reply	other threads:[~2025-03-12 20:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 17:36 [PATCH v6 0/5] Add support for the TPM FF-A start method Stuart Yoder
2025-03-05 17:36 ` [PATCH v6 1/5] tpm_crb: implement driver compliant to CRB over FF-A Stuart Yoder
2025-03-06 22:43   ` Jarkko Sakkinen
2025-03-05 17:36 ` [PATCH v6 2/5] tpm_crb: clean-up and refactor check for idle support Stuart Yoder
2025-03-05 17:36 ` [PATCH v6 3/5] ACPICA: add start method for Arm FF-A Stuart Yoder
2025-03-05 17:36 ` [PATCH v6 4/5] tpm_crb: add support for the Arm FF-A start method Stuart Yoder
2025-03-05 17:36 ` [PATCH v6 5/5] Documentation: tpm: add documentation for the CRB FF-A interface Stuart Yoder
2025-03-06 22:45 ` [PATCH v6 0/5] Add support for the TPM FF-A start method Jarkko Sakkinen
2025-03-10 11:19 ` Jarkko Sakkinen
2025-03-11 15:28   ` Sudeep Holla
2025-03-12  6:06     ` Jarkko Sakkinen
2025-03-11 15:21 ` Build error on -next due to tpm_crb.c changes? (was: Re: [PATCH v6 0/5] Add support for the TPM FF-A start method) Thorsten Leemhuis
2025-03-11 15:53   ` Build error on -next due to tpm_crb.c changes? Stuart Yoder
2025-03-11 16:51     ` Thorsten Leemhuis
2025-03-11 18:25       ` Stuart Yoder
2025-03-11 21:17         ` Sudeep Holla
2025-03-12 20:47           ` Stuart Yoder [this message]
2025-03-12  2:51       ` Stuart Yoder
2025-03-12  6:48         ` Thorsten Leemhuis
2025-03-12  6:05       ` Jarkko Sakkinen
2025-03-12  6:00   ` Build error on -next due to tpm_crb.c changes? (was: Re: [PATCH v6 0/5] Add support for the TPM FF-A start method) Jarkko Sakkinen

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=25269252-e45f-4692-a519-a0703b6800a1@arm.com \
    --to=stuart.yoder@arm.com \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=peterhuewe@gmx.de \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@arm.com \
    /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