Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753259AbbHMS5p (ORCPT ); Thu, 13 Aug 2015 14:57:45 -0400 Received: from smtp2.mail.ru ([94.100.179.91]:40220 "EHLO smtp2.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752240AbbHMS5o (ORCPT ); Thu, 13 Aug 2015 14:57:44 -0400 Subject: Re: [regression] x86/signal/64: Fix SS handling for signals delivered to 64-bit programs breaks dosemu To: Linus Torvalds References: <55CA90B4.2010205@list.ru> <55CCD921.4040301@list.ru> Cc: Andy Lutomirski , Linux kernel From: Stas Sergeev Message-ID: <55CCE8A3.7020105@list.ru> Date: Thu, 13 Aug 2015 21:57:39 +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: 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 Content-Length: 1905 Lines: 38 13.08.2015 21:35, Linus Torvalds пишет: > On Thu, Aug 13, 2015 at 10:51 AM, Stas Sergeev wrote: >> Hello Linus, I verified that patch-minimal.diff is enough >> to fix the problem, BUT! dosemu is in fact using the .fs and >> .gs fields of sigcontext as a placeholders. Why the minimal >> patch alone helps is simply because the kernel headers >> installed in a system do not yet represent the newer kernel >> developments and have the .fs and .gs fields in. > Ok. So I'm inclined to do the bigger revert, just to fix the compile > issue. It would be crazy to force some silly autoconf script for > random header info. But OTOH these fields already lost their meaning. It may make sense to force people to stop using them, in case you ever want to re-use them again in the future. From what Andy says, it seems there are the distant plans to start restoring FS again. If people still use sigcontext.fs by that time, you'll get problems. If you force everyone to stop using them - you'll be safe. Also, at least in the past, resolving the compile-time problems was up to the distributions: they always provided the "sanitized up" version of kernel headers. Not sure what the current policy is... In fact, here in Fedora-22, I have /usr/include/asm/sigcontext.h that is straight from the kernel, but signal.h is instead using a "sanitized up" version in /usr/include/bits/sigcontext.h so the userspace compiles fine. In fact, I think the "silly autoconf script" you mentioned above, should indeed be reverted, and instead I should use sigcontext.reserved1[8] array to store FS/GS? Is this safer against ever re-using this space? Not sure... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/