linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: convert /proc/cpu/aligment to seq_file
Date: Fri, 5 Mar 2010 21:12:12 +0000	[thread overview]
Message-ID: <20100305211212.GE4885@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20100305144523.GB23225@pengutronix.de>

On Fri, Mar 05, 2010 at 03:45:23PM +0100, Uwe Kleine-K?nig wrote:
> Hello,
> 
> On Fri, Nov 27, 2009 at 09:37:46AM +0300, Alexey Dobriyan wrote:
> > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> 
> What are the up and down sides of that patch?  I assume there are no
> changes for the userspace?

We have something like a 100 byte file for /proc/cpu/alignment.  Is
there really any risk that 8 32-bit numbers printed in decimal plus
some text will ever overflow the PAGE_SIZE (4096) bytes of space
allocated to procfs file data?

Let's assume 100 bytes for the text bits, plus 10 bytes per 32-bit
number (maximum 32-bit number is 4294967295).  So that's 180 bytes
maximum in this file.

Are we ever going to see an ARM machine with a page size less than
256 bytes?

In my opinion, there isn't any danger of overflowing the procfs file
buffer at all - so the question is whether the complexity of seq_file
is worth "fixing" a problem which just doesn't exist.

The only reason it would be worth it is if we're getting rid of the
old simple procfs PAGE_SIZE buffer interface.

  reply	other threads:[~2010-03-05 21:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27  6:37 [PATCH] arm: convert /proc/cpu/aligment to seq_file Alexey Dobriyan
2010-03-05 14:45 ` Uwe Kleine-König
2010-03-05 21:12   ` Russell King - ARM Linux [this message]
2010-03-05 21:52     ` Alexey Dobriyan

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=20100305211212.GE4885@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).