Re: [PATCH 2/2] dlmfs: convert dlmfs_file_read() to copy_to_user()

From: Al Viro
Date: Fri May 29 2020 - 17:06:51 EST

On Fri, May 29, 2020 at 01:57:36PM -0700, Linus Torvalds wrote:

> > All jokes aside, when had we (or anybody else, really) _not_ gotten
> > into trouble when passing structs across the kernel boundary? Sure,
> > sometimes you have to (stat, for example), but just look at the amount
> > of PITA stat() has spawned...
> I'd rather see the struct than some ugly manual address calculations
> and casts...
> Because that's fundamentally what a struct _is_, after all.

Sure; the bad idea I was refering to had been to pass the arguments from
userland that way, not the syntax used for it. And it's obviously cast
in stone by now - userland ABI and all such...