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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD2B0C433F5 for ; Fri, 26 Nov 2021 18:23:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E99A26B0075; Fri, 26 Nov 2021 13:22:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E48336B0078; Fri, 26 Nov 2021 13:22:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CEA2D6B007B; Fri, 26 Nov 2021 13:22:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id BB6106B0075 for ; Fri, 26 Nov 2021 13:22:56 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7C6B01855DF13 for ; Fri, 26 Nov 2021 18:22:46 +0000 (UTC) X-FDA: 78851902332.03.0C147F8 Received: from www.kot-begemot.co.uk (ivanoab7.miniserver.com [37.128.132.42]) by imf04.hostedemail.com (Postfix) with ESMTP id 978A050000BE for ; Fri, 26 Nov 2021 18:22:41 +0000 (UTC) Received: from [192.168.18.6] (helo=jain.kot-begemot.co.uk) by www.kot-begemot.co.uk with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mqfrn-0002RG-Qw; Fri, 26 Nov 2021 18:22:40 +0000 Received: from madding.kot-begemot.co.uk ([192.168.3.98]) by jain.kot-begemot.co.uk with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mqfri-00637Z-Mx; Fri, 26 Nov 2021 18:22:33 +0000 Subject: Re: [PATCH 4.9] hugetlbfs: flush TLBs correctly after huge_pmd_unshare To: Nadav Amit Cc: Nick Piggin , Peter Zijlstra , Will Deacon , "Aneesh Kumar K.V" , LKML , Linux-MM , linux-s390 , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, linux-um@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-arch , Mike Kravetz References: <3BD89231-2CB9-4CE5-B0FA-5B58419D7CB8@gmail.com> <7a2feed4-7c73-c7ad-881e-c980235c8293@cambridgegreys.com> From: Anton Ivanov Organization: Cambridge Greys Message-ID: <5e2db11a-46ac-9b15-7b76-f27b718606c5@cambridgegreys.com> Date: Fri, 26 Nov 2021 18:22:30 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Clacks-Overhead: GNU Terry Pratchett X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 978A050000BE X-Stat-Signature: jbwyugjgyap7xdho38fnxi6ubpi5718c Authentication-Results: imf04.hostedemail.com; dkim=none; dmarc=none; spf=none (imf04.hostedemail.com: domain of anton.ivanov@cambridgegreys.com has no SPF policy when checking 37.128.132.42) smtp.mailfrom=anton.ivanov@cambridgegreys.com X-HE-Tag: 1637950961-700007 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: On 26/11/2021 17:49, Nadav Amit wrote: > >> On Nov 26, 2021, at 2:21 AM, Anton Ivanov wrote: >> >> >> >> On 26/11/2021 06:08, Nadav Amit wrote: >>> Below is a patch to address CVE-2021-4002 [1] that I created to backport >>> to 4.9. The stable kernels of 4.14 and prior ones do not have unified >>> TLB flushing code, and I managed to mess up the arch code a couple of >>> times. >>> Now that the CVE is public, I would appreciate your review of this >>> patch. I send 4.9 for review - the other ones (4.14 and prior) are >>> pretty similar. >>> [1] https://www.openwall.com/lists/oss-security/2021/11/25/1 >>> Thanks, >>> Nadav >> >> I do not quite see the rationale for patching um >> >> It supports only standard size pages. You should not be able to map a huge page there (and hugetlbfs). >> >> I have "non-standard page size" somewhere towards the end of my queue, but it keeps falling through - not enough spare time to work on it. > > Thanks for your review. > > I did not look at the dependencies, so I did not even look if > hugetlbfs depends on !um. > > Do you prefer that for um, I will just do a BUG()? I prefer > to have a stub just to avoid potential build issues. > > Stub will be fine. I was just checking in case I missed something. Brgds, -- Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/