Re: set_fs(KERNEL_DS) vs iovec

2018-05-22 Thread Benjamin Herrenschmidt
On Tue, 2018-05-22 at 03:20 -0700, Christoph Hellwig wrote: > On Tue, May 22, 2018 at 03:08:35PM +1000, Benjamin Herrenschmidt wrote: > > Hence my question: Is is still acceptable these days to use > > set_fs(KERNEL_DS) for simple cases like this ? > > Not at all. > > > Or is it really > >

Re: set_fs(KERNEL_DS) vs iovec

2018-05-22 Thread Benjamin Herrenschmidt
On Tue, 2018-05-22 at 03:20 -0700, Christoph Hellwig wrote: > On Tue, May 22, 2018 at 03:08:35PM +1000, Benjamin Herrenschmidt wrote: > > Hence my question: Is is still acceptable these days to use > > set_fs(KERNEL_DS) for simple cases like this ? > > Not at all. > > > Or is it really > >

Re: set_fs(KERNEL_DS) vs iovec

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 03:08:35PM +1000, Benjamin Herrenschmidt wrote: > Hence my question: Is is still acceptable these days to use > set_fs(KERNEL_DS) for simple cases like this ? Not at all. > Or is it really > deprecated and all new users should use the iovec's ? Yes, please use iov_iter.

Re: set_fs(KERNEL_DS) vs iovec

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 03:08:35PM +1000, Benjamin Herrenschmidt wrote: > Hence my question: Is is still acceptable these days to use > set_fs(KERNEL_DS) for simple cases like this ? Not at all. > Or is it really > deprecated and all new users should use the iovec's ? Yes, please use iov_iter.

set_fs(KERNEL_DS) vs iovec

2018-05-21 Thread Benjamin Herrenschmidt
Hi guys ! I was helping with a small driver when I stumbled upon a comment from a reviwer pointing to an old lwn article talking about deprecating set_fs due to security concerns: https://lwn.net/Articles/722267/ Now, this is a very simple driver running on a small/slow ARM SoC, which reads

set_fs(KERNEL_DS) vs iovec

2018-05-21 Thread Benjamin Herrenschmidt
Hi guys ! I was helping with a small driver when I stumbled upon a comment from a reviwer pointing to an old lwn article talking about deprecating set_fs due to security concerns: https://lwn.net/Articles/722267/ Now, this is a very simple driver running on a small/slow ARM SoC, which reads