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:	Sun, 31 Jul 2011 01:08:50 -0700
From:	Joe Perches <joe@...ches.com>
To:	Rolf Eike Beer <eike-kernel@...tec.de>
Cc:	Andrew Vasquez <andrew.vasquez@...gic.com>,
	linux-driver@...gic.com,
	"James E.J. Bottomley" <jbottomley@...allels.com>,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] qla2xxx: Rewrite logging functions to use %pV

On Sun, 2011-07-31 at 10:02 +0200, Rolf Eike Beer wrote:
> > +	if (vha != NULL) {
> > +		const struct pci_dev *pdev = vha->hw->pdev;
> > +		/* <module-name> <pci-name> <msg-id>:<host> Message */
> > +		pr_warn("%s [%s]-%04x:%ld: %pV",
> > +			QL_MSGHDR, dev_name(&(pdev->dev)), id + ql_dbg_offset,
> > +			vha->host_no, &vaf);
> > +	} else {
> > +		pr_warn("%s [%s]-%04x: : %pV",
> > +			QL_MSGHDR, "0000:00:00.0", id + ql_dbg_offset, &vaf);
> >  	}
> If I would see 0000:00:00.0 in the logmessage I would become scared that
> something is dereferencing cleared memory, use after free or whatever.
> Only by looking into the code I could see that this code simply has no
> idea which device it is on. Well, then don't print an address when you
> don't have one instead of inventing one.

I don't disagree, but that's for Andrew to figure out
in a separate patch.

I just want to make the code smaller.

The output of the new code is the same as the old code.

--
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