File:  [NetBSD Developer Wiki] / wikisrc / projects / project / verify_netbsd32.mdwn
Revision 1.2: download - view: text, annotated - select for diffs
Sun Nov 6 14:48:47 2011 UTC (2 years, 5 months ago) by jmmv
Branches: MAIN
CVS tags: HEAD
Define the per-project category and difficulty at the template level,
instead of manually tagging the project pages.  While doing this, prefix
the tags with "category:" and "difficulty:" to make them easier to
understand.

[[!template id=project

title="Verification tool for NetBSD32"

contact="""
[tech-toolchain](mailto:tech-toolchain@NetBSD.org)
"""

mentors="""
[Jörg Sonnenberger](mailto:joerg@NetBSD.org)
"""

category="userland"
difficulty="hard"
duration="3 months"

description="""
NetBSD supports a number of platforms where both 32bit and 64bit execution is possible.
The more well known example is the i386/AMD64 pair and the other important one is SPARC/SPARC64.
On this platforms it is highly desirable to allow running all 32bit applications with a 64bit kernel.
This is the purpose of the netbsd32 compatibility layer.

At the moment, the netbsd32 layer consists of a number of system call stubs and structure definitions written and maintained by hand.
It is hard to ensure that the stubs and definitions are up-to-date and correct.
One complication is the difference in alignment rules.
On i386 uint64_t has a 32bit alignment, but on AMD64 it uses natural (64bit) alignment.
This and the resulting padding introduced by the compiler can create hard to find bugs.

The goal of this project is to replace the manual labour with an automatic tool.
This tool should allow both verification / generation of structure definitions for use in netbsd32 code as well as allow generation of system call stubs and conversion functions.
For this purpose, the [Clang C parser](http://clang.llvm.org) or the [libclang frontend](http://llvm.org/devmtg/2010-11/Gregor-libclang.pdf) can be used to analyse the C code.
Generated stubs should also ensure that no kernel stack data is leaked in hidden padding without having to resort to unnecessary large memset calls.
"""
]]

[[!tag gsoc]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb