Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D5AFC433F5 for ; Fri, 12 Nov 2021 21:43:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5023B60EC0 for ; Fri, 12 Nov 2021 21:43:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235814AbhKLVq0 (ORCPT ); Fri, 12 Nov 2021 16:46:26 -0500 Received: from out03.mta.xmission.com ([166.70.13.233]:50912 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235817AbhKLVqY (ORCPT ); Fri, 12 Nov 2021 16:46:24 -0500 Received: from in01.mta.xmission.com ([166.70.13.51]:36284) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mleKa-0058K1-Eu; Fri, 12 Nov 2021 14:43:32 -0700 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95]:43456 helo=email.froward.int.ebiederm.org.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mleKY-005vGo-CB; Fri, 12 Nov 2021 14:43:32 -0700 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds Cc: Brian Gerst , Linux Kernel Mailing List , Oleg Nesterov , Al Viro , Kees Cook , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "the arch\/x86 maintainers" , H Peter Anvin , Andy Lutomirski References: <87y26nmwkb.fsf@disp2133> <20211020174406.17889-9-ebiederm@xmission.com> <874k8htmb2.fsf@email.froward.int.ebiederm.org> <87ilwxrvu9.fsf@email.froward.int.ebiederm.org> <87ee7lqe6k.fsf@email.froward.int.ebiederm.org> Date: Fri, 12 Nov 2021 15:43:23 -0600 In-Reply-To: (Linus Torvalds's message of "Fri, 12 Nov 2021 13:24:37 -0800") Message-ID: <87wnldnj7o.fsf@email.froward.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1mleKY-005vGo-CB;;;mid=<87wnldnj7o.fsf@email.froward.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19UaXT9IAZwIid14rk31thyaqCDnzpO7zA= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH 09/20] signal/vm86_32: Replace open coded BUG_ON with an actual BUG_ON X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > On Fri, Nov 12, 2021 at 1:23 PM Linus Torvalds > wrote: >> >> But I could see some quick test hack doing it - the IVT at boot is >> actually not at zero, but at fffxxxxx. 8086 is magic. > > .. and it's been too long, and I'm too lazy to check - it may be that > vm86 mode doesn't even do that magic boot-time address thing. > > It's not like we really care about vm86 mode any more, since pretty > much nobody users it. As I recall at boot CS == 0xffff0000 EIP == 0x0000fff0 and the cpu is in 16bit mode. Which means the cpu runs the instructions in the last 16bytes of memory at boot up. Which is just enough for a jump somewhere else. Such as 64K backwards where there is enough space to actual have enough code to do something. I don't think vm86 even attempts to emulate that behavior as it is only concerned about 16bit only cpus and emulation. In the nobody cares camp I have just sent you a pull request to remove the ancient (except it wasn't a BUG_ON) and problematic test in the BUG_ON. I think that is enough to resolve this. Eric