Skip to contentSkip to conversation

keys: remove __user annotation from function prototype

PATCH Superseded Randy Dunlap 2 participants 2 messages Apr 6, 2022 – Apr 14, 2022

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 keys: remove __user annotation from function prototype

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").
Cc Jann Horn <[email protected]>
Cc David Howells <[email protected]>
Cc Jarkko Sakkinen <[email protected]>
Cc James Morris <[email protected]>
Cc "Serge E. Hallyn" <[email protected]>

---
v2: rebase/resend; add more Cc:s

 security/keys/keyring.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/keys/keyring.c +1 -1
@@ -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",
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 25 lines · Randy Dunlap

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").
Cc Jann Horn <[email protected]>
Cc David Howells <[email protected]>
Cc Jarkko Sakkinen <[email protected]>
Cc James Morris <[email protected]>
Cc "Serge E. Hallyn" <[email protected]>

---
v2: rebase/resend; add more Cc:s

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

security/keys/keyring.c static void keyring_revoke(struct key *k · line 85

Quoted 8 lines
security/keys/keyring.c +1 -1
@@ -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",

David, can you pick this?

BR, Jarkko