Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



Joerg Sonnenberger wrote:

> On which mailling list was this change discussed?

One thing that jumps out: Should this new code panic in sys_mmap() if it
can't handle a request instead of just failing the request?  That seems
a little ... heavy handed.

Please also stick to KNF (#define<TAB>), especially when you add
something to the middle of an existing block of #defines (eg
sys/proc.h).

Cheers,
Simon.

> 
> On Tue, Dec 20, 2011 at 03:39:36PM +0000, Reinoud Zandijk wrote:
> > Module Name:        src
> > Committed By:       reinoud
> > Date:               Tue Dec 20 15:39:36 UTC 2011
> > 
> > Modified Files:
> >     src/lib/libc/sys: mmap.2
> >     src/sys/sys: mman.h proc.h
> >     src/sys/uvm: uvm_extern.h uvm_map.c uvm_mmap.c
> > 
> > Log Message:
> > Add a MAP_NOSYSCALLS flag to mmap. This flag prohibits executing of system
> > calls from the mapped region. This can be used for emulation perposed or for
> > extra security in the case of generated code.
> > 
> > Its implemented by adding mapping-attributes to each uvm_map_entry. These 
> > can
> > then be queried when needed.
> > 
> > Currently the MAP_NOSYSCALLS is only implemented for x86 but other
> > architectures are easy to adapt; see the sys/arch/x86/x86/syscall.c patch.
> > Port maintainers are encouraged to add them for their processor ports too.
> > When this feature is not yet implemented for an architecture the
> > MAP_NOSYSCALLS is simply ignored with virtually no cpu cost..
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -u -r1.44 -r1.45 src/lib/libc/sys/mmap.2
> > cvs rdiff -u -r1.42 -r1.43 src/sys/sys/mman.h
> > cvs rdiff -u -r1.311 -r1.312 src/sys/sys/proc.h
> > cvs rdiff -u -r1.176 -r1.177 src/sys/uvm/uvm_extern.h
> > cvs rdiff -u -r1.307 -r1.308 src/sys/uvm/uvm_map.c
> > cvs rdiff -u -r1.139 -r1.140 src/sys/uvm/uvm_mmap.c
> > 
> > Please note that diffs are not public domain; they are subject to the
> > copyright notices on the relevant files.
> > 
> 


Home | Main Index | Thread Index | Old Index