lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXFg1a5ezoVBvrZ7xc7oM2zH-Phu1eNoXv+YZ+Yda1k7SQ@mail.gmail.com>
Date:   Wed, 17 Mar 2021 09:29:23 +0100
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Jens Wiklander <jens.wiklander@...aro.org>
Cc:     Ran Wang <ran.wang_1@....com>, op-tee@...ts.trustedfirmware.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] optee: enable apci support

On Wed, 17 Mar 2021 at 09:04, Jens Wiklander <jens.wiklander@...aro.org> wrote:
>
> On Fri, Mar 12, 2021 at 04:36:53PM +0800, Ran Wang wrote:
> > This patch add ACPI support for optee driver.
> >
> > Signed-off-by: Ran Wang <ran.wang_1@....com>
> > ---
> >  drivers/tee/optee/core.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
> > index cf4718c6d35d..8fb261f4b9db 100644
> > --- a/drivers/tee/optee/core.c
> > +++ b/drivers/tee/optee/core.c
> > @@ -5,6 +5,7 @@
> >
> >  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> >
> > +#include <linux/acpi.h>
> >  #include <linux/arm-smccc.h>
> >  #include <linux/errno.h>
> >  #include <linux/io.h>
> > @@ -735,12 +736,21 @@ static const struct of_device_id optee_dt_match[] = {
> >  };
> >  MODULE_DEVICE_TABLE(of, optee_dt_match);
> >
> > +#ifdef CONFIG_ACPI
> > +static const struct acpi_device_id optee_acpi_match[] = {
> > +     { "OPTEE01",},

You cannot just invent ACPI HIDs like that. The 4 character prefix is
a vendor ID that is assigned by the UEFI forum, the 4 following digits
are up to the vendor to assign,

> > +     { },
> > +};
> > +MODULE_DEVICE_TABLE(acpi, dwc3_acpi_match);

dwc3_acpi_match ?? Does this even build?


> > +#endif
> > +
> >  static struct platform_driver optee_driver = {
> >       .probe  = optee_probe,
> >       .remove = optee_remove,
> >       .driver = {
> >               .name = "optee",
> >               .of_match_table = optee_dt_match,
> > +             .acpi_match_table = ACPI_PTR(optee_acpi_match),
> >       },
> >  };
> >  module_platform_driver(optee_driver);
> > --
> > 2.25.1
> >
>
> This looks simple enough. Ard, is this what you had in mind earlier?
>

Not really.

On SynQuacer, we use

    Device (TOS0) {
      Name (_HID, "PRP0001")
      Name (_UID, 0x0)
      Name (_DSD, Package () {
        ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
        Package () {
          Package (2) { "compatible", "linaro,optee-tz" },
          Package (2) { "method", "smc" },
        }
      })
    }

which does not require any changes to Linux. So I don't think this
patch is needed at all tbh.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ