Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2007 21:35:04 GMT
From:      Jesper Brix Rosenkilde <jbr@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 125156 for review
Message-ID:  <200708142135.l7ELZ4T5002847@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125156

Change 125156 by jbr@jbr_bob on 2007/08/14 21:34:29

	Moved the address of usrsyshm to proc

Affected files ...

.. //depot/projects/soc2007/jbr-syscall/src/sys/i386/i386/elf_machdep.c#4 edit
.. //depot/projects/soc2007/jbr-syscall/src/sys/kern/init_main.c#4 edit
.. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#12 edit
.. //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#3 edit
.. //depot/projects/soc2007/jbr-syscall/src/sys/sys/sysent.h#4 edit

Differences ...

==== //depot/projects/soc2007/jbr-syscall/src/sys/i386/i386/elf_machdep.c#4 (text+ko) ====

@@ -68,7 +68,6 @@
 	VM_MAXUSER_ADDRESS,
 	USRSTACK,
 	PS_STRINGS,
-	0,
 	VM_PROT_ALL,
 	exec_copyout_strings,
 	exec_setregs,

==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/init_main.c#4 (text+ko) ====

@@ -341,7 +341,6 @@
 	VM_MAXUSER_ADDRESS,
 	USRSTACK,
 	PS_STRINGS,
-	0,
 	VM_PROT_ALL,
 	NULL,
 	NULL,

==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#12 (text+ko) ====

@@ -158,12 +158,12 @@
 #ifdef SCTL_MASK32
 	if (req->flags & SCTL_MASK32) {
 		unsigned int val;
-		val = (unsigned int)p->p_sysent->sv_sysshm;
+		val = (unsigned int)p->p_sysshm;
 		error = SYSCTL_OUT(req, &val, sizeof(val));
 	} else
 #endif
-		error = SYSCTL_OUT(req, &p->p_sysent->sv_sysshm,
-		    sizeof(p->p_sysent->sv_sysshm));
+		error = SYSCTL_OUT(req, &p->p_sysshm,
+		    sizeof(p->p_sysshm));
 	return error;
 }
 
@@ -915,13 +915,23 @@
 {
 	int error;
 	vm_map_t map = &imgp->proc->p_vmspace->vm_map;
-	vm_offset_t *addr = &imgp->proc->p_sysent->sv_sysshm;
-
+	vm_offset_t *addr = &imgp->proc->p_sysshm;
+/*
+	vm_map_t tmap;
+	vm_object_t object;
+	vm_map_entry_t entry;
+	vm_pindex_t pindex;
+*/
 	if (imgp->sysshm != NULL)
 		exec_unmap_sysshm(imgp);
 
 	error = vm_map_sysshm(map, addr, 42);
-	
+/*
+	tmap = map;
+	vm_map_lookup(&tmap, *addr, VM_PROT_READ, &entry, &object, &pindex, NULL, 
+			NULL);
+	vm_map_lookup_done(tmap, entry);
+*/
 	return(error);
 }
 

==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#3 (text+ko) ====

@@ -576,6 +576,7 @@
 	void		*p_emuldata;	/* (c) Emulator state data. */
 	struct label	*p_label;	/* (*) Proc (not subject) MAC label. */
 	struct p_sched	*p_sched;	/* (*) Scheduler-specific data. */
+	vm_offset_t	p_sysshm;
 	STAILQ_HEAD(, ktr_request)	p_ktr;	/* (o) KTR event queue. */
 	LIST_HEAD(, mqueue_notifier)	p_mqnotifier; /* (c) mqueue notifiers.*/
 };

==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/sysent.h#4 (text+ko) ====

@@ -95,8 +95,6 @@
 	vm_offset_t	sv_maxuser;	/* VM_MAXUSER_ADDRESS */
 	vm_offset_t	sv_usrstack;	/* USRSTACK */
 	vm_offset_t	sv_psstrings;	/* PS_STRINGS */
-        vm_offset_t     sv_sysshm;      /* memory shared between proccess and
-                                           kernel */
 	int		sv_stackprot;	/* vm protection for stack */
 	register_t	*(*sv_copyout_strings)(struct image_params *);
 	void		(*sv_setregs)(struct thread *, u_long, u_long, u_long);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708142135.l7ELZ4T5002847>