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: <1425510083.5200.312.camel@redhat.com>
Date:	Wed, 04 Mar 2015 16:01:23 -0700
From:	Alex Williamson <alex.williamson@...hat.com>
To:	Bandan Das <bsd@...hat.com>
Cc:	kvm@...r.kernel.org, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] vfio-pci: Allow PCI IDs to be specified as module
 options

On Wed, 2015-03-04 at 17:32 -0500, Bandan Das wrote:
> Alex Williamson <alex.williamson@...hat.com> writes:
> 
> > On Wed, 2015-03-04 at 15:49 -0500, Bandan Das wrote:
> >> Hi Alex,
> >> 
> >> Alex Williamson <alex.williamson@...hat.com> writes:
> >> ...
> >> > +		if (fields < 2) {
> >> > +			pr_warn("vfio-pci: invalid id string \"%s\"\n", id);
> >> > +			continue;
> >> > +		}
> >> > +
> >> > +		pr_info("vfio-pci: add %04X:%04X sub=%04X:%04X cls=%08X/%08X\n",
> >> > +			vendor, device, subvendor, subdevice,
> >> > +			class, class_mask);
> >> > +
> >> > +		rc = pci_add_dynid(&vfio_pci_driver, vendor, device,
> >> > +				   subvendor, subdevice, class, class_mask, 0);
> >> > +		if (rc)
> >> > +			pr_warn("vfio-pci: failed to add dynamic id (%d)\n",
> >> > +				rc);
> >> Just a minor observation - maybe we should print out the
> >> vendor/device/subvendor/subdevice as part of the failure message too. The info
> >> message could potentially get lost in a system with high syslog traffic.
> >
> > Thanks for the comment.  I don't think we want to duplicate the pr_info
> > above it, so are you thinking something like this?
> >
> >                 if (fields < 2) {
> >                         pr_warn("vfio-pci: invalid id string \"%s\"\n", id);
> >                         continue;
> >                 }
> >
> >                 rc = pci_add_dynid(&vfio_pci_driver, vendor, device,
> >                                    subvendor, subdevice, class, class_mask, 0);
> >                 if (rc)
> >                         pr_warn("vfio-pci: failed to add dynamic id: %04X:%04X sub=%04X:%04X cls=%08X/%08X (%d)\n",
> >                                 vendor, device, subvendor, subdevice,
> >                                 class, class_mask, rc);
> >                 else
> >                         pr_info("vfio-pci: add %04X:%04X sub=%04X:%04X cls=%08X/%08X\n",
> >                                 vendor, device, subvendor, subdevice,
> >                                 class, class_mask);
> >         }
> 
> Yep, this is good. (BTW, we can define pr_fmt at the top of the file and avoid
> the "vfio-pci" prefix)

Cool, I'll remove the "vfio-pci: " prefixes and define the standard:

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Thanks!

> >> > +	}
> >> > +}
> >> > +
> >> >  static int __init vfio_pci_init(void)
> >> >  {
> >> >  	int ret;
> >> > @@ -1053,6 +1097,8 @@ static int __init vfio_pci_init(void)
> >> >  	if (ret)
> >> >  		goto out_driver;
> >> >  
> >> > +	vfio_pci_fill_ids();
> >> > +
> >> >  	return 0;
> >> >  
> >> >  out_driver:
> >> >
> >> > --
> >> > To unsubscribe from this list: send the line "unsubscribe kvm" in
> >> > the body of a message to majordomo@...r.kernel.org
> >> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm" in
> > the body of a message to majordomo@...r.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ