Thread (31 messages) 31 messages, 9 authors, 2021-07-07

Re: [BUG] arm64: an infinite loop in generic_perform_write()

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-06-24 11:17:41
Also in: linux-arm-kernel, lkml

On Thu, Jun 24, 2021 at 08:04:07AM +0100, Christoph Hellwig wrote:
On Thu, Jun 24, 2021 at 04:24:46AM +0100, Matthew Wilcox wrote:
quoted
On Thu, Jun 24, 2021 at 11:10:41AM +0800, Chen Huang wrote:
quoted
In userspace, I perform such operation:

 	fd = open("/tmp/test", O_RDWR | O_SYNC);
        access_address = (char *)mmap(NULL, uio_size, PROT_READ, MAP_SHARED, uio_fd, 0);
        ret = write(fd, access_address + 2, sizeof(long));
... you know that accessing this at unaligned offsets isn't going to
work.  It's completely meaningless.  Why are you trying to do it?
We still should not cause an infinite loop in kernel space due to a
a userspace programmer error.
They're running as root and they've mapped some device memory.  We can't
save them from themself.  Imagine if they'd done this to the NVMe BAR.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help