Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2516801rdb; Fri, 22 Sep 2023 00:20:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEOqWHYjCztSRtmNQrcQWbu7moMINH3JSQ7bT2aiCcL0zl7R41L2CHm2hM0QPnY1ZT+T0m X-Received: by 2002:a05:6808:209b:b0:3ab:83fe:e18e with SMTP id s27-20020a056808209b00b003ab83fee18emr9856438oiw.54.1695367257381; Fri, 22 Sep 2023 00:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695367257; cv=none; d=google.com; s=arc-20160816; b=bVJCX/C3HEYBZ6WwduPA/OYtZ0S9E4GWSM43On93ql+EbrrYgIdVOnYm6zOfkMM3xZ wXfpOLQFSzwrF9vEq0rQGDdIMPr/y4HrKQVwURVE0EJIq8yT811lPt+pOMUYexU1JJXY 74089qNTXAoArtHBfrDXXb4Z3Gw0/x6dC80XommzsAEfDPPJB+9s9jp4q9ekTgmm72oF DRVZXNOeUcPxQV63vuiGcPBZgdF4uTWQKUERVzjU3XMnqGYnMjmAlDSBnEjRRbWOk8tW eCIqL65lwb55HgP26Ul5jHpZ9RcGPj5WX1Xw4v9ESvY+AZa81r3V2mS/YCuIgr/KRPdd 29zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=p7LOrujP0YKYTt+K1v6o+bZW8+4gi5J/H9/JpznARtM=; fh=l8kFeWCHQiow7EIyoMueDZy9I1Z5y9e7lwiVpthlwL8=; b=fg2nMQuHeKLzGCVCi+PSFn2lsUXhSuO1msdYAKIT8pVZcOrDHZsKavsPGUJfcJi6Q5 e7Bjl7aHqkdNzRRufDyWD0qxdkKiQ060UJAa+g9ywLsRLFjQhNDmlQLy3ScK+O+/jSEp Cnb+CGBR8crqb04ewmb1A4hJtjoKZz//+CKtLaJ/uR3zgUhZy6OeQsKhQJa6c2XCM5+j AjnMOBCHXynL2zrzC8L+ScltcwtP2qNEUf/WXOgANTwP0hGfM35DAu5yDbWmmBWZTd3e FPn559MebpBJfbrrHHJ7RtLjOy7ylvVphh3RXEyHW98b1MxZMxbk3aZeD8hYhKzMgxGS rOLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id g18-20020a631112000000b00578e71164dcsi3224361pgl.274.2023.09.22.00.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 00:20:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E56C982D9367; Fri, 22 Sep 2023 00:19:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230419AbjIVHTk (ORCPT + 99 others); Fri, 22 Sep 2023 03:19:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229796AbjIVHTi (ORCPT ); Fri, 22 Sep 2023 03:19:38 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E0D0EC2; Fri, 22 Sep 2023 00:19:31 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C9E51DA7; Fri, 22 Sep 2023 00:20:07 -0700 (PDT) Received: from [192.168.68.106] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 11BBC3F5A1; Fri, 22 Sep 2023 00:19:20 -0700 (PDT) Message-ID: Date: Fri, 22 Sep 2023 08:19:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/8] powerpc: hugetlb: Convert set_huge_pte_at() to take vma Content-Language: en-GB To: Christophe Leroy , Catalin Marinas , Will Deacon , "James E.J. Bottomley" , Helge Deller , Nicholas Piggin , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Gerald Schaefer , "David S. Miller" , Arnd Bergmann , Mike Kravetz , Muchun Song , SeongJae Park , Andrew Morton , Uladzislau Rezki , Christoph Hellwig , Lorenzo Stoakes , Anshuman Khandual , Peter Xu , Axel Rasmussen , Qi Zheng Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-parisc@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-riscv@lists.infradead.org" , "linux-s390@vger.kernel.org" , "sparclinux@vger.kernel.org" , "linux-mm@kvack.org" , "stable@vger.kernel.org" References: <20230921162007.1630149-1-ryan.roberts@arm.com> <20230921162007.1630149-3-ryan.roberts@arm.com> <9864a7eb-004d-14c6-c2bd-bb9333fe67be@csgroup.eu> <0958d813-15f8-5ed5-1e20-08b8feb465ad@csgroup.eu> From: Ryan Roberts In-Reply-To: <0958d813-15f8-5ed5-1e20-08b8feb465ad@csgroup.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 22 Sep 2023 00:19:48 -0700 (PDT) On 22/09/2023 07:44, Christophe Leroy wrote: > > > Le 21/09/2023 à 20:43, Christophe Leroy a écrit : >> >> >> Le 21/09/2023 à 18:20, Ryan Roberts a écrit : >>> In order to fix a bug, arm64 needs access to the vma inside it's >>> implementation of set_huge_pte_at(). Provide for this by converting the >>> mm parameter to be a vma. Any implementations that require the mm can >>> access it via vma->vm_mm. >>> >>> This commit makes the required powerpc modifications. Separate commits >>> update the other arches and core code, before the actual bug is fixed in >>> arm64. >>> >>> No behavioral changes intended. >> >> This patch doesn't build, allthough I have also applied patch 1. Is >> something missing ? >> >> CALL scripts/checksyscalls.sh >> CC arch/powerpc/kernel/setup-common.o >> In file included from arch/powerpc/kernel/setup-common.c:37: >> ./include/linux/hugetlb.h: In function 'huge_ptep_modify_prot_commit': >> ./include/linux/hugetlb.h:987:28: error: passing argument 1 of >> 'set_huge_pte_at' from incompatible pointer type >> [-Werror=incompatible-pointer-types] >> 987 | set_huge_pte_at(vma->vm_mm, addr, ptep, pte); >> | ~~~^~~~~~~ >> | | >> | struct mm_struct * >> In file included from ./arch/powerpc/include/asm/hugetlb.h:13, >> from ./include/linux/hugetlb.h:815: >> ./arch/powerpc/include/asm/nohash/32/hugetlb-8xx.h:49:45: note: expected >> 'struct vm_area_struct *' but argument is of type 'struct mm_struct *' >> 49 | void set_huge_pte_at(struct vm_area_struct *vma, unsigned long >> addr, pte_t *ptep, pte_t pte); >> | ~~~~~~~~~~~~~~~~~~~~~~~^~~ >> cc1: all warnings being treated as errors >> make[4]: *** [scripts/Makefile.build:243: > > Oh, I realised that it requires patch 6 to build properly. This is not > good. Your series should be bisectable, that means it must build and run > successfully after each patch. Therefore you have to squash patches 1 to > 7 all togethers. Yeah my bad - sorry about that. I thought it would be better to separate the changes for each arch. But as already suggested by Andrew and Catalin, I'll squash the first 7 patches into 1 for v2. > > I'll send you comments on the powerpc part in another mail. > > Christophe