On Wed, Dec 11, 2024 at 09:19:04AM +0100, Stefano Garzarella wrote:
> > After that, there is no meaningful shared code here, and maybe the
> > TPM_CHIP_FLAG_IRQ hack can be avoided too.
>
> IIUC you are proposing the following steps:
> - extend tpm_class_ops to add a new send_recv() op and use it
On Wed, Dec 11, 2024 at 04:38:29PM +0100, Stefano Garzarella wrote:
> Except for the call to pops->sendrcv(buffer) the rest depends on how
> the TCG TPM reference implementation [1] expects the request/response
> to be formatted (we refer to this protocol with MSSIM).
Make a small inline helper t
On Tue, Dec 10, 2024 at 03:34:23PM +0100, Stefano Garzarella wrote:
> + if (platform_device_add_data(&tpm_device, &pops, sizeof(pops)))
> + return -ENODEV;
> + if (platform_device_register(&tpm_device))
> + return -ENODEV;
This seems
On Tue, Dec 10, 2024 at 09:55:41AM -0500, James Bottomley wrote:
> On Tue, 2024-12-10 at 10:40 -0400, Jason Gunthorpe wrote:
> > On Tue, Dec 10, 2024 at 03:34:23PM +0100, Stefano Garzarella wrote:
> >
> > > + if (platform_device_add_data(&tpm_devi
On Tue, Jan 14, 2025 at 11:42:34AM +0100, Stefano Garzarella wrote:
> Hi Jarkko,
>
> On Thu, 19 Dec 2024 at 17:07, Stefano Garzarella wrote:
> >
> > On Thu, Dec 19, 2024 at 05:40:58PM +0200, Jarkko Sakkinen wrote:
> > >On Thu Dec 19, 2024 at 5:35 PM EET, Stefano Garzarella wrote:
> > >> So to use
On Tue, Jan 14, 2025 at 05:51:33PM +0100, Stefano Garzarella wrote:
> Otherwise we need an intermediate module in drivers/char/tpm. Here we
> have 2 options:
> 1. continue as James did by creating a platform_device.
> 2. or we could avoid this by just exposing a registration API invoked by
On Tue, Mar 18, 2025 at 05:18:53PM +0100, Stefano Garzarella wrote:
> I see, thanks for the clarification!
> I saw that with devm_get_free_pages() I can easily allocate a
> resource-managed page, so I'll do that in v4.
As a general note you should just use kmalloc these days, even for
PAGE_SIZE.
On Tue, Mar 11, 2025 at 11:01:30AM +0100, Stefano Garzarella wrote:
> This driver does not support interrupts, and receiving the response is
> synchronous with sending the command.
>
> Let's simplify the driver by implementing the new send_recv() op.
>
> Signed-off-by: Stefano Garzarella
> ---
>
On Wed, Mar 26, 2025 at 02:11:12PM +0200, Jarkko Sakkinen wrote:
> Generally speaking I don't see enough value in complicating
> callback interface. It's better to handle complications in
> the leaves (i.e. dictatorship of majority ;-) ).
That is very much not the way most driver subsystems view
g space after \n
> V2: remove entire message, originally just removed a trailing space
> V3: replace -EFAULT with -ENOMEM
> V4: send correct fix for V3, actually return -ENOMEM
> ---
>
> drivers/char/tpm/eventlog/tpm1.c | 7 ++-
> 1 file changed, 2 insertions(+), 5 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
On Fri, Feb 28, 2025 at 06:07:19PM +0100, Stefano Garzarella wrote:
> +/*
> + * tpm_svsm_remove() lives in .exit.text. For drivers registered via
> + * module_platform_driver_probe() this is ok because they cannot get unbound
> + * at runtime. So mark the driver struct with __refdata to prevent mod
On Fri, Feb 28, 2025 at 06:07:14PM +0100, Stefano Garzarella wrote:
> I put RFC back in because we haven't yet decided if this is the best
> approach to support SVSM vTPM, but I really like to receive feedbacks
> especially from the maintainer/reviewers of the TPM subsystem, to see if
> this approa
On Mon, Mar 03, 2025 at 05:19:05PM +0100, Stefano Garzarella wrote:
> On Fri, Feb 28, 2025 at 08:28:19PM -0400, Jason Gunthorpe wrote:
> > On Fri, Feb 28, 2025 at 06:07:19PM +0100, Stefano Garzarella wrote:
> > > +/*
> > > + * tpm_svsm_remove() lives in .exit.text.
On Wed, Mar 05, 2025 at 10:04:25AM +0100, Stefano Garzarella wrote:
> Jason suggested the send_recv() ops [2], which I liked, but if you prefer to
> avoid that, I can restore what we did in v1 and replace the
> TPM_CHIP_FLAG_IRQ hack with your point 2 (or use TPM_CHIP_FLAG_IRQ if you
> think it is
On Sun, Mar 02, 2025 at 09:33:59PM +0200, Jarkko Sakkinen wrote:
> WARNING: line length of 102 exceeds 100 columns
> #764: FILE: drivers/char/tpm/tpm_crb.c:821:
> + FW_BUG "TPM2 ACPI table has wrong size %u for
> start method type %d\n",
Just ignore that, it is an er
On Tue, Jul 01, 2025 at 05:51:35PM +0300, Jarkko Sakkinen wrote:
> @@ -32,28 +32,30 @@ struct tpm_readpubek_out {
> static ssize_t pubek_show(struct device *dev, struct device_attribute *attr,
> char *buf)
> {
> - struct tpm_buf tpm_buf;
> + struct tpm_buf *tpm_buf
On Thu, Jun 26, 2025 at 12:37:56AM +0300, Jarkko Sakkinen wrote:
> @@ -323,7 +323,7 @@ unsigned long tpm1_calc_ordinal_duration(struct tpm_chip
> *chip, u32 ordinal)
> */
> static int tpm1_startup(struct tpm_chip *chip)
> {
> - struct tpm_buf buf;
> + CLASS(tpm_buf, buf)();
> int
17 matches
Mail list logo