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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 22 Sep 2008 19:20:15 -0600
From:	Alex Chiang <achiang@...com>
To:	Matthew Wilcox <matthew@....cx>
Cc:	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	jbarnes@...tuousgeek.org, kristen.c.accardi@...el.com
Subject: Re: [PATCH v2 06/13] PCI: cpqphp: stop managing hotplug_slot->name

* Matthew Wilcox <matthew@....cx>:
> On Tue, Sep 09, 2008 at 04:00:32AM -0600, Alex Chiang wrote:
> > -static inline void make_slot_name(char *buffer, int buffer_size, struct slot *slot)
> > -{
> > -	snprintf(buffer, buffer_size, "%d", slot->number);
> > -}
> 
> > +
> > +		scnprintf(name, SLOT_NAME_SIZE, "%d", slot->number);
> 
> So ... we're using %d here and %u in acpiphp.  Obviously we don't expect
> to get a number above 2 billion, but I think if we do have some utterly
> bogus firmware that gives us a number above 2 billion, printing a
> positive number is a better user experience than a negative number.

Well, on some HP machines, a slot number >2 billion actually does
make sense, if you convert it to hex, and then consider that to
be some sort of encoding for topology.

But your point here stands, I can change this driver to a %u.

> We clearly have a common pattern here where hotplug drivers have a
> number insteaqd of a name (I would venture this is the most common).
> Maybe we need a common helper?  I think this is a subject for the
> long-term todo list, not something that needs to be addressed in the
> context of this patch series.

Yeah, ok -- long term todo. ;)

/ac

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