From mboxrd@z Thu Jan 1 00:00:00 1970 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 E4E7DC433EF for ; Fri, 12 Nov 2021 21:04:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5598610F8 for ; Fri, 12 Nov 2021 21:04:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235736AbhKLVGu (ORCPT ); Fri, 12 Nov 2021 16:06:50 -0500 Received: from out01.mta.xmission.com ([166.70.13.231]:55972 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232902AbhKLVGt (ORCPT ); Fri, 12 Nov 2021 16:06:49 -0500 Received: from in01.mta.xmission.com ([166.70.13.51]:60772) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mldiG-000PLF-Ip; Fri, 12 Nov 2021 14:03:57 -0700 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95]:42346 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 1mldiE-005q4x-MH; Fri, 12 Nov 2021 14:03:55 -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> Date: Fri, 12 Nov 2021 15:03:47 -0600 In-Reply-To: (Linus Torvalds's message of "Fri, 12 Nov 2021 12:40:48 -0800") Message-ID: <87ee7lqe6k.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=1mldiE-005q4x-MH;;;mid=<87ee7lqe6k.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: U2FsdGVkX1/0weWzQHy+vPmnfGK2Bbf/rbjlXYKZyIU= 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 11:57 AM Eric W. Biederman > wrote: >> >> Still user space would have had to have mapped address 0 to get that >> value set in do_sys_vm86. > > You have to map address 0 anyway just to get vm86 mode to work. > > vm86 mode fundamentally requires the low 1MB of virtual memory to be > mapped, since there is no virtual memory offset in the vm86 model. True. However that also means if struct vm86plus_struct is at address 0 instead of the 16bit interrupt table something is badly wrong. Still if we are going to check for userspace being silly that it should be in do_sys_vm86. I have managed to get the fuzzer that hit the problem to run and with the test for !vm86->user_vm86 removed the BUG_ON is not being hit. I am going to keep running it for a bit just to make certain, and then I will put together a proper patch. Eric