From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10680 Path: news.gmane.org!.POSTED!not-for-mail From: "LeMay, Michael" Newsgroups: gmane.linux.lib.musl.general Subject: [RFC PATCH v2 2/2] avoid invoking vDSO when separate stack segment is enabled Date: Fri, 28 Oct 2016 20:14:35 +0000 Message-ID: <390CE752059EB848A71F4F676EBAB76D3AC263E8@ORSMSX114.amr.corp.intel.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1477685704 31002 195.159.176.226 (28 Oct 2016 20:15:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2016 20:15:04 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-10693-gllmg-musl=m.gmane.org@lists.openwall.com Fri Oct 28 22:15:00 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1c0DYC-0006ki-KD for gllmg-musl@m.gmane.org; Fri, 28 Oct 2016 22:14:52 +0200 Original-Received: (qmail 30493 invoked by uid 550); 28 Oct 2016 20:14:53 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 30451 invoked from network); 28 Oct 2016 20:14:49 -0000 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,411,1473145200"; d="scan'208";a="1060764964" Thread-Topic: [RFC PATCH v2 2/2] avoid invoking vDSO when separate stack segment is enabled Thread-Index: AdIxV9OzUT1O5BxpTj+N3Y0xODc1mA== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.140] Xref: news.gmane.org gmane.linux.lib.musl.general:10680 Archived-At: The Linux vDSO code may be incompatible with programs that use a separate stack segment. This patch prevents the vDSO from being invoked when that feature is enabled. Signed-off-by: Michael LeMay --- arch/i386/syscall_arch.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/i386/syscall_arch.h b/arch/i386/syscall_arch.h index 4c9d874..4d7c3c2 100644 --- a/arch/i386/syscall_arch.h +++ b/arch/i386/syscall_arch.h @@ -52,8 +52,17 @@ static inline long __syscall6(long n, long a1, long a2, = long a3, long a4, long a return __ret; } =20 +#if !SEP_STACK_SEG +/* The vDSO may not be compiled with support for a separate stack segment. + * Avoid invoking the vDSO when this feature is enabled, since it may try = to + * access the stack using memory operands with base registers other than E= BP or + * ESP without also using a stack segment override prefix. A special comp= iler + * pass needs to be used to add such prefixes, and it is unlikely that a p= ass + * of that sort was applied when the vDSO was compiled. + */ #define VDSO_USEFUL #define VDSO_CGT_SYM "__vdso_clock_gettime" #define VDSO_CGT_VER "LINUX_2.6" +#endif =20 #define SYSCALL_USE_SOCKETCALL --=20 2.7.4