ARM: VDSO
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 Latest posting 2/20 of 6 patches 0 repliesNew
- v9 posting 1/20 of 6 patches 0 repliesSuperseded
Patches in v9 posting 2/2 No applies recorded yet
None of the 6 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v9 yet.
Cover letter [PATCH v9 0/6] ARM: VDSO
Hi Nathan,
Quoted 56 lines · Nathan Lynch
Quoted 8 lines · Christopher Covington
It appears to me that there is code in several architecture subdirectories (I'm aware of x86, arm64, and with these patches arm[32] and I would be surprised if there weren't more) doing largely the same setup of special mappings at randomized offsets, checking ELF magic etc. Not that these patches should necessarily do it, but is there a reasonable amount of consolidation that could be done, or am I underestimating how much of this really does vary per architecture?
Sorry to not respond to this promptly, was distracted by some other work.
As Andy said, the possibility for consolidating some aspects of VDSO support is there, but it would be a fair bit of work.
For example,
arch_setup_additional_pagestends to have the general form of:lock
mmap_semget_unmapped_areainstall_special_mapping(or_install_special_mapping, preferably) stash vdso address in mmu context
releasemmap_semBut there are a lot of implementation details that differ:
+---------------------------------------------------------------- | Number of VMAs installed | +------------------------------------------------------------ | | Considers uses_interp | | +------------------------------------------------------ | | | Uses _install_special_mapping | | | +------------------------------------------------ | | | | Performs additional work (e.g. remap_pfn_range) | | | | +------------------------------------------ | | | | | Randomizes VDSO offset vs stack and libs | | | | | +------------------------------------ | | | | | | Records VDSO address in mmu context | | | | | | +------------------------------ | | | | | | | Supports compat VDSO | | | | | | | +------------------------ | | | | | | | | Supports disabling VDSO | | | | | | | | at boot (e.g. vdso=off) | | | | | | | | +------------------ | | | | | | | | | Can disable VDSO arch | | | | | | | | | via Kconfig ---------+---+-----+-----+-----+-----+-----+-----+-----+------------------ arm* | 3 | no | yes | no | yes | yes | no | no | yes arm64 | 2 | no | yes | no | no | yes | no | no | no hexagon | 1 | no | no | no | no | yes | no | no | no mips | 1 | no | no | no | no | yes | no | no | no powerpc | 1 | no | no | no | no | yes | yes | no | no s390 | 1 | yes | no | no | no | yes | yes | yes | no sh | 1 | no | no | no | no | yes | no | yes | yes tile | 1 | no | no | yes | no | yes | no | yes | no x86 | 2 | no | yes | yes | yes | yes | yes | yes | no
Quoted 7 lines
* With VDSO patches from this thread, of course.
I think pushing the
mmap_semlock/unlock up into the ELF loader might be of some benefit (slightly reduced complexity in the arch code). But any generic replacement forarch_setup_additional_pageswill have to account for all the differences above, and probably a few more I've missed.
I really appreciate the detailed response. I'll try to find time to explore this further, hopefully using QEMU to run kernels for most of those architectures.
Christopher
Signature · 3 lines
Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation.