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, 27 Nov 2017 20:52:59 +0000
From:   "Kammela, Gayatri" <gayatri.kammela@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        "Mehta, Sohil" <sohil.mehta@...el.com>,
        Joerg Roedel <joro@...tes.org>,
        Alex Williamson <alex.williamson@...hat.com>
CC:     David Woodhouse <dwmw2@...radead.org>,
        "Raj, Ashok" <ashok.raj@...el.com>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jacob Pan <jacob.jun.pan@...ux.intel.com>,
        "Shankar, Ravi V" <ravi.v.shankar@...el.com>,
        "Yu, Fenghua" <fenghua.yu@...el.com>
Subject: RE: [PATCH v2 4/6] iommu/vt-d: Add debugfs extension to show
 register contents



> -----Original Message-----
> From: Andy Shevchenko [mailto:andriy.shevchenko@...ux.intel.com]
> Sent: Wednesday, November 22, 2017 1:19 PM
> To: Mehta, Sohil <sohil.mehta@...el.com>; Joerg Roedel <joro@...tes.org>;
> Alex Williamson <alex.williamson@...hat.com>
> Cc: David Woodhouse <dwmw2@...radead.org>; Raj, Ashok
> <ashok.raj@...el.com>; iommu@...ts.linux-foundation.org; linux-
> kernel@...r.kernel.org; Jacob Pan <jacob.jun.pan@...ux.intel.com>; Kammela,
> Gayatri <gayatri.kammela@...el.com>; Shankar, Ravi V
> <ravi.v.shankar@...el.com>; Yu, Fenghua <fenghua.yu@...el.com>
> Subject: Re: [PATCH v2 4/6] iommu/vt-d: Add debugfs extension to show
> register contents
> 
> On Wed, 2017-11-22 at 11:25 -0800, Sohil Mehta wrote:
> > From: Gayatri Kammela <gayatri.kammela@...el.com>
> 
> 
> > +static int intel_iommu_regs_open(struct inode *inode, struct file
> > *file)
> > +{
> > +	return single_open(file, intel_iommu_debugfs_regs_show,
> > +			   inode->i_private);
> > +}
> > +
> > +static const struct file_operations intel_iommu_regs_fops = {
> > +	.open		= intel_iommu_regs_open,
> > +	.read		= seq_read,
> > +	.llseek		= seq_lseek,
> > +	.release	= single_release,
> > +};
> 
> Please, be consistent with file name and functions, i.e.
> 
> intel_iommu_debugfs_regs_show -> intel_iommu_regset_show
> 
> and so on.
> 
Sure, will update in v3. Thanks!
> Moreover, see the patch I have just sent [1] and use same
> DEFINE_SHOW_ATTRIBUTE() macro here. In that case we would easily move it
> to seq_file.h for everyone to use in the future.
That makes sense! I see your patch is not merged yet, so really cannot reuse the same macro. I will have to redefine it.
> 
> > +	if (!debugfs_create_file("intel_iommu_regset", S_IRUGO,
> > +				 iommu_debug_root, NULL,
> > &intel_iommu_regs_fops
> 
> [1]: https://marc.info/?l=linux-bluetooth&m=151138535801354&w=2
> 
> 
> --
> Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ