Archive for 19 November 2009

yield() sucks anyway, so it depends which flavour of suckage you prefer.

From here.

I’ve spent a couple of hours today searching for information how to make area allocated in kernel by vmalloc() accessible to user-space process.

For area allocated with kmalloc(), there is remap_pfn_range() that could be called from driver’s mmap() method. But for vmalloc()-allocated area, it very looked like it is necessary either to walk pde’s/pme’s/pte’s by hand, or to handle per-page faults with nopage() vma’s method …

… fortunately not that bad. There is remap_vmalloc_range() in recent 2.6 kernels, and also there are vmalloc_user() and vmalloc_32_user() helper functions to prepare memory to use with remap_vmalloc_range().

Just it was somewhat tricky to find it without prior knowledge :) .

Yes it is. Go read this.

P.S.
My own – yet very limited – experience of running android port on a custom board, only proves that. Android crashes and burns on almost any possible error. Audio driver failed to initialize? Crash. USB keyboard connected? Crash. It behaves even worse than windows 10 years ago.

Shame on google.