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]
Date:   Mon, 30 Aug 2021 11:59:57 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kuppuswamy Sathyanarayanan 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [intel-tdx:guest 75/113] drivers/virtio/virtio.c:350:13: error:
 implicit declaration of function 'prot_guest_has'

tree:   https://github.com/intel/tdx.git guest
head:   44e41606b85b08fad5378c876547f8557f835cf6
commit: 6ab2ec84687b999b5f42477972779e801d557612 [75/113] virtio: Initialize authorized attribute for protected guest
config: arm-qcom_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel/tdx/commit/6ab2ec84687b999b5f42477972779e801d557612
        git remote add intel-tdx https://github.com/intel/tdx.git
        git fetch --no-tags intel-tdx guest
        git checkout 6ab2ec84687b999b5f42477972779e801d557612
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

   drivers/virtio/virtio.c: In function 'register_virtio_device':
>> drivers/virtio/virtio.c:350:13: error: implicit declaration of function 'prot_guest_has' [-Werror=implicit-function-declaration]
     350 |         if (prot_guest_has(PATTR_GUEST_DEVICE_FILTER))
         |             ^~~~~~~~~~~~~~
>> drivers/virtio/virtio.c:350:28: error: 'PATTR_GUEST_DEVICE_FILTER' undeclared (first use in this function)
     350 |         if (prot_guest_has(PATTR_GUEST_DEVICE_FILTER))
         |                            ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/virtio/virtio.c:350:28: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/virtio/virtio.c:351:39: error: implicit declaration of function 'prot_guest_authorized' [-Werror=implicit-function-declaration]
     351 |                 dev->dev.authorized = prot_guest_authorized(&dev->dev,
         |                                       ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/prot_guest_has +350 drivers/virtio/virtio.c

   321	
   322	/**
   323	 * register_virtio_device - register virtio device
   324	 * @dev        : virtio device to be registered
   325	 *
   326	 * On error, the caller must call put_device on &@...->dev (and not kfree),
   327	 * as another code path may have obtained a reference to @dev.
   328	 *
   329	 * Returns: 0 on suceess, -error on failure
   330	 */
   331	int register_virtio_device(struct virtio_device *dev)
   332	{
   333		int err;
   334	
   335		dev->dev.bus = &virtio_bus;
   336		device_initialize(&dev->dev);
   337	
   338		/* Assign a unique device index and hence name. */
   339		err = ida_simple_get(&virtio_index_ida, 0, 0, GFP_KERNEL);
   340		if (err < 0)
   341			goto out;
   342	
   343		dev->index = err;
   344		dev_set_name(&dev->dev, "virtio%u", dev->index);
   345	
   346		spin_lock_init(&dev->config_lock);
   347		dev->config_enabled = false;
   348		dev->config_change_pending = false;
   349	
 > 350		if (prot_guest_has(PATTR_GUEST_DEVICE_FILTER))
 > 351			dev->dev.authorized = prot_guest_authorized(&dev->dev,
   352							(char *)dev_name(&dev->dev));
   353	
   354		/* We always start by resetting the device, in case a previous
   355		 * driver messed it up.  This also tests that code path a little. */
   356		dev->config->reset(dev);
   357	
   358		/* Acknowledge that we've seen the device. */
   359		virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
   360	
   361		INIT_LIST_HEAD(&dev->vqs);
   362	
   363		/*
   364		 * device_add() causes the bus infrastructure to look for a matching
   365		 * driver.
   366		 */
   367		err = device_add(&dev->dev);
   368		if (err)
   369			ida_simple_remove(&virtio_index_ida, dev->index);
   370	out:
   371		if (err)
   372			virtio_add_status(dev, VIRTIO_CONFIG_S_FAILED);
   373		return err;
   374	}
   375	EXPORT_SYMBOL_GPL(register_virtio_device);
   376	

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

Download attachment ".config.gz" of type "application/gzip" (39484 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ