mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
b67e612cef
This replaces a decent amount of incomprehensible and buggy code with much more straightforward code. It also brings the 32-bit vdso more in line with the 64-bit vdsos, so maybe someday they can share even more code. This wastes a small amount of kernel .data and .text space, but it avoids a couple of allocations on startup, so it should be more or less a wash memory-wise. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Cc: Stefani Seibold <stefani@seibold.net> Link: http://lkml.kernel.org/r/b8093933fad09ce181edb08a61dcd5d2592e9814.1395352498.git.luto@amacapital.net Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
31 lines
873 B
C
31 lines
873 B
C
#ifndef _VDSO_IMAGE_H
|
|
#define _VDSO_IMAGE_H
|
|
|
|
#include <asm/page_types.h>
|
|
#include <linux/linkage.h>
|
|
|
|
#define DEFINE_VDSO_IMAGE(symname, filename) \
|
|
__PAGE_ALIGNED_DATA ; \
|
|
.globl symname##_start, symname##_end ; \
|
|
.align PAGE_SIZE ; \
|
|
symname##_start: ; \
|
|
.incbin filename ; \
|
|
symname##_end: ; \
|
|
.align PAGE_SIZE /* extra data here leaks to userspace. */ ; \
|
|
\
|
|
.previous ; \
|
|
\
|
|
.globl symname##_pages ; \
|
|
.bss ; \
|
|
.align 8 ; \
|
|
.type symname##_pages, @object ; \
|
|
symname##_pages: ; \
|
|
.zero (symname##_end - symname##_start + PAGE_SIZE - 1) / PAGE_SIZE * (BITS_PER_LONG / 8) ; \
|
|
.size symname##_pages, .-symname##_pages
|
|
|
|
#define DECLARE_VDSO_IMAGE(symname) \
|
|
extern char symname##_start[], symname##_end[]; \
|
|
extern struct page *symname##_pages[]
|
|
|
|
#endif /* _VDSO_IMAGE_H */
|