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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2704044.1674083861@warthog.procyon.org.uk>
Date:   Wed, 18 Jan 2023 23:17:41 +0000
From:   David Howells <dhowells@...hat.com>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     dhowells@...hat.com, Christoph Hellwig <hch@...radead.org>,
        Matthew Wilcox <willy@...radead.org>,
        Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>,
        Jeff Layton <jlayton@...nel.org>,
        Logan Gunthorpe <logang@...tatee.com>,
        linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 05/34] iov_iter: Change the direction macros into an enum

Al Viro <viro@...iv.linux.org.uk> wrote:

> > Change the ITER_SOURCE and ITER_DEST direction macros into an enum and
> > provide three new helper functions:
> > 
> >  iov_iter_dir() - returns the iterator direction
> >  iov_iter_is_dest() - returns true if it's an ITER_DEST iterator
> >  iov_iter_is_source() - returns true if it's an ITER_SOURCE iterator
> 
> What for?  We have two valid values -
> 	1) it is a data source
> 	2) it is not a data source
> Why do we need to store that as an enum?

Compile time type checking.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ