Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 6/7] tpm2-tools: do not enforce dependency on tpm2-abrmd
Date: Thu, 17 Jan 2019 20:01:21 +0100	[thread overview]
Message-ID: <874la785xa.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20190117155827.GD2556@scaer> (Yann E. MORIN's message of "Thu, 17 Jan 2019 16:58:27 +0100")

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

Hi,

 >> ** (process:8628): WARNING **: 11:38:39.606: Failed to create
 >> connection with service:
 >> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
 >> com.intel.tss2.Tabrmd was not provided by any .service files
 >> ERROR: Failed to initialize TABRMD TCTI context: 0xa0008
 >> 
 >> The solution is to set the TCTI name to device, either through the
 >> TPM2TOOLS_TCTI_NAME environment variable or the --tcti option.

 > Well, this is very clearly explained in the man page for tpm2_pcrlist. ;-)

Correct, but it is still not obvious.


 > And it turns out that the use of tpm2-abrmd is in fact totally unneeded,
 > even to get proper concurrent access, when using the in-kernel manager
 > exposed as /dev/tmprmN (so says the man page). So, in this case, a
 > userland daemon is not even needed to begin with.

Correct, but the in-kernel manager is relatively new (4.12). There is
various tradeoffs between the in-kernel and user space managers. There
was a presentation about it at Plumbers 2017:

https://blog.linuxplumbersconf.org/2017/ocw//system/presentations/4818/original/TPM2-kernel-evnet-app_tricca-sakkinen.pdf


 > But since any person not completely insane would still want it, then it
 > should stay a select. The very minor minority who really, like
 > really-really, do not want tpm2-abrmd can still remove it with a
 > post-build script.

Sorry, why do you think I am insane for not wanting tpm2-abrmd?

Cleaning up with a post-build script is pretty horrible, especially as
tpm2-abrmd pulls in dbus.


 >> This is imho exactly the kind of use cases imply has been made for.

 > I still think its semantics are much more fuzzy than select or depends-on,
 > and it can cause confusion.

Yes, that is the entire point, E.G. a "weak" select. It behaves the same
as 'default y if foo'.

 >> Is that any different than changing toolchain options or toggling
 >> BR2_PACKAGE_BUSYBOX_SHOW_OTHERS?

 > Sorry, I don't follow you. When you toggle those options, they always do
 > the same thing.

 > But with imply, if you do something like:

 >     make distclean
 >     make menuconfig
 > --> enable tpm2-tools

 > Then tpm2-abrmd is enabled.

 > But if you now go with:

 >     make distclean
 >     make defconfig
 >     make menuconfig
 > --> enable tpm2-tools

 > Then tpm2-abrmd is not enabled, because it was already disabled in the
 > .config.

 > So, this is more confusing than anything else to me, because "sometimes
 > it works, sometimes it does not".

 > Whereas, the toolchain options or the busybox-show-others will always do
 > the same thing.

The point is that they influence other "unrelated" options. Another
example is the places where we have multiple backends where we do
'select foo if !bar'. Here as well behaviour when you then go an enable
bar depends on if you have already exited menuconfig or not (E.G. foo
will stay enabled or not).


 >> Sure, but we can atleast ensure that the tpm2-tools utilites do not fail
 >> out of the box because of a missing obscure dependency and that fairly
 >> common use cases are possible.

 > If you go that route, then you must ensure that the kernel has TPM
 > support configured in. That is, for the kernel we build; we're leaving
 > out in the cold those who build their kernel out of Buildroot...

And that we indeed do when it is possible / the needed kernel options
aren't obvious.

In this case the kernel has several different tpm drivers, so we cannot
really do it.

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2019-01-17 19:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 10:15 [Buildroot] [PATCH v2 1/7] tpm2-tss: do not enforce -fstack-protector-all Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 2/7] tpm2-tss: fix build with BR2_FORTIFY_SOURCE_1 Peter Korsgaard
2019-01-16 13:26   ` Peter Korsgaard
2019-01-25  7:28   ` Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 3/7] tpm2-tools: always disable hardening options Peter Korsgaard
2019-01-16 13:25   ` Peter Korsgaard
2019-01-25  7:28   ` Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 4/7] tpm2-abrmd: do not enforce -fstack-protector-all Peter Korsgaard
2019-01-16 13:25   ` Peter Korsgaard
2019-01-25  7:29   ` Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 5/7] tpm2-abrmd: fix build with BR2_FORTIFY_SOURCE_1 Peter Korsgaard
2019-01-16 13:25   ` Peter Korsgaard
2019-01-25  7:29   ` Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 6/7] tpm2-tools: do not enforce dependency on tpm2-abrmd Peter Korsgaard
2019-01-15 20:43   ` Yann E. MORIN
2019-01-16 11:43     ` Peter Korsgaard
2019-01-17 15:58       ` Yann E. MORIN
2019-01-17 19:01         ` Peter Korsgaard [this message]
2019-01-28 21:23           ` Yann E. MORIN
2019-01-28 22:08             ` Peter Korsgaard
2019-01-24 16:50         ` Arnout Vandecappelle
2019-01-25 15:03           ` Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 7/7] tpm2-abrmd: S80tpm2-abrmd: create pid file at startup Peter Korsgaard
2019-01-16 13:26   ` Peter Korsgaard
2019-01-25  7:30   ` Peter Korsgaard
2019-01-16 13:25 ` [Buildroot] [PATCH v2 1/7] tpm2-tss: do not enforce -fstack-protector-all Peter Korsgaard
2019-01-25  7:28 ` Peter Korsgaard

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=874la785xa.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /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