netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Rosenberg <drosenberg@vsecurity.com>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Urs Thuermann <urs.thuermann@volkswagen.de>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, security@kernel.org
Subject: Re: [PATCH] CAN: Use inode instead of kernel address for /proc file
Date: Sat, 25 Dec 2010 17:41:44 -0500	[thread overview]
Message-ID: <1293316904.9764.48.camel@Dan> (raw)
In-Reply-To: <4D1670CC.1000709@hartkopp.net>


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


  reply	other threads:[~2010-12-25 22:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-25 22:16 [PATCH] CAN: Use inode instead of kernel address for /proc file Dan Rosenberg
2010-12-25 22:22 ` Oliver Hartkopp
2010-12-25 22:31   ` Oliver Hartkopp
2010-12-25 22:41     ` Dan Rosenberg [this message]
2010-12-26 11:29       ` Oliver Hartkopp
2010-12-26 16:38         ` Dan Rosenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1293316904.9764.48.camel@Dan \
    --to=drosenberg@vsecurity.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=security@kernel.org \
    --cc=socketcan@hartkopp.net \
    --cc=urs.thuermann@volkswagen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).