From: David Howells Date: Mon, 09 Mar 2020 16:32:20 +0000 Subject: Re: [PATCH v2 2/2] KEYS: Avoid false positive ENOMEM error on key read Message-Id: <416690.1583771540@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit List-Id: References: <20200308170410.14166-3-longman@redhat.com> <20200308170410.14166-1-longman@redhat.com> In-Reply-To: <20200308170410.14166-3-longman@redhat.com> To: Waiman Long Cc: dhowells@redhat.com, Jarkko Sakkinen , James Morris , "Serge E. Hallyn" , Mimi Zohar , keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-integrity@vger.kernel.org, Sumit Garg , Jerry Snitselaar , Roberto Sassu , Eric Biggers , Chris von Recklinghausen Waiman Long wrote: > + tmpbuf = kmalloc(tbuflen, GFP_KERNEL); This would probably be better off using kvmalloc() - otherwise big objects have to be constructed from runs of contiguous pages. But since all we're doing is buffering for userspace, we don't care about that. If you agree, we can address it with an additional patch. David