Re: [Qemu-devel] [PATCH] file-posix: refuse to open directories

2018-01-15 Thread Kevin Wolf
Am 13.01.2018 um 00:30 hat John Snow geschrieben: > On 12/22/2017 08:00 AM, Kevin Wolf wrote: > > Am 21.12.2017 um 23:44 hat John Snow geschrieben: > >> I don't think there's a legitimate reason to open directories as if > >> they were files. This prevents QEMU from opening and attempting to probe

Re: [Qemu-devel] [PATCH] file-posix: refuse to open directories

2018-01-12 Thread John Snow
On 12/22/2017 08:00 AM, Kevin Wolf wrote: > Am 21.12.2017 um 23:44 hat John Snow geschrieben: >> I don't think there's a legitimate reason to open directories as if >> they were files. This prevents QEMU from opening and attempting to probe >> a directory inode, which can break in exciting ways.

Re: [Qemu-devel] [PATCH] file-posix: refuse to open directories

2017-12-22 Thread Kevin Wolf
Am 21.12.2017 um 23:44 hat John Snow geschrieben: > I don't think there's a legitimate reason to open directories as if > they were files. This prevents QEMU from opening and attempting to probe > a directory inode, which can break in exciting ways. One of those ways > is lseek on ext4/xfs, which w

Re: [Qemu-devel] [PATCH] file-posix: refuse to open directories

2017-12-22 Thread Daniel P. Berrange
On Thu, Dec 21, 2017 at 05:44:11PM -0500, John Snow wrote: > I don't think there's a legitimate reason to open directories as if > they were files. This prevents QEMU from opening and attempting to probe > a directory inode, which can break in exciting ways. One of those ways > is lseek on ext4/xfs

Re: [Qemu-devel] [PATCH] file-posix: refuse to open directories

2017-12-21 Thread Eric Blake
On 12/21/2017 04:44 PM, John Snow wrote: I don't think there's a legitimate reason to open directories as if they were files. This prevents QEMU from opening and attempting to probe a directory inode, which can break in exciting ways. One of those ways is lseek on ext4/xfs, which will return 0x7f

Re: [Qemu-devel] [PATCH] file-posix: refuse to open directories

2017-12-21 Thread John Snow
On 12/21/2017 05:56 PM, no-re...@patchew.org wrote: > /tmp/qemu-test/src/hw/i386/vmport.c: In function 'vmport_ioport_read': > /tmp/qemu-test/src/hw/i386/vmport.c:81:9: error: implicit declaration of > function 'qemu_log_mask' [-Werror=implicit-function-declaration] > qemu_log_mask(LOG_

[Qemu-devel] [PATCH] file-posix: refuse to open directories

2017-12-21 Thread John Snow
I don't think there's a legitimate reason to open directories as if they were files. This prevents QEMU from opening and attempting to probe a directory inode, which can break in exciting ways. One of those ways is lseek on ext4/xfs, which will return 0x7fff as the file size instead of