When enabling 'CONFIG_TEE' and 'CONFIG_OPTEE', The function `tee_ioctl` requires the use of user_uintptr_t type as argument so change the argument type from unsigned long to user_uintptr_t.
--- v2..v1: - Edit commit message. - Add Morello defconfig.
Signed-off-by: Menna Mahmoud eng.mennamahmoud.mm@gmail.com --- arch/arm64/configs/morello_transitional_pcuabi_defconfig | 2 ++ drivers/tee/tee_core.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/configs/morello_transitional_pcuabi_defconfig b/arch/arm64/configs/morello_transitional_pcuabi_defconfig index 0f692600a181..0ca1bc412b1f 100644 --- a/arch/arm64/configs/morello_transitional_pcuabi_defconfig +++ b/arch/arm64/configs/morello_transitional_pcuabi_defconfig @@ -155,6 +155,8 @@ CONFIG_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y CONFIG_SECURITY_SELINUX=y +CONFIG_TEE=y +CONFIG_OPTEE=y CONFIG_PRINTK_TIME=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index 0eb342de0b00..2d0188c75549 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -815,7 +815,7 @@ static int tee_ioctl_supp_send(struct tee_context *ctx, return rc; }
-static long tee_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +static long tee_ioctl(struct file *filp, unsigned int cmd, user_uintptr_t arg) { struct tee_context *ctx = filp->private_data; void __user *uarg = (void __user *)arg;
On 23/08/2023 18:44, Menna Mahmoud wrote:
When enabling 'CONFIG_TEE' and 'CONFIG_OPTEE', The function `tee_ioctl` requires the use of user_uintptr_t type as argument so change the argument type from unsigned long to user_uintptr_t.
v2..v1: - Edit commit message. - Add Morello defconfig.
Signed-off-by: Menna Mahmoud eng.mennamahmoud.mm@gmail.com
The Signed-off-by must be in the commit message, not the patch comments. Use `git commit -s` to add your S-o-b automatically.
arch/arm64/configs/morello_transitional_pcuabi_defconfig | 2 ++ drivers/tee/tee_core.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/configs/morello_transitional_pcuabi_defconfig b/arch/arm64/configs/morello_transitional_pcuabi_defconfig index 0f692600a181..0ca1bc412b1f 100644 --- a/arch/arm64/configs/morello_transitional_pcuabi_defconfig +++ b/arch/arm64/configs/morello_transitional_pcuabi_defconfig @@ -155,6 +155,8 @@ CONFIG_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y CONFIG_SECURITY_SELINUX=y +CONFIG_TEE=y +CONFIG_OPTEE=y
This should be in a separate patch, and the new defconfig should be generated using make savedefconfig (the new entries are not where they should be). Please see my reply to v1.
Have you managed to get OP-TEE to work on Morello FVP? I think adding the options to the defconfig is appropriate if you have.
Kevin
CONFIG_PRINTK_TIME=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index 0eb342de0b00..2d0188c75549 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -815,7 +815,7 @@ static int tee_ioctl_supp_send(struct tee_context *ctx, return rc; } -static long tee_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +static long tee_ioctl(struct file *filp, unsigned int cmd, user_uintptr_t arg) { struct tee_context *ctx = filp->private_data; void __user *uarg = (void __user *)arg;
Hi Kevin,
On Thu, 24 Aug 2023 at 12:07 PM Kevin Brodsky kevin.brodsky@arm.com wrote:
On 23/08/2023 18:44, Menna Mahmoud wrote:
When enabling 'CONFIG_TEE' and 'CONFIG_OPTEE', The function `tee_ioctl` requires the use of user_uintptr_t type as argument so change the
argument type
from unsigned long to user_uintptr_t.
v2..v1: - Edit commit message. - Add Morello defconfig.
Signed-off-by: Menna Mahmoud eng.mennamahmoud.mm@gmail.com
The Signed-off-by must be in the commit message, not the patch comments. Use `git commit -s` to add your S-o-b automatically.
I see, I will fix it.
arch/arm64/configs/morello_transitional_pcuabi_defconfig | 2 ++ drivers/tee/tee_core.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/configs/morello_transitional_pcuabi_defconfig
b/arch/arm64/configs/morello_transitional_pcuabi_defconfig
index 0f692600a181..0ca1bc412b1f 100644 --- a/arch/arm64/configs/morello_transitional_pcuabi_defconfig +++ b/arch/arm64/configs/morello_transitional_pcuabi_defconfig @@ -155,6 +155,8 @@ CONFIG_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y CONFIG_SECURITY_SELINUX=y +CONFIG_TEE=y +CONFIG_OPTEE=y
This should be in a separate patch, and the new defconfig should be generated using make savedefconfig (the new entries are not where they should be). Please see my reply to v1.
I see, I will re-check it.
Have you managed to get OP-TEE to work on Morello FVP?
No I couldn’t, I think it should add as new platform.
I think adding the options to the defconfig is appropriate if you have.
Got it, I thought it is important for the future if Morello added to the OPTEE.
Thanks, Menna
Kevin
CONFIG_PRINTK_TIME=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index 0eb342de0b00..2d0188c75549 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -815,7 +815,7 @@ static int tee_ioctl_supp_send(struct tee_context
*ctx,
return rc;
}
-static long tee_ioctl(struct file *filp, unsigned int cmd, unsigned
long arg)
+static long tee_ioctl(struct file *filp, unsigned int cmd,
user_uintptr_t arg)
{ struct tee_context *ctx = filp->private_data; void __user *uarg = (void __user *)arg;
linux-morello@op-lists.linaro.org