Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2541008rwd; Fri, 26 May 2023 07:54:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43UOFDmqLVqLlUn8WpuGI4zGJJj03KbPL+aiJJvK0tAYUimz5XLzaQc8eCZoNi/FXaTSkg X-Received: by 2002:a05:6a00:b8d:b0:64d:5cc5:fa67 with SMTP id g13-20020a056a000b8d00b0064d5cc5fa67mr4198078pfj.17.1685112879757; Fri, 26 May 2023 07:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685112879; cv=none; d=google.com; s=arc-20160816; b=hr+tGzFzemBKQS7+L1DnOS8NRQXbQINbqJoaZDcYw00/1XRQRpnv2zeWEtAf3SnJzA noFfSkn1DqbNd5KBj9S4Rs21BR/z6GrnrLY6Mleo/ypgyJzhh1us/D/SNkDtuNcJzDpm LMQNIuckNSH+H/T6dIClovdFmF/sPMAxvm+3iK9tBWINwvsKywaiN1l7bG7ZIjvm/Nw8 3NjTakLkMJzey7LgcQM2L0kx9OMPeX6axq1p3Ko2fQ123l9fOXIPgLk22Q+p2diIpZJ3 HyhB0SVhtgAJzEGcUleIRUr1Genux4ycl17Yrs2nGWktZ+g0kRWKCHAtQBopzCTowBtR 8ffg== 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=T8VThiU5yDpuxtlzoI3k0VlB8uKDehuvdCS/3nGjajM=; b=H3mX4kK7k00rg19K1Z5biYV8iq5sbZzfjv9BgD43Wg0mqZDMyV/Jp0pBs7GwgTit/P PNKOD+1jXr6LY+OhcN6Kr5pQSAT7XdZ7DTFTaA2hXs+An96Pikt6OHQs13ko5HGgHLwr lQXw4hc48dUniLrSsDmTRUPKrq0LVW5vGtvC847ajReLxOYCv0cdJIcgbSum/6Trsqrj SonMbBswzUAbkNXOSrQVQnZyafkWy4Vr4bVOTt+6dycvg/CAOtNLVmQob5OCtHb+wwfj me7NJLAMPDLmAWFLPZoJhpfz5T5E1jbTRmKOJnb4rgAMnyL/pxaQuoHiRuPayJ6E60UN 3eaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=LBIXv8hG; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c8-20020a056a00008800b006293f8330fcsi4229178pfj.322.2023.05.26.07.54.26; Fri, 26 May 2023 07:54:39 -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=@infradead.org header.s=casper.20170209 header.b=LBIXv8hG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243694AbjEZOeL (ORCPT + 99 others); Fri, 26 May 2023 10:34:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243897AbjEZOd4 (ORCPT ); Fri, 26 May 2023 10:33:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B11E01739; Fri, 26 May 2023 07:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=T8VThiU5yDpuxtlzoI3k0VlB8uKDehuvdCS/3nGjajM=; b=LBIXv8hGgi+RC/ChJJTsLPIuCx LYHJVDeVDXVjgD0j1JcLqthhprdU1SOY44Aqp+h+bygFqRx76bB8dgGx4tVnLxLEg4Bs4YKpfyqDU j6Cz/iX+sLsI41M8ojpeMz0lW+5ksg1CROaoLZTtScCuqBfu8iRu75z8cVCbInkVIUs6AIayjegKw yVQf7QeacQ78TiCaIt4S2wNYYT7AzAcda24siorZZgj0BXXaG1d8z9Jit1SpvkArkNtv5fotsMlFE 7tf9rm4b0z5XvwuhEUufV9STTmDly7+/BiYjkSjwqxwd14WneUDajtkn7rW6IEexx4L70VzxZk7fI P+EqLesw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1q2YUw-002sns-I7; Fri, 26 May 2023 14:32:54 +0000 Date: Fri, 26 May 2023 15:32:54 +0100 From: Matthew Wilcox To: Luis Chamberlain Cc: hughd@google.com, akpm@linux-foundation.org, brauner@kernel.org, djwong@kernel.org, p.raghav@samsung.com, da.gomez@samsung.com, rohan.puri@samsung.com, rpuri.linux@gmail.com, a.manzanares@samsung.com, dave@stgolabs.net, yosryahmed@google.com, keescook@chromium.org, hare@suse.de, kbusch@kernel.org, patches@lists.linux.dev, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC v2 2/8] shmem: convert to use is_folio_hwpoison() Message-ID: References: <20230526075552.363524-1-mcgrof@kernel.org> <20230526075552.363524-3-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230526075552.363524-3-mcgrof@kernel.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_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Fri, May 26, 2023 at 12:55:46AM -0700, Luis Chamberlain wrote: > The PageHWPoison() call can be converted over to the respective folio > call is_folio_hwpoison(). This introduces no functional changes. Yes, it very much does! > @@ -4548,7 +4548,7 @@ struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, > return &folio->page; > > page = folio_file_page(folio, index); > - if (PageHWPoison(page)) { > + if (is_folio_hwpoison(folio)) { > folio_put(folio); Imagine you have an order-9 folio and one of the pages in it gets HWPoison. Before, you can read the other 511 pages in the folio. After your patch, you can't read any of them. You've effectively increased the blast radius of any hwerror, and I don't think that's an acceptable change.