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=-9.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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=ham 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 27BACC433E6 for ; Tue, 19 Jan 2021 19:21:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01FEE23132 for ; Tue, 19 Jan 2021 19:21:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404752AbhASTVH (ORCPT ); Tue, 19 Jan 2021 14:21:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727366AbhASTNq (ORCPT ); Tue, 19 Jan 2021 14:13:46 -0500 Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::609]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F133FC061574 for ; Tue, 19 Jan 2021 11:13:05 -0800 (PST) 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-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 19.01.2021 20:40, Andy Lutomirski пишет: > 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, it > released the mmap lock before flushing the TLB, which could allow a racing > 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.