diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-08-05 23:04:41 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-08-05 23:04:41 +0000 |
commit | 3597d6171aca63d6727bbba3258ee278ab27b5ec (patch) | |
tree | 097ed61cece3ef945d1e24c909cf5675138427d8 /sys-apps | |
parent | Raise CMAKE_MIN_VERSION to 2.8.12 by Ben Kohler <bkohler@gmail.com>, bug #519... (diff) | |
download | historical-3597d6171aca63d6727bbba3258ee278ab27b5ec.tar.gz historical-3597d6171aca63d6727bbba3258ee278ab27b5ec.tar.bz2 historical-3597d6171aca63d6727bbba3258ee278ab27b5ec.zip |
Fix building on hardened systems #518936 by tka.
Package-Manager: portage-2.2.10/cvs/Linux x86_64
Manifest-Sign-Key: 0xD2E96200
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/util-linux/ChangeLog | 6 | ||||
-rw-r--r-- | sys-apps/util-linux/Manifest | 25 | ||||
-rw-r--r-- | sys-apps/util-linux/files/util-linux-2.25-lscpu-pic.patch | 81 | ||||
-rw-r--r-- | sys-apps/util-linux/util-linux-2.25.ebuild | 3 |
4 files changed, 104 insertions, 11 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog index 4708c68a859b..22a9fa23c226 100644 --- a/sys-apps/util-linux/ChangeLog +++ b/sys-apps/util-linux/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/util-linux # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.481 2014/08/05 15:55:07 ottxor Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.482 2014/08/05 23:04:39 vapier Exp $ + + 05 Aug 2014; Mike Frysinger <vapier@gentoo.org> + +files/util-linux-2.25-lscpu-pic.patch, util-linux-2.25.ebuild: + Fix building on hardened systems #518936 by tka. 05 Aug 2014; Christoph Junghans <ottxor@gentoo.org> util-linux-2.24.2.ebuild, util-linux-2.25.ebuild: diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest index 1c8f37fa775d..f4a85ac10b00 100644 --- a/sys-apps/util-linux/Manifest +++ b/sys-apps/util-linux/Manifest @@ -6,6 +6,7 @@ AUX crypto-loop.initd 1729 SHA256 b8329250c865e79a1e761d713c2270c99d5fe96e0d5a7c AUX util-linux-2.24-fix-fdisk-on-alpha.patch 416 SHA256 9979cc2136d5d321c4dec08b8c42c419bc8e8a63299fa83a1174e9aaac5a3fb7 SHA512 69f77774dfe58ae56d21c20cb45ae494a8948426d33275cd790de1e290a3592f5bf0645c3ceaf64f344422de7259e6edf6ca5ff744ce9a9030b59c30d9637126 WHIRLPOOL f1b02433071c32aa815c9e6daa19c25d543126fe8a794024efbdf6732ec7b1963310d792174a630f7acd0583ca9e18df8ef86a40d495104023aca2fe14e9e41e AUX util-linux-2.24-last-tests.patch 4513 SHA256 61be31970f0aced6a8423e1f0ab35751f0dcd9e24265eb3221a8e0e14cae731f SHA512 f9be688b0a074ca3e93139fcd78c4a28b892b9cafedc70d92b08f695131631349044d1eb42b4534db9c09f656e503d400dc59b220234668cba206888ad43cd1a WHIRLPOOL fa1057d0b9d99a92f53975c468e7488d47b2a801d42141233c88b01a9bde66ae489cf862505f3eadfb6c7e99172d202e37ec4bc5cd7d97e2fdc6e043df3335f9 AUX util-linux-2.24-skip-last-tests.patch 1003 SHA256 5ccbab17e26cc9b592b534b9b3e72b6a23dbdd04718f6360cb7d8886221ffa4d SHA512 9d89530f203c8a50e1def8164669b93ce1c1509d4da112c9db56cea9e29288c32964978e06ababa8e6c00222813d7a99bc35e0a7cfc17d8cd63804b629c9165c WHIRLPOOL 0e7c1cd6a4bdc94fdad3582f1855992d375238438d165627d60cddda8d1314c759b6e34171c5d00890956acdf9641ad5bf955f980fd142545b1ef468caa90be6 +AUX util-linux-2.25-lscpu-pic.patch 2529 SHA256 5ca73497accd0a53084e756c150b32c6f7a7fa2524acceb17182bf866e03b13a SHA512 186bbc40330f118ca5cde88db113b0dbc2111de2aab7a3001b369fc01a2b7e05ae4cc9b6d164a5ed6b4d48bd19558d2ac4a18c5df60da5d5c02228fada2d7a2b WHIRLPOOL a4777871b7cc14b0c63153c7dd6e1a3a45eee0b1a06eee19f20a02796ac3bd18bbc17774cb45c51bec074dde21a2b93dd11167349ea285bfd73eda98bb27b0e8 DIST util-linux-2.22.2.tar.xz 3100832 SHA256 929b517fa39b16a61ec536514e08940a381b92befc629d0348e3097920dd2f12 SHA512 4b6ae8e6091f4f3c21c1b1d361660767380c4965e40e2222724122b60cc1be1b10149b86f2559b3b72f42675fb790bc3ea86e159233d00c44ee39ec9373317c1 WHIRLPOOL 2e784e92abf4a055c6f0bf55914b0a17d21ac370eb30df2b6d68c0521743ec5306603d9ec60ac0bee75c51f20b2ca8cd76cdccf6256e5098ec42f16359a8b5d7 DIST util-linux-2.24.1.tar.xz 3543692 SHA256 835eb6232cfab0118ef2e4fd649de0ba9f5bd1b8cbf9a7d4d84594541dec8410 SHA512 5636e1c57bd57954518e90ff0f079810cc2927f52bb925dde556ce2744a088577f8adbc19c19b2bd079efd253406767faa44d1de5f557e024762522e647f044b WHIRLPOOL 25862a85788eb1c275c7e06f3d2be8e6a9605811665e06a4b21d1e274fc4a5e19dd03e5c52061ee5d98ce8c86ba757a7f8076683edb603ad0c43c05ab5e52a51 DIST util-linux-2.24.2.tar.xz 3586580 SHA256 1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0 SHA512 a0c03876ef19fa09e434e3e5362fb3f3e0a254b3b39a623ac7a9a207d06afce00366792244ed0fac86931f8340c046620660f33c3444a07a12037182fc191240 WHIRLPOOL 4b8185e1832145c050a8aa0761ae017d846ed58cd7e07710e4c32bf92a8f6e530bddb56dab70c8025eddb4cafafed79e658b0aced3a190b61b508078a438a9ed @@ -14,18 +15,24 @@ EBUILD util-linux-2.22.2.ebuild 3295 SHA256 3756908b5207220298b26b2c0b7b610b980f EBUILD util-linux-2.24.1-r2.ebuild 4130 SHA256 a2bc50f994ff17185a3680841110ab1a320f51b3ff96291ac28b4d0440761895 SHA512 1253cb5bb86ad131ae32817bc45924804a8e48819a45314f75117fb1035f24100edd2b61a9241cb9bea0855c2877fd6fa51d56ae8dd8014ccac711efe9d04172 WHIRLPOOL 7b98c36037379421ed154c0e86f5fe308c0dc8458df01b9d87dc0110f4053292b16ce6d96949e2f5f3f315dea1a5d538b8e713ac52e2eca40cffabe75f3b7976 EBUILD util-linux-2.24.1-r3.ebuild 5146 SHA256 b267e31c6af27737f9296dba6891324dc615d1865f6793f9b993bcb6bd5cb0a7 SHA512 14c1e66758666a3b9080f750267d23fd27d2fd7b8975af2dd1c94231d908f62c7de4466a222e496b95c2cee3a53617b84fd77f1b363e205d7515719438a17d1d WHIRLPOOL 43c7b5baecd9f7fba2821de43aeeadefec6a5c11084a8acb6d13c37c21d683d148801a39c36af597809791f4be696130ad51c512ad6ad6efd7230b817bcf1fc1 EBUILD util-linux-2.24.2.ebuild 5412 SHA256 0f120ea949a8bc3fd3a0acead702a27bdce0b7a4b2fdf74bb31c8c28bee59ee8 SHA512 daa8db26d10057c3b56d8a3b20bf8cd3e6e8433641221b3cc8d5c3bdf9c9036bce3c8af6bf6a5d89667d2f1b2b237b7bbde5eb3b320dabc9a1459d6815eff0e0 WHIRLPOOL 633b977a8104e3d4f633025314fb7bfc14b6f918c43a358d7050db11215d20d2235b0bc95af41e5c37a6cdb7e4dcb982db3aa32309b08a3d8a2e18250d9f2939 -EBUILD util-linux-2.25.ebuild 5163 SHA256 7bed7c46aefa9adb7834ca0fd158743371e6b2c250ac48863108acb54c044c47 SHA512 b3fa68e53007f0f2630ae22b50073312d50ad419943e0fb9fd59654fca0d0a7ee2d02788fb19893f374f27aef27a4575b6641b8f430d88337ffbf7a43fba7828 WHIRLPOOL e402f773a3b0844b4967d55a16470dfb54e152182e12110638e21639fecb0eec84d9b390a33b41d50394ab098187b3ad89c7f4eb41fe03290385e1367f2ac140 +EBUILD util-linux-2.25.ebuild 5214 SHA256 fa69c4bdc81f5c6a42c57dd76846ba927d26184627d7cd77a26e85ac03f36f7a SHA512 26b574248ab449bed1ea97951dbc0a03fac6f179fa4671422976d35d05e2e74d4d91255f57d20de87734cc6122d5689e308cdebdfde973f32c7563f4b987fb93 WHIRLPOOL 449e9b2087f4f61d359a11710ab7d66502f15b33b77036306e84146abb2c7c161e267a9e156049176a27cef0c88340c5256f23ecf45bb7ce6b4924f77112c1bc EBUILD util-linux-9999.ebuild 4860 SHA256 c2b6a1d3021ea280bdf9ad3008527c4fc360adade0145d7beaa48041bccfa8f4 SHA512 4efc0a1c47cf7fdf722071fffabc4608d52662c5a04868acb2ca308db1badb3b264066525016e6150ff976b56bd3c49d0a7db1b23e05cd7ff41d42e02605768f WHIRLPOOL f7f7e3bdd1b3c188cc909f8aeb15af1da5adb2f54a1191c23567561065a5b5915c37ff0e5effd63f32f5e642f357d566963b5a1834e75a926849ca4797c9005a -MISC ChangeLog 74661 SHA256 b7ccb55a3694498d033334a7f02eb78f7c18e47d13c8070ab2a29f691bb4b55d SHA512 3a97b6a3cb7ee2fd4e1d0c5f300f74e9927e262a3db15bea53e05a963d919718dbb37d8b0c28549e33edde0f9d066a6496a53debd181eb3b562d03a39373bdfe WHIRLPOOL 449604232bdfad8570e1c25882de0d62d1c792bb5c77fd1e1e63c7b9bcc959194024a6433d63b35b2fd619af567e5a354d4a2b3aebd2b8c8b50e91ae97a3c4bd +MISC ChangeLog 74829 SHA256 d02c55d3654a37b756ed52ca0b014663ca0c4bf3458e7843a41453703bcccad8 SHA512 6bbcf9bd202e63db406e56dde17b722e2db919465f1c825188fefdd2da68acd3e71f9d1d60dff68f060fd04875d8f2fef7e2d3817ae2ab93a153475d2ccccaa3 WHIRLPOOL e7d3e5a2208bd260307c9b519367b3daaee36fe1d41454cbd5dc7ba70a3382932aff3c9c42145f82b5e73b04c29bfd81540108df1bcc45c4e2fd23d3181c2d19 MISC metadata.xml 1019 SHA256 62affc682c5c13f06f677085089543d447e7a94315cbc8f8291f8ff771e68af0 SHA512 345eb075280ced11dd52ceb37ca3f971953c00ed6a47c281281c0e8f197863a94b8c0dd7781ef91b85d53696b2b877cdbaa60a39cca1bc3c39c10f160b148e11 WHIRLPOOL 41204aed1d5a7e0a1ebcf36ffb28d88eba79d83162c134e09e02eec490d54cf2ae22b2896a2dee73dca6ad7a7d411d8f545c23581c55e90e252f80b4722f1a7a -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQEcBAEBCAAGBQJT4P5gAAoJEOeBhlrCAAWGqBMH/RJaPYQXljOGhOL3vIREWT2s -51yWq/2XNh8qqX0FJDJUe/3+NQPwLp+/0JR2AqVjtvoHsf8ZhXumaoO1C42qcgeg -uDV+Tw6uYB+Ykj1dPRaKgU0wg0ICjFQD8TwGbZYC+sePV/2g4gMmQY7Aoga7G64f -TEfZKvitNH42oaR0jjsiDkFP7+Apv9qFl9Z/p5Dl6qxE4xtHG2Z+oQQFRoim9jbH -x27YKhIyr/9NiMXQwBOZtr0nDUssksRAeTavZvNmUE8QAu36NjPivQSIUQAEE4Fo -6rgbNbwB3xF1pPHu1bxKwG0yV9BifJ/xQGz08b5RNL7NIk2ZxzqlcdqljDBZRgU= -=Uqg0 +iQIcBAEBCAAGBQJT4WMNAAoJEPGu1DbS6WIAB/oP/ihZZgVaSNZmFvhZuSowUXhV +/n2GzFRCHc6ymy9NrPzALRxPRZrnoE78cbmsXIp5NtYWQvsdeL16QKc/r0o6I03e +OzHMnJS/UIX2JEJ+pi0q6/bRkc43V0cGHeVKbZkLqySrW0BdWR7xjcea44w8R2BT +cJB0blQZ/uIjG57yYrvgiDtw6BPI06oSaKE7a78lqP1KAI0NEp9qiDJRUOb6CGrj +gD4YUnRcJpz1PqvIEKKeAsXlFvd6n24i1roBBFLzde0T+VwMznhRvp9MFgg0P+8l +qrnj2Y0aAOf8W5YNIQ82yYmelSmQ6EC0lk6wDx3zcmmZzjLt/tnvOa5OLH2sO5qI +/fmfNNq+IbGOcZ3a0WFj1R/N8MzSGw0XgSaQX9crdu7g00kRZIkhj0sMO81u5iO+ +91yeKHhb0nxMC88wnCkiTPcPwy7mAyKp8Zbcgsdxwr3O0NU85lS1lb9syXCHswTN +b7ZgpYvoh3gp8NUbKrd4HhadxPCvCmh+D7DavuJ2vh9+f6S+gd25i6IcgdQgM+8D +1vgSIONe7Fdu86kEF4OKgTcMOkWHLRwhj65iPkeLd4JWLxG/PKYK96bLmahz+wdN +RAEQ9FnS9kvyP1vNOKaGVYxmDsw7WqPL7S0Nrb9Bd0PaDPbPrtny7LL+Z8HRc9My +9x97AXMm0vhAfcLGIeOX +=Q4D9 -----END PGP SIGNATURE----- diff --git a/sys-apps/util-linux/files/util-linux-2.25-lscpu-pic.patch b/sys-apps/util-linux/files/util-linux-2.25-lscpu-pic.patch new file mode 100644 index 000000000000..f66ffa707ae0 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.25-lscpu-pic.patch @@ -0,0 +1,81 @@ +From f86d649d5f2522c61b791366a96e9f00cd255668 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 5 Aug 2014 18:58:52 -0400 +Subject: [PATCH] lscpu: clean up vmware inline asm + +This code is not PIC clean which means it fails to build on hardened +32bit x86 systems (i.e. building as PIE). + +While here, optimize the existing cpuid logic slightly. + +URL: https://bugs.gentoo.org/518936 +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + sys-utils/lscpu.c | 36 ++++++++++++++++++++++++++---------- + 1 file changed, 26 insertions(+), 10 deletions(-) + +diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c +index 062dff5..9965eeb 100644 +--- a/sys-utils/lscpu.c ++++ b/sys-utils/lscpu.c +@@ -546,10 +546,9 @@ cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, + __asm__( + #if defined(__PIC__) && defined(__i386__) + /* x86 PIC cannot clobber ebx -- gcc bitches */ +- "pushl %%ebx;" ++ "xchg %%ebx, %%esi;" + "cpuid;" +- "movl %%ebx, %%esi;" +- "popl %%ebx;" ++ "xchg %%esi, %%ebx;" + : "=S" (*ebx), + #else + "cpuid;" +@@ -656,12 +655,29 @@ read_hypervisor_powerpc(struct lscpu_desc *desc) + #define VMWARE_BDOOR_PORT 0x5658 + #define VMWARE_BDOOR_CMD_GETVERSION 10 + +-#define VMWARE_BDOOR(eax, ebx, ecx, edx) \ +- __asm__("inl (%%dx), %%eax" : \ +- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : \ +- "0"(VMWARE_BDOOR_MAGIC), "1"(VMWARE_BDOOR_CMD_GETVERSION), \ +- "2"(VMWARE_BDOOR_PORT), "3"(0) : \ +- "memory"); ++static inline ++void vmware_bdoor(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) ++{ ++ __asm__( ++#if defined(__PIC__) && defined(__i386__) ++ /* x86 PIC cannot clobber ebx -- gcc bitches */ ++ "xchg %%ebx, %%esi;" ++ "inl (%%dx), %%eax;" ++ "xchg %%esi, %%ebx;" ++ : "=S" (*ebx), ++#else ++ "inl (%%dx), %%eax;" ++ : "=b" (*ebx), ++#endif ++ "=a" (*eax), ++ "=c" (*ecx), ++ "=d" (*edx) ++ : "0" (VMWARE_BDOOR_MAGIC), ++ "1" (VMWARE_BDOOR_CMD_GETVERSION), ++ "2" (VMWARE_BDOOR_PORT), ++ "3" (0) ++ : "memory"); ++} + + static jmp_buf segv_handler_env; + +@@ -697,7 +713,7 @@ is_vmware_platform(void) + if (sigaction(SIGSEGV, &act, &oact)) + err(EXIT_FAILURE, _("error: can not set signal handler")); + +- VMWARE_BDOOR(eax, ebx, ecx, edx); ++ vmware_bdoor(&eax, &ebx, &ecx, &edx); + + if (sigaction(SIGSEGV, &oact, NULL)) + err(EXIT_FAILURE, _("error: can not restore signal handler")); +-- +2.0.0 + diff --git a/sys-apps/util-linux/util-linux-2.25.ebuild b/sys-apps/util-linux/util-linux-2.25.ebuild index 10c2d5d2231a..da52fa40c7cf 100644 --- a/sys-apps/util-linux/util-linux-2.25.ebuild +++ b/sys-apps/util-linux/util-linux-2.25.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.25.ebuild,v 1.4 2014/08/05 15:55:07 ottxor Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.25.ebuild,v 1.5 2014/08/05 23:04:39 vapier Exp $ EAPI="4" @@ -65,6 +65,7 @@ src_prepare() { po/update-potfiles eautoreconf fi + epatch "${FILESDIR}"/${P}-lscpu-pic.patch #518936 elibtoolize } |