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: <1293316904.9764.48.camel@Dan>
Date:	Sat, 25 Dec 2010 17:41:44 -0500
From:	Dan Rosenberg <drosenberg@...curity.com>
To:	Oliver Hartkopp <socketcan@...tkopp.net>
Cc:	Urs Thuermann <urs.thuermann@...kswagen.de>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	security@...nel.org
Subject: Re: [PATCH] CAN: Use inode instead of kernel address for /proc file


> 
> One minor question:
> 
> AFAIK the inode numbers that can be found in /proc/<pid>/fd/* are in decimal
> and not in hex, right?
> 
> If so, you should use '%lu' instead of '%lx' in the patch.

Yes, that's usually how they're expressed, but I did it this way for two
reasons.  Firstly, %lu would require another change to the buffer size,
since the output could be up to 20 bytes long (plus another for the NULL
terminator).  Secondly, by expressing it as hex it avoids breaking any
userland utilities that are expecting addresses, even if no such
utilities exist.

-Dan

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ