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:	Wed, 2 May 2007 10:45:55 +0100
From:	Anton Altaparmakov <aia21@....ac.uk>
To:	David Chinner <dgc@....com>
Cc:	Nicholas Miell <nmiell@...cast.net>, linux-ext4@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, xfs@....sgi.com, hch@...radead.org
Subject: Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

On 2 May 2007, at 10:15, David Chinner wrote:
> On Tue, May 01, 2007 at 07:46:53PM +0100, Anton Altaparmakov wrote:
>> And all applications will run against a multitude of
>> kernels.  So version X of the application will run on kernel 2.4.*,
>> 2.6.*, a.b.*, etc...  For future expandability of the interface I
>> think it is important to have both compulsory and non-compulsory  
>> flags.
>
> Ah, so that's what you want - a mutable interface. i.e. versioning.
>
> So how does compusory flags help here?

A concrete example:

Let's say that the FIEMAP interface goes live as is without any flags  
at all and just defined bits for "these are optional and those are  
compulsory".

Then the next kernel adds support for optional flag HSM_READ and  
compulsory flag XATTR_READ.

FS that do not support XATTR_READ will return -ENOTSUP as they cannot  
return the wanted data.

FS that do not support HSM_READ will still return the correct data in  
majority of cases (except when the FS supports HSM and the data is  
actually OFFLINE which the application will need to be able to cope  
with anyway incase the FS failed to bring the file ONLINE even if it  
supports the HSM_READ flag so no added complexity for handling this  
case).

> What happens if a voluntary flag now becomes compulsory? Or vice  
> versa? How is the application supposed to deal with this dynamically?

Forgot to answer this bit:  This cannot happen.  There cannot be  
flags that move from compulsory to non-compulsory or anything stupid  
like that.  It would have to be a totally new flag otherwise it  
breaks backwards compatibility and hence this interface becomes  
useless crap.

> I suggested a version number for this right back at the start of
> this discussion and got told that we don't want versioned interfaces
> because we should make the effort to get it right the first time.
> I don't think this can be called "getting it right".

So all applications end up doing:

if (version X, do blah)
else if (version Y, do blob)
else if (version Z, do foo)
else if (version A, do bar)
else exit(1);

Every time a new version is added?  And abort for unknown versions?   
Now that is a great interface!  Not.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ