-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do we need more robust archeticture protection #1356
Comments
Good point! We definitely need to fix that. |
Just a heads up, conditionally building code around |
This issue has been open for 30 days with no activity and no assignee. It will be closed in 7 days unless a comment is added. |
This issue was closed because it was inactive for 7 days after being marked stale. |
Do we need more robust architecture protection (Issue dynup#1356) The elf.h reloc-type constants are not unique across archs #define R_PPC64_REL24 10 /* PC relative 26 bit */ #define R_X86_64_32 10 /* Direct 32 bit zero extended */ so to avoid any unexpected aliasing, guard all R_arch_type refs with a check on kelf->arch, or a global default arch set from the first elf encountered.
Do we need more robust architecture protection (Issue dynup#1356) The elf.h reloc-type constants are not unique across archs #define R_PPC64_REL24 10 /* PC relative 26 bit */ #define R_X86_64_32 10 /* Direct 32 bit zero extended */ so to avoid any unexpected aliasing, guard all R_arch_type refs with a check on kelf->arch, or a global default arch set from the first elf encountered.
Do we need more robust architecture protection (Issue dynup#1356) The elf.h reloc-type constants are not unique across archs #define R_PPC64_REL24 10 /* PC relative 26 bit */ #define R_X86_64_32 10 /* Direct 32 bit zero extended */ so to avoid any unexpected aliasing, guard all R_arch_type refs with a check on kelf->arch, or a global default arch set from the first elf encountered.
The elf.h reloc-type constants are not unique across archs, for example: #define R_PPC64_REL24 10 /* PC relative 26 bit */ #define R_X86_64_32 10 /* Direct 32 bit zero extended */ so to avoid any unexpected aliasing, guard all R_arch_type refs with a check on kelf->arch, or a global default arch set from the first elf encountered. Closes: dynup#1356 ("Do we need more robust archeticture protection") Signed-off-by: Pete Swain <[email protected]> Signed-off-by: Mihails Strasuns <[email protected]> Signed-off-by: Joe Lawrence <[email protected]>
The elf.h reloc-type constants are not unique across archs, for example: #define R_PPC64_REL24 10 /* PC relative 26 bit */ #define R_X86_64_32 10 /* Direct 32 bit zero extended */ so to avoid any unexpected aliasing, guard all R_arch_type refs with a check on kelf->arch, or a global default arch set from the first elf encountered. Closes: dynup#1356 ("Do we need more robust archeticture protection") Signed-off-by: Pete Swain <[email protected]> Signed-off-by: Mihails Strasuns <[email protected]> Signed-off-by: Joe Lawrence <[email protected]>
I noticed that there are many places using relocation types without
#ifdef architecture
protection, such as in create-diff-object.c:All architectures relocation types use same number space. R_X86_64_32S value is 11. This value for PPC is R_PPC_REL14, for arm is R_ARM_THM_PC8. Could this break the code?
The text was updated successfully, but these errors were encountered: