Re: [patch 1/2] Relocate VDSO ELF headers to match mapped location with COMPAT_VDSO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>+	for(; dyn->d_tag != DT_NULL; dyn++)
>+		switch(dyn->d_tag) {
>+		case DT_PLTGOT:
>+		case DT_HASH:
>+		case DT_STRTAB:
>+		case DT_SYMTAB:
>+		case DT_RELA:
>+		case DT_INIT:
>+		case DT_FINI:
>+		case DT_REL:
>+		case DT_DEBUG:
>+		case DT_JMPREL:
>+		case DT_VERSYM:
>+		case DT_VERDEF:
>+		case DT_VERNEED:
>+		case DT_ENCODING ... DT_HIOS:
>+			/* tags above DT_ENCODING are even if they're
>+			   a pointer, so skip odd ones */
>+			if (dyn->d_tag >= DT_ENCODING &&
>+			    (dyn->d_tag & 1) == 1)
>+				break;
>+
>+			dyn->d_un.d_ptr += VDSO_HIGH_BASE;
>+		}

I'm pretty certain the range OLD_DT_LOOS ... DT_LOOS must be excluded
here (the document version I'm looking at is inconsistent in itself here, saying
in one place to stop at DT_LOOS, in a second to stop at DT_HIOS, and in a
third to include DT_LOOS ... ST_HIOS - the inconsistency goes away if
assuming that the stop at DT_LOOS really means stop at OLD_DT_LOOS,
and the stop at DT_HIOS misses to special-case the OLD_DT_LOOS ...
DT_LOOS range.
Additionally I'm a little worried about excluding DT_ADDRRNGLO ...
DT_ADDRRNGHI in case future binutils ever start defaulting to generate
any of these (namely DT_GNU_HASH).

>+#define DT_ENCODING	32

Hmm, I was about to say this ought to be 31 when I realized the discrepancy
between document and binutils. I'll have to ask about this...

Jan
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux