Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 208253 Details for
Bug 200376
app-emulation/open-vm-tools fails to compile PIC/PIE (hardened default)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
checkvm-pie-safety.patch - revision 2
checkvm-pie-safety.patch (text/plain), 1.54 KB, created by
Gordon Malm (RETIRED)
on 2009-10-25 21:32:39 UTC
(
hide
)
Description:
checkvm-pie-safety.patch - revision 2
Filename:
MIME Type:
Creator:
Gordon Malm (RETIRED)
Created:
2009-10-25 21:32:39 UTC
Size:
1.54 KB
patch
obsolete
>From: Gordon Malm <gengor@gentoo.org> > >Make inline asm PIC-safe (do not clobber ebx). > >Credit to Anthony Basile for fixes on x86-64. > >Reference: http://bugs.gentoo.org/200376 > >--- a/checkvm/checkvm.c >+++ b/checkvm/checkvm.c >@@ -79,8 +79,18 @@ getVersion(uint32 *version) > { > uint32 eax, ebx, ecx, edx; > >- __asm__ volatile("inl (%%dx)" : >- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : >+#ifdef __x86_64__ >+ __asm__ volatile("pushq %%rbx \n\t" >+ "inl (%%dx) \n\t" >+ "movl %%ebx, %3 \n\t" >+ "popq %%rbx \n\t" : >+#else >+ __asm__ volatile("pushl %%ebx \n\t" >+ "inl (%%dx) \n\t" >+ "movl %%ebx, %3 \n\t" >+ "popl %%ebx \n\t" : >+#endif >+ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) : > "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETVERSION), > "2"(BDOOR_PORT) : "memory"); > version[0] = eax; >@@ -97,7 +107,7 @@ getHWVersion(uint32 *hwVersion) > uint32 eax, ebx, ecx, edx; > > __asm__ volatile("inl (%%dx)" : >- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : >+ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) : > "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETHWVERSION), > "2"(BDOOR_PORT) : "memory"); > *hwVersion = eax; >@@ -113,7 +123,7 @@ getScreenSize(uint32 *screensize) > uint32 eax, ebx, ecx, edx; > > __asm__ volatile("inl (%%dx)" : >- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : >+ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) : > "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETSCREENSIZE), > "2"(BDOOR_PORT) : "memory"); > *screensize = eax;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 200376
:
137029
|
208136
|
208138
|
208253
|
208290
|
208293
|
208297
|
208305