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] [day] [month] [year] [list]
Message-ID: <20190329143239.60d4b9a6@x1.home>
Date:   Fri, 29 Mar 2019 14:32:39 -0600
From:   Alex Williamson <alex.williamson@...hat.com>
To:     Bjorn Helgaas <bhelgaas@...gle.com>
Cc:     Joe Perches <joe@...ches.com>, Bjorn Helgaas <helgaas@...nel.org>,
        kvm@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] vfio: Use dev_printk() when possible

On Fri, 29 Mar 2019 12:03:11 -0500
Bjorn Helgaas <bhelgaas@...gle.com> wrote:

> On Mon, Mar 25, 2019 at 3:49 PM Joe Perches <joe@...ches.com> wrote:
> >
> > On Mon, 2019-03-25 at 14:42 -0500, Bjorn Helgaas wrote:  
> > > Use dev_printk() when possible to make messages consistent with other
> > > device-related messages.  
> >
> > trivial note:
> >  
> > > diff --git a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c  
> > []  
> > > @@ -89,7 +89,8 @@ static int vfio_platform_amdxgbe_reset(struct vfio_platform_device *vdev)
> > >       } while ((pcs_value & MDIO_CTRL1_RESET) && --count);
> > >
> > >       if (pcs_value & MDIO_CTRL1_RESET)
> > > -             pr_warn("%s XGBE PHY reset timeout\n", __func__);
> > > +             dev_warn(&vdev->device, "%s XGBE PHY reset timeout\n",
> > > +                      __func__);  
> >
> > Many of these could use a colon after the %s used with __func__
> > to make the output more consistent with other modules.  
> 
> Thanks, Joe.  I added a colon to the two in
> vfio_platform_amdxgbe_reset().  Those were the only ones I saw, except
> for a couple "%s failed" messages in
> drivers/vfio/vfio_iommu_spapr_tce.c, which I didn't change because (1)
> they can't use dev_err() so slightly out of scope for this patch, and
> (2) it arguably reads more naturally without the colon.
> 
> In vfio_pci.c, I converted some pr_info() to dev_info() without adding
> a dev_fmt definition, so that removed the KBUILD_MODNAME prefix, which
> I didn't intend.  I'll add "#define dev_fmt pr_fmt" to restore the
> prefix.
> 
> Messages from drivers/vfio use a variety of prefixes (none, "VFIO: ",
> KBUILD_MODNAME, __func__).  That could potentially be rationalized but
> I would want Alex's guidance first.

Hmm, sort of hard to generalize.  I suspect "VFIO:" is not super
useful, the module name is probably a better choice, augmented by
__func__ where it adds useful context.  That's probably the approach
I'd take.  Thanks,

Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ