File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -191,15 +191,22 @@ unsafe fn init_from_sysinfo_ehdr(base: usize) -> Option<Vdso> {
191
191
/// which hopefully holds the value of the kernel-provided vDSO in memory. Do
192
192
/// a series of checks to be as sure as we can that it's safe to use.
193
193
unsafe fn check_vdso_base < ' vdso > ( base : usize ) -> Option < & ' vdso Elf_Ehdr > {
194
- extern "C" {
195
- static __ehdr_start: c:: c_void ;
196
- }
194
+ // In theory, we could check that we're not attempting to parse our own ELF
195
+ // image, as an additional check. However, older Linux toolchains don't
196
+ // support this, and Rust's `#[linkage = "extern_weak"]` isn't stable yet,
197
+ // so just disable this for now.
198
+ /*
199
+ {
200
+ extern "C" {
201
+ static __ehdr_start: c::c_void;
202
+ }
197
203
198
- // Check that we're not attempting to parse our own ELF image.
199
- let ehdr_start : * const c :: c_void = & __ehdr_start ;
200
- if base == ( ehdr_start as usize ) {
201
- return None ;
204
+ let ehdr_start: *const c::c_void = &__ehdr_start;
205
+ if base == (ehdr_start as usize) {
206
+ return None;
207
+ }
202
208
}
209
+ */
203
210
204
211
// Check that the vDSO is page-aligned and appropriately mapped.
205
212
madvise (
You can’t perform that action at this time.
0 commit comments