Re: set_fs(KERNEL_DS) vs iovec

From: Christoph Hellwig
Date: Tue May 22 2018 - 05:25:51 EST


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. It should actually make your code simpler,
too.