All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hood <jdthood@mail.com>
To: Todd Inglett <tinglett@vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: proc_file_read() hack?
Date: 27 Mar 2002 20:02:20 -0500	[thread overview]
Message-ID: <1017277343.865.32.camel@thanatos> (raw)
In-Reply-To: <3CA20EDF.7080402@vnet.ibm.com>

On Wed, 2002-03-27 at 13:26, Todd Inglett wrote:
> I guess I don't understand the conflict.

There are three cases:
0)  start == 0
1)  0 < start < buffer
2)  start >= buffer

These exhaust all the possible values that can be returned
in *start.

You propose to change the code so that there are three cases:
0)  start == 0
1') 0 < start < PROC_BLOCK_SIZE
2'/3) start >= PROC_BLOCK_SIZE

However, we can't make the change you propose because it would
break functions that use case #1 with a *start value greater
than PROC_BLOCK_SIZE.

>... is there a chance that start >= PROC_BLOCK_SIZE (but start < page)
> in case #1?

Yes.

> If that is true I am wondering how it could possibly be correct
> since start will be used as a length which is greater than the
> size of the page.

start will be used as an offset, not as a length.

If you think the hack was a bad idea, I agree with you.
But we can't change it without auditing all the proc read
functions that use case #1.

--
Thomas Hood


  reply	other threads:[~2002-03-28  1:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-23 11:40 proc_file_read() hack? J.D. Hood
2002-03-25 18:18 ` Todd Inglett
2002-03-25 19:45   ` Thomas Hood
2002-03-27 18:26     ` Todd Inglett
2002-03-28  1:02       ` Thomas Hood [this message]
2002-03-28 15:29         ` Todd Inglett
  -- strict thread matches above, loose matches on Subject: below --
2002-03-22 14:34 Todd Inglett

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=1017277343.865.32.camel@thanatos \
    --to=jdthood@mail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tinglett@vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.