Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp2124760pxx; Sat, 31 Oct 2020 08:52:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylQEoLjk+U3+ERX95AKgPbi8IfpJGzYDYcxZ5VVXeokBl1T1jC/tk4KXBDH30LTV7TwkKE X-Received: by 2002:a17:906:3b8f:: with SMTP id u15mr7488068ejf.348.1604159547674; Sat, 31 Oct 2020 08:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604159547; cv=none; d=google.com; s=arc-20160816; b=jOyHQQTgs35RpDZF/p7A9b/nzsm4hytGw0OzfSVwxAzgberS2/wiSNWiXHcPuF7JuU evoLQCPLsHXxOxKcePeYTFsTsMaf8C2M20d8DGplu2nYErEiLTNgE2i71hE2Z8seHR6q ecAD0GRsTefu0Kib9mfsPW0eOaa/kWiVEP97065oDPYYK2E63JLUygzG0Bdci9zNkzz1 zWUR1GJQmlJI2hb7YYzxSLix8S7/M8k0JWtaL/AFqd90DRb5F1p57NBUgGgzq9IaIRAI ra/RruttZlKBiLW3+Sd5oFftuvgM/k07pduu1edjdUh1Ex4tH6uBTdTuzFCaHMm4+s+v a6Qg== 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=WYU7wkOp3FqE7So7YpRU03zlX3ZCpY/I0xKx6rDT5a0=; b=une6q+MrEZIscpxjbw6VcGjwA1IXhRZ2FgYi4clU8JiQtje1w5Lnd/gE82uwYJ6KhV 7KogU3RjSbw0wnkhOwEtoEyu7yA+367V8U32El+FdNF2IuC2P4Gt0/H91teMPzXuxMMe YpNHGYqzcAwXGFiChe3LRe6grbVsexc805yLJq9DqrGxuXT+7T53TzXnYZibSAUFg3/I b8u+WyHyMjbGTBWkH+d2F2yYvsZtCnFTaxw7/wa25ANTrL8PbGjWHsG9PU+eS9YaYNm5 WZOIq85wDQMEPOv1B0+LKMWRybpi71Ww3ZQqcNbFc4c9+47VNlaOz3okbA3h5T3ZSRmZ szfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AdCGkUc4; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l63si8894175ede.607.2020.10.31.08.51.52; Sat, 31 Oct 2020 08:52:27 -0700 (PDT) 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=@kernel.org header.s=default header.b=AdCGkUc4; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728018AbgJaPpg (ORCPT + 99 others); Sat, 31 Oct 2020 11:45:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:51748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727867AbgJaPpg (ORCPT ); Sat, 31 Oct 2020 11:45:36 -0400 Received: from kernel.org (unknown [87.71.17.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1457822282; Sat, 31 Oct 2020 15:45:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604159135; bh=zSEGL+am3bbMk1wdOS+gSCvmmmHnMHmLzjZ8W5P06fc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AdCGkUc4oeWLEI9pmJPUJw9z2SVBCzuefgspYbujrsIias14Kn3VY1yJt5/KS/fpW kbjDIaS+y+3pk8mOETE7EIXA0MRno93a202wWqEGKtWLYInt3FZ3WP4KQvCsXBIVP+ 4uBSV10UuEc5DAmIGxSw6WYN1CFApzDaSn5Rnj8A= Date: Sat, 31 Oct 2020 17:45:28 +0200 From: Mike Rapoport To: Ard Biesheuvel Cc: Russell King - ARM Linux admin , linux-xtensa@linux-xtensa.org, Florian Fainelli , Chris Zankel , Linus Walleij , Linux Kernel Mailing List , Mike Rapoport , Max Filippov , Linux ARM Subject: Re: [PATCH] ARM, xtensa: highmem: avoid clobbering non-page aligned memory reservations Message-ID: <20201031154528.GA14628@kernel.org> References: <20201031094345.6984-1-rppt@kernel.org> <20201031103312.GI1551@shell.armlinux.org.uk> <20201031110350.GJ1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 31, 2020 at 12:21:24PM +0100, Ard Biesheuvel wrote: > On Sat, 31 Oct 2020 at 12:04, Russell King - ARM Linux admin > wrote: > > > > On Sat, Oct 31, 2020 at 11:47:42AM +0100, Ard Biesheuvel wrote: > > > On Sat, 31 Oct 2020 at 11:33, Russell King - ARM Linux admin > > > wrote: > > > > > > > > On Sat, Oct 31, 2020 at 11:43:45AM +0200, Mike Rapoport wrote: > > > > > From: Ard Biesheuvel > > > > > > > > > > free_highpages() iterates over the free memblock regions in high > > > > > memory, and marks each page as available for the memory management > > > > > system. > > > > > > > > > > Until commit cddb5ddf2b76 ("arm, xtensa: simplify initialization of > > > > > high memory pages") it rounded beginning of each region upwards and end of > > > > > each region downwards. > > > > > > > > > > However, after that commit free_highmem() rounds the beginning and end of > > > > > each region downwards, and we may end up freeing a page that is > > > > > memblock_reserve()d, resulting in memory corruption. > > > > > > > > > > Restore the original rounding of the region boundaries to avoid freeing > > > > > reserved pages. > > > > > > > > > > Fixes: cddb5ddf2b76 ("arm, xtensa: simplify initialization of high memory pages") > > > > > Link: https://lore.kernel.org/r/20201029110334.4118-1-ardb@kernel.org/ > > > > > Signed-off-by: Ard Biesheuvel > > > > > Co-developed-by: Mike Rapoport > > > > > Signed-off-by: Mike Rapoport > > > > > --- > > > > > > > > > > Max, Russell, > > > > > > > > > > Please let me know how do you prefer to take it upstream. > > > > > If needed this can go via memblock tree. > > > > > > > > > > v2: fix words order in the commit message > > > > > > > > I really don't understand what is going on here; there seems to be a > > > > total disconnect of communication between yourself and Ard. Ard has > > > > already submitted a different patch for this to the patch system > > > > already, sent yesterday. > > > > > > > > https://www.armlinux.org.uk/developer/patches/viewpatch.php?id=9021/1 > > > > > > > > Please discuss between yourselves how you want to solve the problem, > > > > and then submit an agreed and tested patch to those of us upstream; > > > > please don't make it for those upstream to pick one of your patches > > > > as you are at present. > > > > > > > > > > Apologies for creating this confusion. I posted a patch and dropped it > > > into the patch system when I found the bug. > > > > > > However, only when Florian asked about a 'fixes' tag, I went back to > > > the history, and realized that the issue was introduced by Mike during > > > the most recent merge window, and affects xtensa as well. > > > > So why does Mike's patch have: > > > > Signed-off-by: Ard Biesheuvel > > > > in it? It seems you haven't been directly involved in Mike's patch. > > > > Because I cc'ed him on the discussion following the patch that is now > in your patch system. So he took that patch and modified it, but > retained the original S-o-b and authorship. Right, that's exactly what happened. > > There's something /really/ not right with the process behind this > > patch. > > > > > I don't have a preference which patch gets applied, though, so please > > > indicate your preference, and we will adapt accordingly. > > > > I asked for you both to come to a concensus about how you want to > > proceed, and now you're throwing it back on to me to solve your(pl) > > mis-communication issue. We haven't heard from Mike yet. > > > > I am not throwing it back to you. I merely indicated that I have no > preference, and since Mike is the one who introduced this issue in the > first place, I am expecting him to drive this. And indeed, we haven't > heard from him yet. I didn't know that Ard's patch was already in the patch system. I took the patch from the list, updated it, added a fix for xtensa and resend while retaining Ard's authourship and s-o-b. > > Clearly, I wasn't blunt and stroppy enough to be properly understood. > > Sort it out between yourselves and tell me which patch you want me to > > apply. > > > > I would like you to ack this version of the patch, and disregard the > one in the patch system, so that Mike can take this one through the > memblock tree where the issue originated in the first place. Agree. -- Sincerely yours, Mike.