[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <682241d45df91_260429420@dwillia2-xfh.jf.intel.com.notmuch>
Date: Mon, 12 May 2025 11:45:40 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Greg KH <greg@...ah.com>, Dan Williams <dan.j.williams@...el.com>
CC: Stephen Rothwell <sfr@...b.auug.org.au>,
<sathyanarayanan.kuppuswamy@...ux.intel.com>, <yilun.xu@...el.com>,
<sameo@...osinc.com>, <aik@....com>, <suzuki.poulose@....com>,
<steven.price@....com>, <lukas@...ner.de>, Cedric Xing
<cedric.xing@...el.com>, Thomas Weißschuh
<linux@...ssschuh.net>, Linux Kernel Mailing List
<linux-kernel@...r.kernel.org>, Linux Next Mailing List
<linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the devsec-tsm tree
Greg KH wrote:
> On Thu, May 08, 2025 at 05:37:41PM -0700, Dan Williams wrote:
> > Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > After merging the devsec-tsm tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > >
> > > drivers/virt/coco/guest/tsm-mr.c: In function 'tsm_mr_create_attribute_group':
> > > drivers/virt/coco/guest/tsm-mr.c:228:29: error: assignment to 'const struct bin_attribute * const*' from incompatible pointer type 'struct bin_attribute **' [-Wincompatible-pointer-types]
> > > 228 | ctx->agrp.bin_attrs = no_free_ptr(bas);
> > > | ^
> > >
> > > Caused by commit
> > >
> > > 29b07a7b8f41 ("tsm-mr: Add TVM Measurement Register support")
> > >
> > > interacting with commit
> > >
> > > 9bec944506fa ("sysfs: constify attribute_group::bin_attrs")
> > >
> > > from the driver-core tree.
> > >
> > > I have applied the following merge resolution for today (there must be
> > > a better solution).
> >
> > Indeed.
> >
> > So it looks like while there are plenty of dynamic binary attribute
> > creation users (see sysfs_bin_attr_init() callers). There are zero that
> > attempt to assign dynamically allocated attributes to be registered by a
> > static @groups.
> >
> > The @groups publishing model is preferable because the lifetime rules
> > are all handled by the driver core at device add/del time.
> >
> > So, while there is still casting involved, I think a better solution is
> > to make the allocation const and then cast for init ala incremental
> > patch below. Cedric, if this looks ok to you I'll send out another
> > partial-reroll to get this fixed up so the build breakage stays out of
> > bisection runs.
>
> Ick, yeah, that seems ok.
>
> But what are these binary files for? I looked in the documentation and
> found this entry:
> /sys/devices/virtual/misc/tdx_guest/measurements/rtmr[0123]:sha384
> is that these binary files?
Yes, and the expectation is that other confidential archs (ARM CCA and
RISCV COVE) will also publish a "measurements" group.
> Why is sysfs being used to expose binary "registers" and not done
> through the ioctl api instead? That's an internal kernel-computed
> structure, not coming from the hardware, or am I mistaken?
Cedric clarified that it is coming from hardware/firmware, but I will
also note this file interface is in the same class as
"/sys/class/tpm/tpmX/pcr-<H>/<N>" and
"/sys/kernel/config/tsm/report/$name/outblob". I.e. platform provided
attestation evidence to be shipped to a verifier.
Powered by blists - more mailing lists