linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Maxim Uvarov <maxim.uvarov@linaro.org>,
	linux-kernel@vger.kernel.org, tee-dev@lists.linaro.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	peterhuewe@gmx.de, jarkko.sakkinen@linux.intel.com, jgg@ziepe.ca,
	gregkh@linuxfoundation.org, jens.wiklander@linaro.org,
	linux-integrity@vger.kernel.org, arnd@linaro.org,
	sumit.garg@linaro.org, Maxim Uvarov <maxim.uvarov@linaro.org>
Subject: Re: [PATCH 1/2] optee: do drivers initialization before and after tee-supplicant run
Date: Wed, 20 May 2020 10:19:18 +0800	[thread overview]
Message-ID: <202005201010.NOpmJOb4%lkp@intel.com> (raw)
In-Reply-To: <20200518133459.28019-2-maxim.uvarov@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 4308 bytes --]

Hi Maxim,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on linus/master v5.7-rc6 next-20200519]
[cannot apply to linux/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Maxim-Uvarov/optee-register-drivers-on-optee-bus/20200518-213659
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 57c76221d5af648c8355a55c09b050c5d8d38189
config: arm64-randconfig-r026-20200519 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 135b877874fae96b4372c8a3fbfaa8ff44ff86e3)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/tee/optee/device.c:90:5: warning: no previous prototype for function '__optee_enumerate_devices' [-Wmissing-prototypes]
int __optee_enumerate_devices(u32 func)
^
drivers/tee/optee/device.c:90:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __optee_enumerate_devices(u32 func)
^
static
1 warning generated.

vim +/__optee_enumerate_devices +90 drivers/tee/optee/device.c

    89	
  > 90	int __optee_enumerate_devices(u32 func)
    91	{
    92		const uuid_t pta_uuid =
    93			UUID_INIT(0x7011a688, 0xddde, 0x4053,
    94				  0xa5, 0xa9, 0x7b, 0x3c, 0x4d, 0xdf, 0x13, 0xb8);
    95		struct tee_ioctl_open_session_arg sess_arg;
    96		struct tee_shm *device_shm = NULL;
    97		const uuid_t *device_uuid = NULL;
    98		struct tee_context *ctx = NULL;
    99		u32 shm_size = 0, idx, num_devices = 0;
   100		int rc;
   101	
   102		memset(&sess_arg, 0, sizeof(sess_arg));
   103	
   104		/* Open context with OP-TEE driver */
   105		ctx = tee_client_open_context(NULL, optee_ctx_match, NULL, NULL);
   106		if (IS_ERR(ctx))
   107			return -ENODEV;
   108	
   109		/* Open session with device enumeration pseudo TA */
   110		memcpy(sess_arg.uuid, pta_uuid.b, TEE_IOCTL_UUID_LEN);
   111		sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
   112		sess_arg.num_params = 0;
   113	
   114		rc = tee_client_open_session(ctx, &sess_arg, NULL);
   115		if ((rc < 0) || (sess_arg.ret != TEEC_SUCCESS)) {
   116			/* Device enumeration pseudo TA not found */
   117			rc = 0;
   118			goto out_ctx;
   119		}
   120	
   121		rc = get_devices(ctx, sess_arg.session, NULL, &shm_size, func);
   122		if (rc < 0 || !shm_size)
   123			goto out_sess;
   124	
   125		device_shm = tee_shm_alloc(ctx, shm_size,
   126					   TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
   127		if (IS_ERR(device_shm)) {
   128			pr_err("tee_shm_alloc failed\n");
   129			rc = PTR_ERR(device_shm);
   130			goto out_sess;
   131		}
   132	
   133		rc = get_devices(ctx, sess_arg.session, device_shm, &shm_size, func);
   134		if (rc < 0)
   135			goto out_shm;
   136	
   137		device_uuid = tee_shm_get_va(device_shm, 0);
   138		if (IS_ERR(device_uuid)) {
   139			pr_err("tee_shm_get_va failed\n");
   140			rc = PTR_ERR(device_uuid);
   141			goto out_shm;
   142		}
   143	
   144		num_devices = shm_size / sizeof(uuid_t);
   145	
   146		for (idx = 0; idx < num_devices; idx++) {
   147			rc = optee_register_device(&device_uuid[idx], idx);
   148			if (rc)
   149				goto out_shm;
   150		}
   151	
   152	out_shm:
   153		tee_shm_free(device_shm);
   154	out_sess:
   155		tee_client_close_session(ctx, sess_arg.session);
   156	out_ctx:
   157		tee_client_close_context(ctx);
   158	
   159		return rc;
   160	}
   161	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38759 bytes --]

  reply	other threads:[~2020-05-20  2:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 13:34 [PATCH 0/2] optee: register drivers on optee bus Maxim Uvarov
2020-05-18 13:34 ` [PATCH 1/2] optee: do drivers initialization before and after tee-supplicant run Maxim Uvarov
2020-05-20  2:19   ` kbuild test robot [this message]
2020-05-21  5:49   ` [RFC PATCH] optee: __optee_enumerate_devices() can be static kbuild test robot
2020-05-18 13:34 ` [PATCH 2/2] tpm_ftpm_tee: register driver on tee bus Maxim Uvarov
2020-05-18 19:38   ` Jarkko Sakkinen
2020-05-19  7:09     ` Maxim Uvarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202005201010.NOpmJOb4%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@linaro.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jens.wiklander@linaro.org \
    --cc=jgg@ziepe.ca \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxim.uvarov@linaro.org \
    --cc=peterhuewe@gmx.de \
    --cc=sumit.garg@linaro.org \
    --cc=tee-dev@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).