mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] __user annotation for shm_shmat hook declaration
@ 2004-06-14 16:23 Chris Wright
  2004-06-14 16:27 ` [PATCH 2/3] __user annotation for selinux_shm_shmat Chris Wright
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wright @ 2004-06-14 16:23 UTC (permalink / raw)
  To: akpm, torvalds; +Cc: linux-kernel, Mika Kukkonen

Add proper __user annotation for shm_shmat hook in security.h.

  CHECK   ipc/shm.c
include/linux/security.h:1831:38: warning: incorrect type in argument 2 (different address spaces)
include/linux/security.h:1831:38:    expected char *shmaddr
include/linux/security.h:1831:38:    got char [noderef] *shmaddr<asn:1>
  CC      ipc/shm.o

From: Mika Kukkonen <mika@osdl.org>
Signed-off-by: Chris Wright <chrisw@osdl.org>

===== include/linux/security.h 1.34 vs edited =====
--- 1.34/include/linux/security.h	2004-05-08 15:00:18 -07:00
+++ edited/include/linux/security.h	2004-06-14 08:56:50 -07:00
@@ -1172,7 +1172,7 @@
 	int (*shm_associate) (struct shmid_kernel * shp, int shmflg);
 	int (*shm_shmctl) (struct shmid_kernel * shp, int cmd);
 	int (*shm_shmat) (struct shmid_kernel * shp, 
-			  char *shmaddr, int shmflg);
+			  char __user *shmaddr, int shmflg);
 
 	int (*sem_alloc_security) (struct sem_array * sma);
 	void (*sem_free_security) (struct sem_array * sma);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/3] __user annotation for selinux_shm_shmat
  2004-06-14 16:23 [PATCH 1/3] __user annotation for shm_shmat hook declaration Chris Wright
@ 2004-06-14 16:27 ` Chris Wright
  2004-06-14 16:29   ` [PATCH 3/3] __user annotation for dummy_shm_shmat Chris Wright
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wright @ 2004-06-14 16:27 UTC (permalink / raw)
  To: akpm, torvalds; +Cc: linux-kernel, Mika Kukkonen, sds, jmorris

Add proper __user annotation to selinux_shm_shmat.

  CHECK   security/selinux/hooks.c
security/selinux/hooks.c:4163:17: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
security/selinux/hooks.c:4163:17:    expected int ( *shm_shmat )( ... )
security/selinux/hooks.c:4163:17:    got int ( static [addressable] [toplevel] *<noident> )( ... )
  CC      security/selinux/hooks.o

From: Mika Kukkonen <mika@osdl.org>
Signed-off-by: Chris Wright <chrisw@osdl.org>

===== security/selinux/hooks.c 1.41 vs edited =====
--- 1.41/security/selinux/hooks.c	2004-06-12 20:52:29 -07:00
+++ edited/security/selinux/hooks.c	2004-06-14 09:00:37 -07:00
@@ -3781,7 +3781,7 @@
 }
 
 static int selinux_shm_shmat(struct shmid_kernel *shp,
-			     char *shmaddr, int shmflg)
+			     char __user *shmaddr, int shmflg)
 {
 	u32 perms;
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 3/3] __user annotation for dummy_shm_shmat
  2004-06-14 16:27 ` [PATCH 2/3] __user annotation for selinux_shm_shmat Chris Wright
@ 2004-06-14 16:29   ` Chris Wright
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Wright @ 2004-06-14 16:29 UTC (permalink / raw)
  To: akpm, torvalds; +Cc: linux-kernel

Add proper __user annotation to dummy_shm_shmat.

  CHECK   security/dummy.c
security/dummy.c:995:2: warning: incorrect type in assignment (incompatible argument 2 (different address spaces))
security/dummy.c:995:2:    expected int ( *[addressable] [toplevel] shm_shmat )( ... )
security/dummy.c:995:2:    got int ( static [addressable] [toplevel] *<noident> )( ... )
  CC      security/dummy.o

Signed-off-by: Chris Wright <chrisw@osdl.org>

===== security/dummy.c 1.39 vs edited =====
--- 1.39/security/dummy.c	2004-05-10 04:25:52 -07:00
+++ edited/security/dummy.c	2004-06-14 09:09:51 -07:00
@@ -688,7 +688,7 @@
 	return 0;
 }
 
-static int dummy_shm_shmat (struct shmid_kernel *shp, char *shmaddr,
+static int dummy_shm_shmat (struct shmid_kernel *shp, char __user *shmaddr,
 			    int shmflg)
 {
 	return 0;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-06-14 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-14 16:23 [PATCH 1/3] __user annotation for shm_shmat hook declaration Chris Wright
2004-06-14 16:27 ` [PATCH 2/3] __user annotation for selinux_shm_shmat Chris Wright
2004-06-14 16:29   ` [PATCH 3/3] __user annotation for dummy_shm_shmat Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®