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:   Thu, 3 Mar 2022 14:10:56 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Iouri Tarassov <iourit@...ux.microsoft.com>
Cc:     kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
        wei.liu@...nel.org, linux-hyperv@...r.kernel.org,
        linux-kernel@...r.kernel.org, spronovo@...rosoft.com,
        spronovo@...ux.microsoft.com
Subject: Re: [PATCH v3 02/30] drivers: hv: dxgkrnl: Driver initialization and
 loading

On Wed, Mar 02, 2022 at 03:27:56PM -0800, Iouri Tarassov wrote:
> 
> On 3/1/2022 12:45 PM, Greg KH wrote:
> > On Tue, Mar 01, 2022 at 11:45:49AM -0800, Iouri Tarassov wrote:
> > > - Create skeleton and add basic functionality for the
> > > hyper-v compute device driver (dxgkrnl).
> > > 
> > > +
> > > +#undef pr_fmt
> > > +#define pr_fmt(fmt)	"dxgk: " fmt
> >
> > Use the dev_*() print functions, you are a driver, and you always have a
> > pointer to a struct device.  There's no need to ever call pr_*().
> >
> 
> There is no struct device during module initialization until the
> /dev/dxg device is created.

Then you should not have anything to print out.

> Is it ok to use pr_* functions in this case?

Nope.

> Should dev_*(NULL,...) be used?

No, not at all, never!

> I see other drivers use the pr_* functions in this case (mips.c as an
> example).

There are lots of bad examples in the kernel tree, let's make your code
a good one.

thanks,

greg k-h

Powered by blists - more mailing lists