Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6775608rwb; Wed, 10 Aug 2022 00:27:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR4dMKALSOAMLZTfle7RUSx3qGRY/db0GnMB4Ci1iyHuffIPcfnA4t8v9vOTThesC7UaejXk X-Received: by 2002:a63:1e5c:0:b0:41d:b225:9ee1 with SMTP id p28-20020a631e5c000000b0041db2259ee1mr7335282pgm.245.1660116465497; Wed, 10 Aug 2022 00:27:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660116465; cv=none; d=google.com; s=arc-20160816; b=MvsvkBTMa3bcAy3FmgPHNnsB0apjLQb76IeM5N/VXzToF3S5mrACyRxQ0HAo3KTU6L zoUxsvXgxHVRGdnZ/aEHtYURomTU6kt1kTn7lDob508xzL3px0Fx6ljlbFAoNoaw7Bpf X7nAHqvU1AVM/TeGb17ReVPnIMGF3Xooe5nWPeSOBCmWpba+LX03Bi76DhZ9z3VSGYmB zCZsxvKG2O3Yy4SBYYuMAea9y0sD5vhkWRvd6QVL6oq1I2ETmjj/5LKO0W5g360Vn+Ez 614YbvZ0AO11DDPF+7L42OojQ9ukLj7Kv4TNjzdC3uWKvO+z1QRzHpchAGR7KpGCPhIu bLeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XAF+Y7ib/KCBJKhHgL+UmuGO+OSVwbzTJiPOyXkFvyI=; b=mJiwy7K5k8oN5n+JmFPJtK/FuVq3LtQrvKNEXlKRd708x0z/xMMx+1bSK+EeZ/iYLO EOY/z8CZwK1vYiwQY8rFHyvv2YVkuEB2WZha+IM3R4gOH5PYIJjlQmVkSDBwbeipES0F OzUJBSMmhWg/h84e8VYjItjHZOtiwvgL/qtgfuo+I0lPFYTFuv60PnwMZzK6TqcXqjOb 6gq6e+fSFJjdxJaqb4Q7TCEEVv1rqwmwzUi+y7g8pSdgeUfx5Kzz+OxlYUniljvFHPie q55/jRt7oe1nVaETIuSrr+MS0n8hxaE7eCqcRHuZo5OWrvBfy+4wRu1KInfjciDbDL+2 bKxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=YonhsmUC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p4-20020a056a000b4400b0052dbc76d216si2065215pfo.362.2022.08.10.00.27.31; Wed, 10 Aug 2022 00:27:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=YonhsmUC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231204AbiHJHXh (ORCPT + 99 others); Wed, 10 Aug 2022 03:23:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229589AbiHJHXf (ORCPT ); Wed, 10 Aug 2022 03:23:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AC365A8A0 for ; Wed, 10 Aug 2022 00:23:34 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A56B85C5F4; Wed, 10 Aug 2022 07:23:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1660116211; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XAF+Y7ib/KCBJKhHgL+UmuGO+OSVwbzTJiPOyXkFvyI=; b=YonhsmUCdhCcf0jEe6L1hAkGeyUHL3vBNrF3HeMGpp6gYkotJ7PaKD5lNibpb8hVQcz80t XMiwmgMqaL6WC0iShE0ITVe5v9oFXZ1sLVTxffXk/onJXHBvvce54dfEis8AKdoeUN0C8Y ohUD0xDjO+i7Dp/D9bni+wetxFw0gbs= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8607F13AB3; Wed, 10 Aug 2022 07:23:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id pkw8HvNc82IDYAAAMHmgww (envelope-from ); Wed, 10 Aug 2022 07:23:31 +0000 Date: Wed, 10 Aug 2022 09:23:30 +0200 From: Michal Hocko To: Andrew Morton Cc: Charan Teja Kalla , david@redhat.com, pasha.tatashin@soleen.com, sieberf@amazon.com, shakeelb@google.com, sjpark@amazon.de, dhowells@redhat.com, willy@infradead.org, quic_pkondeti@quicinc.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH V3] mm: fix use-after free of page_ext after race with memory-offline Message-ID: References: <1660056403-20894-1-git-send-email-quic_charante@quicinc.com> <20220809185714.5af7057c1270b11079cb196a@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220809185714.5af7057c1270b11079cb196a@linux-foundation.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 09-08-22 18:57:14, Andrew Morton wrote: > On Tue, 9 Aug 2022 20:16:43 +0530 Charan Teja Kalla wrote: > > > The below is one path where race between page_ext and offline of the > > respective memory blocks will cause use-after-free on the access of > > page_ext structure. > > Has this race ever been observed at runtime? > > Given the size of the fix, I'm looking for excuses to not backport it > into -stable kernels! I believe this is quite theoretical for two reasons 1) the memory hotplug (offlining) is quite rare operation 2) with all the retries the race window is quite hard to trigger So this is good to have address long term but nothing really for stable until somebody actually hits that with a real world workload. Btw. I plan to have a look and review this but times are busy. Hopefully soon. Thanks! -- Michal Hocko SUSE Labs