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]
Message-ID: <b3f69fa5-b31e-f625-fc75-b655edb5f0c3@huawei.com>
Date:   Tue, 14 Mar 2023 17:32:00 +0800
From:   liulongfang <liulongfang@...wei.com>
To:     Jason Gunthorpe <jgg@...dia.com>
CC:     <alex.williamson@...hat.com>,
        <shameerali.kolothum.thodi@...wei.com>,
        <jonathan.cameron@...wei.com>, <cohuck@...hat.com>,
        <linux-kernel@...r.kernel.org>, <linuxarm@...neuler.org>
Subject: Re: [PATCH v8 1/5] vfio/migration: Add debugfs to live migration
 driver

On 2023/3/11 1:12, Jason Gunthorpe wrote:
> On Fri, Feb 17, 2023 at 04:48:27PM +0800, Longfang Liu wrote:
>> +void vfio_vf_debugfs_init(struct vfio_device *vdev)
>> +{
>> +	struct device *dev = &vdev->device;
>> +
>> +	vdev->debug_root = debugfs_create_dir(dev_name(vdev->dev), vfio_debugfs_root);
>> +
>> +	debugfs_create_devm_seqfile(dev, "migration_state", vdev->debug_root,
>> +				  vfio_vf_state_read);
>> +}
>> +EXPORT_SYMBOL_GPL(vfio_vf_debugfs_init);
>> +
>> +void vfio_vf_debugfs_exit(struct vfio_device *vdev)
>> +{
>> +	debugfs_remove_recursive(vdev->debug_root);
>> +}
>> +EXPORT_SYMBOL_GPL(vfio_vf_debugfs_exit);
>> +
>> +void  vfio_debugfs_create_root(void)
>> +{
>> +	vfio_debugfs_root = debugfs_create_dir("vfio", NULL);
>> +}
>> +EXPORT_SYMBOL_GPL(vfio_debugfs_create_root);
>> +
>> +void  vfio_debugfs_remove_root(void)
>> +{
>> +	debugfs_remove_recursive(vfio_debugfs_root);
>> +	vfio_debugfs_root = NULL;
>> +}
>> +EXPORT_SYMBOL_GPL(vfio_debugfs_remove_root);
> 
> Why are these symbols exported?
> 

If the export statement is not added, a compilation error will occur:

ERROR: modpost: "vfio_vf_debugfs_init" [drivers/vfio/pci/hisilicon/hisi-acc-vfio-pci.ko] undefined!
ERROR: modpost: "vfio_vf_debugfs_exit" [drivers/vfio/pci/hisilicon/hisi-acc-vfio-pci.ko] undefined!
scripts/Makefile.modpost:126: recipe for target 'Module.symvers' failed
make[1]: *** [Module.symvers] Error 1


> Jason
> 
> .
Thanks,
Longfang

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ