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
| ||
|
Date: Fri, 26 Jul 2013 15:53:54 +0800 From: majianpeng <majianpeng@...il.com> To: "Gu Zheng" <guz.fnst@...fujitsu.com> Cc: "Al Viro" <viro@...iv.linux.org.uk>, linux-fsdevel <linux-fsdevel@...r.kernel.org>, linux-kernel <linux-kernel@...r.kernel.org> Subject: Re: Re: question about splice >Hi Jianpeng, > >On 07/26/2013 03:08 PM, majianpeng wrote: > >> Hi all, >> I used splice and found a prolem(at least i call). >> The demo is: >> A:splice(regularfileA--->pipe); >> B:splice(pipe--->regularfileB) >> Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe change. >> If we used the buff >> A:read(regA, buff); >> B: write(buff, regB); >> After A, the contend of regA can't effect the buff. >> Review the code of splice,I know the pipe share the pagecache of regA. > >Right. And also this is the splice's original design intention, using share mmap rather >than copy_to_user/copy_from_user in order to achieve zero-copy. > If it use some method like COW, i think it can avoid this problem. >Thanks, >Gu > >> Maybe this is not a problem or am i missing something? > >> >> Thanks! >> Jianpeng MaN�Р骒r��y����b�X�肚�v�^?)藓{.n?+�伐�{��赙zXФ.�≤�}��财�z?&j:+v��?.��赙zZ+�?+zf"�h���~����i?��z?.�wア??�ㄨ�?&?)撷.f��^j谦y�m��@A�a囤? >0鹅h?.��i > > Thanks! Jianpeng Ma >Hi Jianpeng, > >On 07/26/2013 03:08 PM, majianpeng wrote: > >> Hi all, >> I used splice and found a prolem(at least i call). >> The demo is: >> A:splice(regularfileA--->pipe); >> B:splice(pipe--->regularfileB) >> Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe change. >> If we used the buff >> A:read(regA, buff); >> B: write(buff, regB); >> After A, the contend of regA can't effect the buff. >> Review the code of splice,I know the pipe share the pagecache of regA. > >Right. And also this is the splice's original design intention, using share mmap rather >than copy_to_user/copy_from_user in order to achieve zero-copy. > >Thanks, >Gu > >> Maybe this is not a problem or am i missing something? > >> >> Thanks! >> Jianpeng MaN�Р骒r��y����b�X�肚�v�^?)藓{.n?+�伐�{��赙zXФ.�≤�}��财�z?&j:+v��?.��赙zZ+�?+zf"�h���~����i?��z?.�wア??�ㄨ�?&?)撷.f��^j谦y�m��@A�a囤? >0鹅h?.��i > >
Powered by blists - more mailing lists