diff mbox series

[v2] keys: remove __user annotation from function prototype

Message ID 20220406014453.32091-1-rdunlap@infradead.org (mailing list archive)
State New
Headers show
Series [v2] keys: remove __user annotation from function prototype | expand

Commit Message

Randy Dunlap April 6, 2022, 1:44 a.m. UTC
Remove a missed __user annotation from the prototype for
keyring_read(). This cures a sparse warning when it complains about
the difference in the prototype and the function definition.

security/keys/keyring.c:481:13: sparse:    long static [signed] [toplevel] keyring_read( ... )
security/keys/keyring.c:81:13: sparse:    long static [addressable] [signed] [toplevel] keyring_read( ... )

Fixes: 796e46f9e2cb ("keys: Remove outdated __user annotations").
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jann Horn <jannh@google.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jarkko Sakkinen <jarkko@kernel.org>
Cc: keyrings@vger.kernel.org
Cc: James Morris <jmorris@namei.org>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: linux-security-module@vger.kernel.org
---
v2: rebase/resend; add more Cc:s

 security/keys/keyring.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jarkko Sakkinen April 14, 2022, 12:05 p.m. UTC | #1
On Tue, Apr 05, 2022 at 06:44:53PM -0700, Randy Dunlap wrote:
> Remove a missed __user annotation from the prototype for
> keyring_read(). This cures a sparse warning when it complains about
> the difference in the prototype and the function definition.
> 
> security/keys/keyring.c:481:13: sparse:    long static [signed] [toplevel] keyring_read( ... )
> security/keys/keyring.c:81:13: sparse:    long static [addressable] [signed] [toplevel] keyring_read( ... )
> 
> Fixes: 796e46f9e2cb ("keys: Remove outdated __user annotations").
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Jann Horn <jannh@google.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Jarkko Sakkinen <jarkko@kernel.org>
> Cc: keyrings@vger.kernel.org
> Cc: James Morris <jmorris@namei.org>
> Cc: "Serge E. Hallyn" <serge@hallyn.com>
> Cc: linux-security-module@vger.kernel.org
> ---
> v2: rebase/resend; add more Cc:s
> 
>  security/keys/keyring.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/security/keys/keyring.c
> +++ b/security/keys/keyring.c
> @@ -79,7 +79,7 @@ static void keyring_revoke(struct key *k
>  static void keyring_destroy(struct key *keyring);
>  static void keyring_describe(const struct key *keyring, struct seq_file *m);
>  static long keyring_read(const struct key *keyring,
> -			 char __user *buffer, size_t buflen);
> +			 char *buffer, size_t buflen);
>  
>  struct key_type key_type_keyring = {
>  	.name		= "keyring",

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

David, can you pick this?

BR, Jarkko
diff mbox series

Patch

--- a/security/keys/keyring.c
+++ b/security/keys/keyring.c
@@ -79,7 +79,7 @@  static void keyring_revoke(struct key *k
 static void keyring_destroy(struct key *keyring);
 static void keyring_describe(const struct key *keyring, struct seq_file *m);
 static long keyring_read(const struct key *keyring,
-			 char __user *buffer, size_t buflen);
+			 char *buffer, size_t buflen);
 
 struct key_type key_type_keyring = {
 	.name		= "keyring",