From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753657AbbHVOTx (ORCPT ); Sat, 22 Aug 2015 10:19:53 -0400 Received: from smtp16.mail.ru ([94.100.176.153]:59821 "EHLO smtp16.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753028AbbHVOTw (ORCPT ); Sat, 22 Aug 2015 10:19:52 -0400 Subject: Re: [regression] x86/signal/64: Fix SS handling for signals delivered to 64-bit programs breaks dosemu To: Ingo Molnar , Andy Lutomirski References: <55CBB2CC.9090600@list.ru> <55CBBFB9.1080201@list.ru> <20150813083949.GA17091@gmail.com> <55CC911D.3080607@list.ru> <55CCB625.3000900@list.ru> <20150822123804.GA21039@gmail.com> Cc: X86 ML , Linux kernel , Linus Torvalds , "H. Peter Anvin" , Thomas Gleixner , Brian Gerst , Borislav Petkov , Stas Sergeev From: Stas Sergeev Message-ID: <55D884FE.9020902@list.ru> Date: Sat, 22 Aug 2015 17:19:42 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150822123804.GA21039@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Mras: Ok Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 22.08.2015 15:38, Ingo Molnar пишет: >> [...] We could add yet more heuristics and teach sigreturn to ignore the saved >> SS value in sigcontext if the saved CS is 64-bit and the saved SS is unusable. > We could maybe try this - assuming it doesn't break DOSEMU. > > Or we could extend the ABI and allow DOSEMU to cleanly use it. > > I'm not sure it's worth the complexity, given that the DOSEMU workaround already > exists and will likely exist forever, so that it can support older kernels, right? That assumes dosemu is the only current and future user of that functionality. That's why I raised the question whether does Wine want to support a 32/16bit code in its 64bit builds too. So far it doesn't have such functionality, likely waiting for the kernel to provide it, rather than going the route of hacks and work-arounds as dosemu did. Also, the fact that dosemu already have that functionality, doesn't mean it will not use the new API - it actually will. With a few run-time checks at first, but when all distros are upgraded, there is simply no point to support the kernels that are not in any current distro (after a few years of deprecation perhaps). Overall, I think the existance of a few hacks in dosemu is not the reason for the linux kernel to stop any development in that area. dosemu did a great work of exploring all the pitfalls in that area, so now you know what to fix and how. Please, keep the things going.