From: Matthew Wilcox <willy@infradead.org> To: Waiman Long <longman@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org>, David Howells <dhowells@redhat.com>, Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>, James Morris <jmorris@namei.org>, "Serge E. Hallyn" <serge@hallyn.com>, linux-mm@kvack.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@linux-foundation.org>, Joe Perches <joe@perches.com>, David Rientjes <rientjes@google.com> Subject: Re: [PATCH v2] mm: Add kvfree_sensitive() for freeing sensitive data objects Date: Mon, 06 Apr 2020 20:00:16 +0000 [thread overview] Message-ID: <20200406200016.GJ21484@bombadil.infradead.org> (raw) In-Reply-To: <20200406185827.22249-1-longman@redhat.com> On Mon, Apr 06, 2020 at 02:58:27PM -0400, Waiman Long wrote: > +/** > + * kvfree_sensitive - free a data object containing sensitive information > + * @addr - address of the data object to be freed > + * @len - length of the data object Did you try building this with W=1? I believe this is incorrect kerneldoc. It should be @addr: and @len: Also, it reads better in the htmldocs if you capitalise the first letter of each sentence and finish with a full stop. > @@ -914,7 +911,7 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) > */ > if (ret > key_data_len) { > if (unlikely(key_data)) > - __kvzfree(key_data, key_data_len); > + kvfree_sensitive(key_data, key_data_len); I'd drop the test of key_data here.
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Wilcox <willy@infradead.org> To: Waiman Long <longman@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org>, David Howells <dhowells@redhat.com>, Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>, James Morris <jmorris@namei.org>, "Serge E. Hallyn" <serge@hallyn.com>, linux-mm@kvack.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@linux-foundation.org>, Joe Perches <joe@perches.com>, David Rientjes <rientjes@google.com> Subject: Re: [PATCH v2] mm: Add kvfree_sensitive() for freeing sensitive data objects Date: Mon, 6 Apr 2020 13:00:16 -0700 [thread overview] Message-ID: <20200406200016.GJ21484@bombadil.infradead.org> (raw) In-Reply-To: <20200406185827.22249-1-longman@redhat.com> On Mon, Apr 06, 2020 at 02:58:27PM -0400, Waiman Long wrote: > +/** > + * kvfree_sensitive - free a data object containing sensitive information > + * @addr - address of the data object to be freed > + * @len - length of the data object Did you try building this with W=1? I believe this is incorrect kerneldoc. It should be @addr: and @len: Also, it reads better in the htmldocs if you capitalise the first letter of each sentence and finish with a full stop. > @@ -914,7 +911,7 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) > */ > if (ret > key_data_len) { > if (unlikely(key_data)) > - __kvzfree(key_data, key_data_len); > + kvfree_sensitive(key_data, key_data_len); I'd drop the test of key_data here.
next prev parent reply other threads:[~2020-04-06 20:00 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-06 18:58 [PATCH v2] mm: Add kvfree_sensitive() for freeing sensitive data objects Waiman Long 2020-04-06 18:58 ` Waiman Long 2020-04-06 19:38 ` Joe Perches 2020-04-06 19:38 ` Joe Perches 2020-04-06 19:38 ` Joe Perches 2020-04-07 2:16 ` Waiman Long 2020-04-07 2:16 ` Waiman Long 2020-04-07 6:41 ` Joe Perches 2020-04-07 6:41 ` Joe Perches 2020-04-07 6:41 ` Joe Perches 2020-04-07 20:16 ` Linus Torvalds 2020-04-07 20:16 ` Linus Torvalds 2020-04-07 20:16 ` Linus Torvalds 2020-04-07 20:26 ` Linus Torvalds 2020-04-07 20:26 ` Linus Torvalds 2020-04-07 20:26 ` Linus Torvalds 2020-04-07 21:14 ` David Howells 2020-04-07 21:14 ` David Howells 2020-04-07 21:22 ` Linus Torvalds 2020-04-07 21:22 ` Linus Torvalds 2020-04-07 21:22 ` Linus Torvalds 2020-04-07 22:24 ` Matthew Wilcox 2020-04-07 22:24 ` Matthew Wilcox 2020-04-07 22:54 ` David Howells 2020-04-07 22:54 ` David Howells 2020-04-07 23:50 ` Linus Torvalds 2020-04-07 23:50 ` Linus Torvalds 2020-04-07 23:50 ` Linus Torvalds 2020-04-06 20:00 ` Matthew Wilcox [this message] 2020-04-06 20:00 ` Matthew Wilcox 2020-04-07 20:07 ` Waiman Long 2020-04-07 20:07 ` Waiman Long 2020-04-07 20:01 ` Waiman Long 2020-04-07 20:01 ` Waiman Long 2020-04-07 20:02 ` Waiman Long 2020-04-07 20:02 ` Waiman Long
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200406200016.GJ21484@bombadil.infradead.org \ --to=willy@infradead.org \ --cc=akpm@linux-foundation.org \ --cc=dhowells@redhat.com \ --cc=jarkko.sakkinen@linux.intel.com \ --cc=jmorris@namei.org \ --cc=joe@perches.com \ --cc=keyrings@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=longman@redhat.com \ --cc=rientjes@google.com \ --cc=serge@hallyn.com \ --cc=torvalds@linux-foundation.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.