Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3014739pxb; Tue, 19 Jan 2021 11:23:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxW1UV/2LpSv8dw9+5EVe6SlbhqFeXwqgc/15PnGbgGhc3ZxgU8oCe907oh15lV4ttCRhkU X-Received: by 2002:a17:906:8046:: with SMTP id x6mr4024619ejw.351.1611084232378; Tue, 19 Jan 2021 11:23:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611084232; cv=none; d=google.com; s=arc-20160816; b=GbRSrLXH1YOuAp3IlpYwaAiz/uO9p8JcE2kOA90HDK2dCmcljzMKx8CIFqDIC8uHkQ yqJp7Q1+8+1rvQLc7xYTIzS4+IB+bCN3T59AnfhB+rwmNuBmzgZqpl2d0HHOpcIFg6da ATmNcBa5npIGxNJ6NGY5HLb5dkiguqgboTFfwIX7qjxxDQfC8HiF9LlL3q2EYez7RA/y k1hEndJsJgNWfYfmdjoO1j1TgxwFFq2+pu6iWl28DEhbe48L7ahIkV7FamUAuUyBPqYk zRylvmXJsLM179NMqGJSwJ8GvQywMfhwjusSN6UdDNXYp7YDvmN+mIpJ54IEZOKJ2ZIt jhNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=/MNdusjVBdqHw5qjDLgNu7ow8up6s3cMeSI0EmEjL2A=; b=Eo+UUFPbmRC9Pmo+pPSbQUS2kyBajQ0IqoSnm9AMbfSoSiceKCh4ngppiaPpk81hzD ASnsy0UgjsFa4aILUZV8b+Bl0BRdUuv7Z+ipRI0JsyKCX/uD8e4xRvLbSieStjIz51VX 8r8hOVWSNVEKf5B0mb4zEJNDiOqunJ6AEhn6FWkwkF0/wlXnT05IW5qXghh1+H8eDNmH uHGxY1+/ysGmvcussWNkW927cpO0b1rCh1D+1JstbZnjZ8M6aOWRTjFqer7sLHNuGOyr UOBQKwYySLAH8YD8CHWB4J24RBGK+6M8LC1mimP+M9CPoiHETbZE4Dclhsdwdnlsyag5 PR3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=dJLRIh42; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si1539548eji.534.2021.01.19.11.23.27; Tue, 19 Jan 2021 11:23:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=dJLRIh42; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404743AbhASTVG (ORCPT + 99 others); Tue, 19 Jan 2021 14:21:06 -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.