On Tue, Aug 25, 2020 at 12:12:18PM -0500, Bob Pearson wrote: > On 8/25/20 11:53 AM, Jason Gunthorpe wrote: > > On Tue, Aug 25, 2020 at 11:37:52AM -0500, Bob Pearson wrote: > > > >> Currently only the rxe driver is exhibiting the issue of kernel > >> warnings during qp create caused by recent kernel changes looking > >> for potential information leaks to user space. The test which > >> triggers this warning is very specific. It occurs when a portion of > >> a kernel object stored in a slab cache is copied to user space and > >> the copied area has not been 'whitelisted' by setting useroffset and > >> usersize parameters for the kmem cache. As already discussed there > >> are two ways to mitigate this > > > > I think we should just add a uverbs_copy_to() for integers, much like > > netlink does. > > > > We already have various getters for integers.. > > Perhaps. But I think the proposed fix is good in any case. It gets > rid of a bunch of code that doesn't add anything. The info leak > police will come after kmalloc too. It is just a harder problem so > your suggestion will still be a good one. Sure, if the caches are not so useful, then lets drop them. Jason