How to know the address ranges of kernel stacks, for user processes and kernel threads?

2015-01-28 Thread Yue Chen
How can we know the kernel stack ranges for user process and kernel threads under FreeBSD x86_64? It seems that each kernel stack has two pages (IA-32) to use. Does x86_64 still have two pages or more? And how can we find the address of these two pages from a kernel module? ___

Will all kernel functions be loaded into memory, in the same address space with kernel modules?

2015-01-26 Thread Yue Chen
My purpose is to modify kernel function instructions directly through memory at runtime. First I use "objdump -S kernel" to see the function names and their addresses. And then I use pointers to peek into the content at certain function address area (.text segment). However, their content is diffe

Re: How to get the source code of FreeBSD-Clang?

2015-01-25 Thread Yue Chen
Any patch available for LLVM 3.5 ? As I build using the command you provide, the DWARF section still has problems. On Sun, Jan 25, 2015 at 10:39 AM, Dimitry Andric wrote: > O 25 Jan 2015, at 06:16, Yue Chen wrote: > > > > When I use the original versions (even 3.4.1) of LLVM/C

How to get the source code of FreeBSD-Clang?

2015-01-25 Thread Yue Chen
When I use the original versions (even 3.4.1) of LLVM/Clang to compile FreeBSD kernel, it always has problems. Since I need to modify something in LLVM source and then build the kernel, where can I get the FreeBSD-friendly Clang/LLVM source code? Thanks. __