diff options
author | pyos <pyos@yandex-team.ru> | 2022-02-10 16:47:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:49 +0300 |
commit | ef985e41af0868676d7a2275f1d90261253ddf3b (patch) | |
tree | 3a6a11d19d8c39c7b90c132bce7e1c3536be37c1 /contrib/libs/linuxvdso/original | |
parent | 8387f1fb70a4161b7581d3c0da52c4810df655be (diff) | |
download | ydb-ef985e41af0868676d7a2275f1d90261253ddf3b.tar.gz |
Restoring authorship annotation for <pyos@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/linuxvdso/original')
-rw-r--r-- | contrib/libs/linuxvdso/original/elf_mem_image.cc | 2 | ||||
-rw-r--r-- | contrib/libs/linuxvdso/original/vdso_support.cc | 22 | ||||
-rw-r--r-- | contrib/libs/linuxvdso/original/vdso_support.h | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/contrib/libs/linuxvdso/original/elf_mem_image.cc b/contrib/libs/linuxvdso/original/elf_mem_image.cc index 066fcba4e3..d271d4c443 100644 --- a/contrib/libs/linuxvdso/original/elf_mem_image.cc +++ b/contrib/libs/linuxvdso/original/elf_mem_image.cc @@ -191,7 +191,7 @@ void ElfMemImage::Init(const void *base) { strsize_ = 0; verdefnum_ = 0; link_base_ = ~0L; // Sentinel: PT_LOAD .p_vaddr can't possibly be this. - if (!base || base == kInvalidBase) { + if (!base || base == kInvalidBase) { return; } const intptr_t base_as_uintptr_t = reinterpret_cast<uintptr_t>(base); diff --git a/contrib/libs/linuxvdso/original/vdso_support.cc b/contrib/libs/linuxvdso/original/vdso_support.cc index 2977477398..87f5dabaf1 100644 --- a/contrib/libs/linuxvdso/original/vdso_support.cc +++ b/contrib/libs/linuxvdso/original/vdso_support.cc @@ -51,12 +51,12 @@ namespace base { -const void *VDSOSupport::vdso_base_ = NULL; +const void *VDSOSupport::vdso_base_ = NULL; VDSOSupport::VDSOSupport() - // If vdso_base_ is still set to NULL, we got here + // If vdso_base_ is still set to NULL, we got here // before VDSOSupport::Init has been called. Call it now. - : image_(Init()) { + : image_(Init()) { } // NOTE: we can't use GoogleOnceInit() below, because we can be @@ -69,20 +69,20 @@ VDSOSupport::VDSOSupport() // Finally, even if there is a race here, it is harmless, because // the operation should be idempotent. const void *VDSOSupport::Init() { - if (vdso_base_ == NULL) { + if (vdso_base_ == NULL) { // Valgrind zaps AT_SYSINFO_EHDR and friends from the auxv[] // on stack, and so glibc works as if VDSO was not present. // But going directly to kernel via /proc/self/auxv below bypasses // Valgrind zapping. So we check for Valgrind separately. if (RunningOnValgrind()) { - vdso_base_ = ElfMemImage::kInvalidBase; - return vdso_base_; + vdso_base_ = ElfMemImage::kInvalidBase; + return vdso_base_; } int fd = open("/proc/self/auxv", O_RDONLY); if (fd == -1) { // Kernel too old to have a VDSO. - vdso_base_ = ElfMemImage::kInvalidBase; - return vdso_base_; + vdso_base_ = ElfMemImage::kInvalidBase; + return vdso_base_; } ElfW(auxv_t) aux; while (read(fd, &aux, sizeof(aux)) == sizeof(aux)) { @@ -94,16 +94,16 @@ const void *VDSOSupport::Init() { } } close(fd); - if (vdso_base_ == NULL) { + if (vdso_base_ == NULL) { // Didn't find AT_SYSINFO_EHDR in auxv[]. - vdso_base_ = ElfMemImage::kInvalidBase; + vdso_base_ = ElfMemImage::kInvalidBase; } } return vdso_base_; } const void *VDSOSupport::SetBase(const void *base) { - CHECK(base != NULL); + CHECK(base != NULL); const void *old_base = vdso_base_; vdso_base_ = base; image_.Init(base); diff --git a/contrib/libs/linuxvdso/original/vdso_support.h b/contrib/libs/linuxvdso/original/vdso_support.h index 1ccf32c23b..2b2b20c6d9 100644 --- a/contrib/libs/linuxvdso/original/vdso_support.h +++ b/contrib/libs/linuxvdso/original/vdso_support.h @@ -114,8 +114,8 @@ class VDSOSupport { // Cached value of auxv AT_SYSINFO_EHDR, computed once. // This is a tri-state: - // 0 => value hasn't been determined yet. - // kInvalidBase => there is no VDSO. + // 0 => value hasn't been determined yet. + // kInvalidBase => there is no VDSO. // else => vma of VDSO Elf{32,64}_Ehdr. // // When testing with mock VDSO, low bit is set. |