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 X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_RED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC6CBC433E0 for ; Tue, 19 Jan 2021 19:13:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3F97920706 for ; Tue, 19 Jan 2021 19:13:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F97920706 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=yandex.ru Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6267C6B0005; Tue, 19 Jan 2021 14:13:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D6CB6B0006; Tue, 19 Jan 2021 14:13:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4EE7A6B0007; Tue, 19 Jan 2021 14:13:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id 390D16B0005 for ; Tue, 19 Jan 2021 14:13:07 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id EC133180AD806 for ; Tue, 19 Jan 2021 19:13:06 +0000 (UTC) X-FDA: 77723472372.15.shake76_0902c4d27554 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id C694A1814B0C7 for ; Tue, 19 Jan 2021 19:13:06 +0000 (UTC) X-HE-Tag: shake76_0902c4d27554 X-Filterd-Recvd-Size: 3603 Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Tue, 19 Jan 2021 19:13:04 +0000 (UTC) Received: from myt5-4fa6d87d1832.qloud-c.yandex.net (myt5-4fa6d87d1832.qloud-c.yandex.net [IPv6:2a02:6b8:c12:2507:0:640:4fa6:d87d]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 9C5325060D7A; Tue, 19 Jan 2021 22:13:02 +0300 (MSK) Received: from myt6-9bdf92ffd111.qloud-c.yandex.net (myt6-9bdf92ffd111.qloud-c.yandex.net [2a02:6b8:c12:468a:0:640:9bdf:92ff]) by myt5-4fa6d87d1832.qloud-c.yandex.net (mxback/Yandex) with ESMTP id YReIGUqZQY-D2Fe9MtE; Tue, 19 Jan 2021 22:13:02 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1611083582; bh=/MNdusjVBdqHw5qjDLgNu7ow8up6s3cMeSI0EmEjL2A=; h=In-Reply-To:From:Date:References:To:Subject:Message-ID:Cc; b=dJLRIh42IpbW6waBaYOgyK61rZpTsyhkKXYgG0o4leblyFvW+yqFMeBdjHu+y1G2t JEYy7zMjp2sJAV/SwNauGZRCciSJNwJIbSXMttK35bbvoPyUTA6RCz7Z+Pnb7Ey6HL qqSl5SYdDByr6wa2E37TgJT8rVamPk8liYI2zjLE= Authentication-Results: myt5-4fa6d87d1832.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by myt6-9bdf92ffd111.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id KA6voNREkq-D1IexuS7; Tue, 19 Jan 2021 22:13:01 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Subject: Re: [PATCH v2] x86/vm86/32: Remove VM86_SCREEN_BITMAP support To: Andy Lutomirski , x86@kernel.org Cc: LKML , Andrea Arcangeli , Linux-MM , Jason Gunthorpe , Linus Torvalds , Matthew Wilcox , Jann Horn , Jan Kara , Yu Zhao , Peter Xu , Brian Gerst References: From: stsp Message-ID: <65ca981d-1a23-d8fe-71fb-efe17befe8df@yandex.ru> Date: Tue, 19 Jan 2021 22:13:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 19.01.2021 20:40, Andy Lutomirski =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > The implementation was rather buggy. It unconditionally marked PTEs > read-only, even for VM_SHARED mappings. I'm not sure whether this is > actually a problem, but it certainly seems unwise. More importantly, i= t > released the mmap lock before flushing the TLB, which could allow a rac= ing > CoW operation to falsely believe that the underlying memory was not > writable. > > I can't find any users at all of this mechanism, so just remove it. > > Cc: Andrea Arcangeli > Cc: Linux-MM > Cc: Jason Gunthorpe > Cc: x86@kernel.org > Cc: Linus Torvalds > Cc: Matthew Wilcox > Cc: Jann Horn > Cc: Jan Kara > Cc: Yu Zhao > Cc: Peter Xu > Cc: Stas Sergeev > Cc: Brian Gerst > Signed-off-by: Andy Lutomirski > --- Acked-by: stsp2@yandex.ru dosemu2 just uses mprotect(). The BIOSSEG stuff in vm86_32.c is also unused btw.