Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp683585pxb; Thu, 19 Nov 2020 11:06:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJym9Jl5XAfAUUcaePcfoK9rxGE/NNUNSPLP6Db3yBgaR/h9wD3/tz+4f7wzq+L44ewYRzQG X-Received: by 2002:a05:6402:104d:: with SMTP id e13mr9840863edu.179.1605812762577; Thu, 19 Nov 2020 11:06:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605812762; cv=none; d=google.com; s=arc-20160816; b=OcqMdltv4ub/tFzLo6g2QIMCaH5M75ajCknYAnlOPc+wcgFHccmr/58opX0h7Cb35y gAgxhl4ztWoqQWtgvrHIr5JfbXJAAPET/W+XDeCbp68JlerYPnwHJg36m74ix86lfIUc CtgHOoAQvoMwYy7KUZ6ip2TCqimlIVySLRG06jKrTFXJ/irVwAO+VyfLry3iwqIvinL7 NS+HeAdEYBE2NVvS44YpCuI7vbKMxiQ4dQUR05gMiuNe+W/hIBLG8ZmkBqu3zzuEKlla ZCVkdTT5k8ZcAXMbzZdy617cjUqOIDOIfhH8U+gLy1kcWGynNUtRNAk8G/54aqwyrArv zLwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1qNxLY7LLhUH6+ZHrJNh82Tq2sizSDbuMmtO7hAo1E4=; b=gldLU1lIrgrJjOt1r49ObCbdaxQQjmADs4tXrjvA/X73ok3Yd6nJZDUv1oGt6IlKJK uuQRTyW2rgXgp0LSmP4Q8QRqvod40BjChogPLm4A7Vecffpy6UqEYNYvFq5TmIqM6gM9 TrrB+Gfu4SsP9bgbu/exqfxRnzs/8STmVYuT+MmJ08EtIPSa1dewZ1TylZ06cvg9giYY AnEHA8tfQWKEwq7F1uotBWCNunjdZCwdZ4TBn7KVm4AtUVA8qbN//+OY5+lDDVhVC9P3 GJ3N3/v2HncCh7oViUqlKneRmja21l8/noq6SHGyG+k7JfRFGROymgarTScw+Yx6ouG/ aSMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=biR031L0; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si368754edw.355.2020.11.19.11.05.39; Thu, 19 Nov 2020 11:06:02 -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=@redhat.com header.s=mimecast20190719 header.b=biR031L0; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727379AbgKSTEJ (ORCPT + 99 others); Thu, 19 Nov 2020 14:04:09 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60687 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726886AbgKSTEI (ORCPT ); Thu, 19 Nov 2020 14:04:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605812647; h=from:from:reply-to:subject:subject: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=1qNxLY7LLhUH6+ZHrJNh82Tq2sizSDbuMmtO7hAo1E4=; b=biR031L0aFb4IhStVNFtnqK6UE9luGUO+VvmWDt/fSMJOGPTPMTN2QQbU8UkdZ1NM7GuAK wrDJV/hlJCg7EVlc31D2ORUB/8eKN1rAqApQSaHpiGt5kR9+bzTwiq3r2Obh1ZpiZdkkOk AWj3AcfE04j2Ypv270Ck0n66ElYlLYU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-62-LbHB2hLRMcWuB9cQjprhtA-1; Thu, 19 Nov 2020 14:04:05 -0500 X-MC-Unique: LbHB2hLRMcWuB9cQjprhtA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7ED1881440E; Thu, 19 Nov 2020 19:04:04 +0000 (UTC) Received: from mail (ovpn-113-32.rdu2.redhat.com [10.10.113.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 062EA5C1D1; Thu, 19 Nov 2020 19:03:59 +0000 (UTC) Date: Thu, 19 Nov 2020 14:03:58 -0500 From: Andrea Arcangeli To: Christoph Hellwig Cc: Thomas Gleixner , Ingo Molnar , Andi Kleen , Rafael Aquini , Waiman Long , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/1] x86: restore the write back cache of reserved RAM in iounmap() Message-ID: References: <20201119175902.17394-1-aarcange@redhat.com> <20201119180206.GA24054@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201119180206.GA24054@infradead.org> User-Agent: Mutt/2.0.0 (2020-11-07) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Christoph, On Thu, Nov 19, 2020 at 06:02:06PM +0000, Christoph Hellwig wrote: > What is the callers? The whole SetPageReservered + ioremap* thing > you mention in the actual patch is completely bogus. I think we'll > need to reject that as well and fix the caller. The actual caller is not so much the focus here: the point here is to be able to either handle the caller gracefully or to get a synchronous kernel crash in __free_pages. Otherwise the problem induced by such a caller (no matter if right or wrong) becomes hardly debuggable. The caller in question was the EFI_BOOT_SERVICE_DATA that is aliased on non RAM but then freed later by swapping RAM under it. Of course the caller has already been changed to stick to write back and that specific caller is not a concern anymore. My concern is if we leave the callee (iounmap) as it is, what does guarantee us that we won't hit again in production a few years down the road? When I first read the caller it felt nothing should have gone wrong, it looked ok even the version that would leave PCD leftovers bits in the direct map. So I didn't get why switching to write back would prevent the PCD leftovers until I looked at the callee (iounmap). Thanks, Andrea