Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 208305 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 4 correct whitespace
checkvm-pie-safety.patch (text/plain), 2.00 KB, created by
Gordon Malm (RETIRED)
on 2009-10-26 11:13:29 UTC
(
hide
)
Description:
checkvm-pie-safety.patch - revision 4 correct whitespace
Filename:
MIME Type:
Creator:
Gordon Malm (RETIRED)
Created:
2009-10-26 11:13:29 UTC
Size:
2.00 KB
patch
obsolete
>From: Gordon Malm <gengor@gentoo.org> > >Make inline asm PIC-safe (do not clobber ebx). > >Thanks and credit to Anthony Basile for all his help and testing. > >Reference: http://bugs.gentoo.org/200376 > >--- a/checkvm/checkvm.c >+++ b/checkvm/checkvm.c >@@ -79,8 +79,16 @@ > { > uint32 eax, ebx, ecx, edx; > >- __asm__ volatile("inl (%%dx)" : >- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : >+ __asm__ volatile( >+#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler. >+ "movl %%ebx, %3 \n\t" >+ "inl (%%dx) \n\t" >+ "xchgl %%ebx, %3 \n\t" : >+ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) : >+#else >+ "inl (%%dx)" : >+ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : >+#endif > "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETVERSION), > "2"(BDOOR_PORT) : "memory"); > version[0] = eax; >@@ -96,8 +104,16 @@ > { > uint32 eax, ebx, ecx, edx; > >- __asm__ volatile("inl (%%dx)" : >- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : >+ __asm__ volatile( >+#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler. >+ "movl %%ebx, %3 \n\t" >+ "inl (%%dx) \n\t" >+ "xchgl %%ebx, %3 \n\t" : >+ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) : >+#else >+ "inl (%%dx)" : >+ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : >+#endif > "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETHWVERSION), > "2"(BDOOR_PORT) : "memory"); > *hwVersion = eax; >@@ -112,8 +128,16 @@ > { > uint32 eax, ebx, ecx, edx; > >- __asm__ volatile("inl (%%dx)" : >- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : >+ __asm__ volatile( >+#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler. >+ "movl %%ebx, %3 \n\t" >+ "inl (%%dx) \n\t" >+ "xchgl %%ebx, %3 \n\t" : >+ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) : >+#else >+ "inl (%%dx)" : >+ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : >+#endif > "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