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>] [day] [month] [year] [list]
Message-ID: <4C0FFCAE-756B-4432-9791-290337A2F5AA@arm.com>
Date:   Wed, 8 Mar 2017 19:56:05 +0000
From:   Stuart Yoder <Stuart.Yoder@....com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jens Wiklander <jens.wiklander@...aro.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        "jean-michel.delorme@...com" <jean-michel.delorme@...com>,
        "emmanuel.michel@...com" <emmanuel.michel@...com>,
        "javier@...igon.com" <javier@...igon.com>,
        Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
        "Mark Rutland" <Mark.Rutland@....com>,
        Michal Simek <michal.simek@...inx.com>,
        "Rob Herring" <robh+dt@...nel.org>,
        Will Deacon <Will.Deacon@....com>,
        "Nishanth Menon" <nm@...com>, "Andrew F . Davis" <afd@...com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "scott.branden@...adcom.com" <scott.branden@...adcom.com>,
        Loic PALLARDY <loic.pallardy@...com>,
        "Etienne CARRIERE" <etienne.carriere@...com>,
        Benjamin GAIGNARD <benjamin.gaignard@...com>,
        Patrice CHOTARD <patrice.chotard@...com>,
        Christophe PRIOUZEAU <christophe.priouzeau@...com>,
        Eric FINCO <eric.finco@...com>,
        Franck ALBESA <franck.albesa@...com>,
        Wei Xu <xuwei5@...ilicon.com>
Subject: Re: [PATCH v15 3/5] tee: add OP-TEE driver

[cut]
> +static struct optee *optee_probe(struct device_node *np)
> +{
> +       optee_invoke_fn *invoke_fn;
> +       struct tee_shm_pool *pool;
> +       struct optee *optee = NULL;
> +       void *memremaped_shm = NULL;
> +       struct tee_device *teedev;
> +       u32 sec_caps;
> +       int rc;
> +
> +       invoke_fn = get_invoke_func(np);
> +       if (IS_ERR(invoke_fn))
> +               return (void *)invoke_fn;
> +
> +       if (!optee_msg_api_uid_is_optee_api(invoke_fn)) {
> +               pr_warn("api uid mismatch\n");
> +               return ERR_PTR(-EINVAL);
> +       }
> +
> +       if (!optee_msg_api_revision_is_compatible(invoke_fn)) {
> +               pr_warn("api revision mismatch\n");
> +               return ERR_PTR(-EINVAL);
> +       }
> +
> +       if (!optee_msg_exchange_capabilities(invoke_fn, &sec_caps)) {
> +               pr_warn("capabilities mismatch\n");
> +               return ERR_PTR(-EINVAL);
> +       }
> +
> +       /*
> +        * We have no other option for shared memory, if secure world
> +        * doesn't have any reserved memory we can use we can't continue.
> +        */
> +       if (!(sec_caps & OPTEE_SMC_SEC_CAP_HAVE_RESERVERED_SHM))
> +               return ERR_PTR(-EINVAL);

Typo?  RESERVERED_SHM should be RESERVED_SHM

> diff --git a/drivers/tee/optee/optee_smc.h b/drivers/tee/optee/optee_smc.h
> +/*
> + * Exchanges capabilities between normal world and secure world
> + *
> + * Call register usage:
> + * a0  SMC Function ID, OPTEE_SMC_EXCHANGE_CAPABILITIES
> + * a1  bitfield of normal world capabilities OPTEE_SMC_NSEC_CAP_*
> + * a2-6        Not used
> + * a7  Hypervisor Client ID register
> + *
> + * Normal return register usage:
> + * a0  OPTEE_SMC_RETURN_OK
> + * a1  bitfield of secure world capabilities OPTEE_SMC_SEC_CAP_*
> + * a2-7        Preserved
> + *
> + * Error return register usage:
> + * a0  OPTEE_SMC_RETURN_ENOTAVAIL, can't use the capabilities from normal world
> + * a1  bitfield of secure world capabilities OPTEE_SMC_SEC_CAP_*
> + * a2-7 Preserved
> + */
> +/* Normal world works as a uniprocessor system */
> +#define OPTEE_SMC_NSEC_CAP_UNIPROCESSOR                BIT(0)
> +/* Secure world has reserved shared memory for normal world to use */
> +#define OPTEE_SMC_SEC_CAP_HAVE_RESERVERED_SHM  BIT(0)

Same typo?  s/RESERVERED_SHM/RESERVED_SHM/

Thanks,
Stuart


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ