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]
Date:	Tue, 26 Aug 2008 19:08:35 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"Tim Anderson" <tanderson@...sta.com>
Cc:	<Bruce_Leonard@...inc.com>, <linux-mtd@...ts.infradead.org>,
	"'David Woodhouse'" <dwmw2@...radead.org>,
	<linux-kernel@...r.kernel.org>,
	"'Bruce Leonard'" <brucle@...thlink.net>
Subject: Re: [PATCH 2/2][MTD] Add support for > 2GiB MTD devices

On Tue, 26 Aug 2008 18:40:26 -0700 "Tim Anderson" <tanderson@...sta.com> wrote:

> > -----Original Message-----
> > From: linux-mtd-bounces@...ts.infradead.org 
> > [mailto:linux-mtd-bounces@...ts.infradead.org] On Behalf Of 
> > Bruce_Leonard@...inc.com
> > Sent: Tuesday, August 26, 2008 6:21 PM
> > To: Andrew Morton
> > Cc: linux-mtd-bounces@...ts.infradead.org; 
> > linux-mtd@...ts.infradead.org; David Woodhouse; 
> > linux-kernel@...r.kernel.org; Bruce Leonard
> > Subject: Re: [PATCH 2/2][MTD] Add support for > 2GiB MTD devices
> > 
> > linux-mtd-bounces@...ts.infradead.org wrote on 08/26/2008 04:55:36 PM:
> > 
> > > On Thu, 21 Aug 2008 19:00:55 -0700 (GMT-07:00)
> > > Bruce Leonard <brucle@...thlink.net> wrote:
> > > 
> > > > --- a/include/mtd/mtd-abi.h
> > > > +++ b/include/mtd/mtd-abi.h
> > > > @@ -6,7 +6,7 @@
> > > >  #define __MTD_ABI_H__
> > > > 
> > > >  struct erase_info_user {
> > > > -   uint32_t start;
> > > > +   uint64_t start;
> > > >     uint32_t length;
> > > >  };
> > > > 
> > > > @@ -50,7 +50,7 @@ struct mtd_oob_buf {
> > > >  struct mtd_info_user {
> > > >     uint8_t type;
> > > >     uint32_t flags;
> > > > -   uint32_t size;    // Total size of the MTD
> > > > +   uint64_t size;    // Total size of the MTD
> > > >     uint32_t erasesize;
> > > >     uint32_t writesize;
> > > >     uint32_t oobsize;   // Amount of OOB data per block (e.g. 16)
> > > 
> > > This changes the kernel<->userspace ABI and is hence a big no-no.  I
> > > assume that this change will cause old userspace to 
> > malfunction on new
> > > kernels, and vice versa.
> > > 
> > 
> > Well, in my posting I noted that the mtd-utils were broken 
> > because of this 
> > but I didn't really have any idea as to how to fix things.  I 
> > can see why 
> > it would be a big no-no to change this.  Do you have any 
> > suggestions on 
> > what I could do differently to prevent making that change?
> > 
> > > Supporting >2Gb MTD devices sounds useful (I'm surprised 
> > that we don't
> > > already do so).
> > > 
> > 
> > There was a LOT of interest in this over the last few months 
> > while I was 
> > working on it, but a very suprising silence has developed 
> > since I posted 
> > the patches.  I guess I'm more cutting edge than I thought :).
> > 

(top-posting repaired.  Please don't.)

> Bruce,
> 
> Since you don't want to change the ABI you need to extend it. Andrew, should
> he add an new ioctl that passes a new structure definition? That way the
> original code works and you have to do a new ioctl to get the new size data.
> 

Yes, I expect that a new ioctl would be best.  Sometimes it is possible
to extend an existing one (and its associated payload) but that
requires versioning info which usually wasn't thought of on day one.

But David's the man.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ