Date: Thu, 21 Jun 2018 08:07:23 -0600 From: Jens Axboe <axboe@...nel.dk> To: Christoph Hellwig <hch@...radead.org> Cc: dgilbert@...erlog.com, Al Viro <viro@...IV.linux.org.uk>, Jann Horn <jannh@...gle.com>, FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>, "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>, "Martin K. Petersen" <martin.petersen@...cle.com>, linux-block@...r.kernel.org, linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org, kernel-hardening@...ts.openwall.com, security@...nel.org Subject: Re: [PATCH] sg, bsg: mitigate read/write abuse, block uaccess in release On 6/21/18 6:34 AM, Christoph Hellwig wrote: > On Mon, Jun 18, 2018 at 09:37:01AM -0600, Jens Axboe wrote: >> It was born with that mode, but I don't think anyone ever really used it. >> So it might feasible to simply yank it. That said, just doing a prune >> mode at ->release() time doesn't seem like such a hard task. > > Let's try to kill it. It is a significant amount of code, which does > fishy things and is probably entirely unused: I'd be fine with that, if we knew that nobody uses it. But that's really hard to figure out. I did see Jann's source code scan, which even if non-exhaustive, still shows at least one user of it. How about we just make the write interface sync? Then any copy can happen while the we block the task, and the read side is just copying the header info back, or dumping it if the task didn't read it before it went away. That will still be functional, just not queueable. But that's not a huge concern, it won't break any applications. And with pure sync issue, most of the code goes away anyway and becomes similar to the sync ioctl. -- Jens Axboe
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.