On Tue, Jun 29, 2021 at 10:48:20AM -0700, John Hubbard wrote: > On 6/29/21 4:58 AM, Matthew Wilcox wrote: > > int refpage_create(const void *__user content, unsigned int size, > > unsigned long flags); > > > > That does seem better. The key is to have at least one more parameter. > > Actually I forgot to include pattern data. In both of the approaches above, > flags is probably used for that, but if we already know that patterns > are being passed, then how about add a "pattern" arg? I think it's > good to leave a little room for flexibility and future extensions: > > int refpage_create(const void *__user content, unsigned int size, > unsigned long pattern, unsigned long flags); I don't get it. 'size' is the length of the pattern, and it's pointed to by 'content'. Why would you pass 'pattern' as well?