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]
Date:   Mon, 31 Aug 2020 08:49:53 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Jorge Ramirez-Ortiz <jorge@...ndries.io>, jens.wiklander@...aro.org
Cc:     sumit.garg@...aro.org, tee-dev@...ts.linaro.org,
        linux-kernel@...r.kernel.org, ricardo@...ndries.io
Subject: Re: [PATCH] drivers: optee: fix i2c build issue

On 8/31/20 8:23 AM, Jorge Ramirez-Ortiz wrote:
> When the optee driver is compiled into the kernel while the i2c core
> is configured as a module, the i2c symbols are not available.
> 
> This commit addresses the situation by disabling the i2c support for
> this use case while allowing it in all other scenarios:
> 
>  i2c=y, optee=y
>  i2c=m, optee=m
>  i2c=y, optee=m
>  i2c=m, optee=y (not supported)
> 
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge@...ndries.io>
> ---
> 
>   This patch applies on top of
>   https://git.linaro.org/people/jens.wiklander/linux-tee.git/tag/?h=optee-i2c-for-v5.10
> 
>  drivers/tee/optee/rpc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c
> index 64a206c56264..96e91d5f0a86 100644
> --- a/drivers/tee/optee/rpc.c
> +++ b/drivers/tee/optee/rpc.c
> @@ -51,6 +51,7 @@ static void handle_rpc_func_cmd_get_time(struct optee_msg_arg *arg)
>  }
>  
>  #if IS_ENABLED(CONFIG_I2C)
> +#if !defined(CONFIG_I2C_MODULE) || defined(CONFIG_OPTEE_MODULE)

Looks like
#if IS_REACHABLE(CONFIG_I2C)

should work here.

>  static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx,
>  					     struct optee_msg_arg *arg)
>  {
> @@ -140,6 +141,7 @@ static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx,
>  	arg->ret = TEEC_ERROR_NOT_SUPPORTED;
>  }
>  #endif
> +#endif
>  
>  static struct wq_entry *wq_entry_get(struct optee_wait_queue *wq, u32 key)
>  {
> 
	

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ