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] [day] [month] [year] [list]
Message-Id: <48961E91-ECF5-4EC4-91F2-4FF270133927@redhat.com>
Date:   Mon, 28 Nov 2016 16:54:17 +0800
From:   "Yan, Zheng" <zyan@...hat.com>
To:     Al Viro <viro@...IV.linux.org.uk>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Yan@...IV.linux.org.uk, Zhu@...IV.linux.org.uk,
        Caifeng <zhucaifeng@...ssoft-nj.com>
Subject: Re: [git pull] vfs fix


> On 27 Nov 2016, at 10:51, Al Viro <viro@...IV.linux.org.uk> wrote:
> 
> On Sun, Nov 27, 2016 at 02:25:09AM +0000, Al Viro wrote:
> 
>> Anyway, leaving that BUG_ON() had been wrong; I can send a followup
>> massaging that thing as you've suggested, if you are interested in
>> that.  But keep in mind that the whole iov_iter_get_pages...() calling
>> conventions are going to be changed, hopefully soon.
> 
> BTW, speaking of iov_iter_get_pages_alloc() callers and splice:
> "ceph: combine as many iovec as possile into one OSD request" has added
> static size_t dio_get_pagev_size(const struct iov_iter *it)
> {
>    const struct iovec *iov = it->iov;
>    const struct iovec *iovend = iov + it->nr_segs;
>    size_t size;
> 
>    size = iov->iov_len - it->iov_offset;
>    /*
>     * An iov can be page vectored when both the current tail
>     * and the next base are page aligned.
>     */
>    while (PAGE_ALIGNED((iov->iov_base + iov->iov_len)) &&
>           (++iov < iovend && PAGE_ALIGNED((iov->iov_base)))) {
>        size += iov->iov_len;
>    }
>    dout("dio_get_pagevlen len = %zu\n", size);
>    return size;
> }

The read/write interface for ceph cluster accepts page vector. But we can only specify offset for the first page. Except the first and last pages, all other pages must be full size. This function finds size of pages that satisfy this requirement

Regards
Yan, Zheng

> 
> ... with 'it' possibly being bio_vec-backed iterator.  Could somebody
> explain what that code is trying to do?
> 
> I would really like to hear details - I'm not saying that the goal mentioned
> in the commit message is worthless, but I don't know ceph codebase well
> enough to tell what would be a good way to implement that.  In its current
> form it's obviously broken.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ