mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Allocating the data pages as part of the kernel image does not work on SPARC. The MMU will raise a fault when userspace tries to access them. Allocate the data pages through the page allocator instead. Unused pages in the vDSO VMA are still allocated to keep the virtual addresses aligned. Switch the mapping from PFNs to 'struct page' as that is required for dynamically allocated pages. This also aligns the allocation of the datapages with the code pages and is a prerequisite for mlockall() support. VM_MIXEDMAP is necessary for the call to vmf_insert_page() in the timens prefault path to work. The data pages need to be order-0, non-compound pages so that the mapping to userspace and the different orderings work. These pages are also used by the timekeeping, random pool and architecture initialization code. Some of these are running before the page allocator is available. To keep these subsytems working without changes, introduce early, statically data storage which will then replaced by the real one as soon as that is available. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Link: https://patch.msgid.link/20260304-vdso-sparc64-generic-2-v6-3-d8eb3b0e1410@linutronix.de
17 lines
522 B
C
17 lines
522 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_VDSO_DATASTORE_H
|
|
#define _LINUX_VDSO_DATASTORE_H
|
|
|
|
#ifdef CONFIG_HAVE_GENERIC_VDSO
|
|
#include <linux/mm_types.h>
|
|
|
|
extern const struct vm_special_mapping vdso_vvar_mapping;
|
|
struct vm_area_struct *vdso_install_vvar_mapping(struct mm_struct *mm, unsigned long addr);
|
|
|
|
void __init vdso_setup_data_pages(void);
|
|
#else /* !CONFIG_HAVE_GENERIC_VDSO */
|
|
static inline void vdso_setup_data_pages(void) { }
|
|
#endif /* CONFIG_HAVE_GENERIC_VDSO */
|
|
|
|
#endif /* _LINUX_VDSO_DATASTORE_H */
|