public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Adrian Hunter <ext-adrian.hunter@nokia.com>
To: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] [MTD] OneNAND: Do not allow oob write past end of page
Date: Thu, 08 Feb 2007 16:11:56 +0200	[thread overview]
Message-ID: <45CB2FAC.5020107@nokia.com> (raw)
In-Reply-To: <005a01c74994$b5f5c9c0$c7a3580a@swcenter.sec.samsung.co.kr>

ext Kyungmin Park wrote:
> BTW, after patch, we got dead code.
> I downloaded oobtest again, re-run it and see that it trigger exception
> code in onenand_do_write_oob
> But it don't touch following codes whether include your patch or not.
> 
>         /* Do not allow write past end of device */
>         if (unlikely(to >= mtd->size ||
>             column + len > ((mtd->size >> this->page_shift) -
>                                 (to >> this->page_shift)) * oobsize)) {
>                 DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_oob: Attempted to
> write past end of device\n");
>                 return -EINVAL;
>         }
> 
> Please check oobtest program.
> 
> Thank you,
> Kyungmin Park
> 
> --
> 
> oobtest: Test 4 of 5
> oobtest: erasing
> oobtest: erased 0
> oobtest: erased 128
> oobtest: Attempting to start write past end of oob
> oobtest: An error is expected...
> oobtest: Error occurred as expected
> oobtest: Attempting to start read past end of oob
> oobtest: An error is expected...
> oobtest: Error occurred as expected
> oobtest: Attempting to write past end of device
> oobtest: An error is expected...
> -> onenand_write_oob: Attempt to write past end of page
> oobtest: Error occurred as expected
> oobtest: Attempting to read past end of device
> oobtest: An error is expected...
> oobtest: error: read past end of device
> oobtest: Attempting to write past end of device
> oobtest: An error is expected...
> -> onenand_write_oob: Attempt to write past end of page
> oobtest: Error occurred as expected
> oobtest: Attempting to read past end of device
> oobtest: An error is expected...
> oobtest: error: read past end of device
> 

Seems ok for me:

oobtest: Attempting to start write past end of oob
oobtest: An error is expected...
onenand_write_oob: Attempted to start write outside oob
oobtest: Error occurred as expected
oobtest: Attempting to start read past end of oob
oobtest: An error is expected...
onenand_read_oob: Attempted to start read outside oob
oobtest: Error occurred as expected
oobtest: Attempting to write past end of device
oobtest: An error is expected...
onenand_write_oob: Attempted to write past end of device
oobtest: Error occurred as expected
oobtest: Attempting to read past end of device
oobtest: An error is expected...
onenand_read_oob: Attempted to read beyond end of device
oobtest: Error occurred as expected
oobtest: Attempting to write past end of device
oobtest: An error is expected...
onenand_write_oob: Attempted to write past end of device
oobtest: Error occurred as expected
oobtest: Attempting to read past end of device
oobtest: An error is expected...
onenand_read_oob: Attempted to read beyond end of device
oobtest: Error occurred as expected

  reply	other threads:[~2007-02-08 14:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-02  7:54 [PATCH] [MTD] OneNAND: Do not allow oob write past end of page Adrian Hunter
2007-02-05  6:38 ` Kyungmin Park
2007-02-05  7:22   ` Adrian Hunter
2007-02-05  7:44     ` Kyungmin Park
2007-02-05  8:30       ` Artem Bityutskiy
2007-02-06  2:15         ` Kyungmin Park
2007-02-08 14:11           ` Adrian Hunter [this message]
2007-02-09  0:20             ` Kyungmin Park

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=45CB2FAC.5020107@nokia.com \
    --to=ext-adrian.hunter@nokia.com \
    --cc=linux-mtd@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