Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp434424rdb; Thu, 15 Feb 2024 05:01:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXSQOQsU+3A6jrp+V4xFeBv0FWktC4od3FIEFs0BUR/znnLkwIIblbXs0EcixPAjY5rYcg8yLwIFQ03pjMmM3Q/zlcvudEfl9j0wpXEug== X-Google-Smtp-Source: AGHT+IFx7dxo6wbOKt6K6AEuOtZvnAhn5UYZSY925Rbu9X8VDrxLulkKUNHwHVn8xkUNpqJjR62s X-Received: by 2002:a17:907:11cb:b0:a3c:368b:f848 with SMTP id va11-20020a17090711cb00b00a3c368bf848mr1196639ejb.66.1708002066696; Thu, 15 Feb 2024 05:01:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708002066; cv=pass; d=google.com; s=arc-20160816; b=tBI2hERoFepTFzkl8Ldhp/J9AEezLaEaQxZo+wGjAM1p9K0zPOg+w3vyjQSWhifvbL 9Y9/1k6GWEONITSy0QXgjoCOVB0vbyITdbhlN9Kh1/rloffu+KiUjyEXIRR37bVTmNFs X65KrPImn9h4N0UF19GcDb1jKMsWeaS3S2/taKFPpSRBlpycNNDe938L/tE7uLDLdVSo ckqXfA1IjViP4T2flqfe27u980a1mG3hD93MPgh9B1JkvxJeKieBRimFu1J6UHCTeeqI YpHFGwiqHtqkVWBJ1BwvVDCdGn48f4PYXVXt2Z3jrZp+ioxL6DTQKsWVyAeh+dmm0YMR i+EA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from; bh=gb5Pt0tJS8gyscLOf/PnJngw9/x9jVocT5petJ7YJmo=; fh=/weVRMwCB/pzkFAk7vQaDdPxgoO5UDBjJLKdgVAKqbs=; b=gqGVAwswi8aRzrhnaTyHRduU3G6jei2JuPE0fIA20lR3PYJqnFNaGAMV+Vlx6hWfCT gTclw9ZwkgDJkzEARKUVhe/P1Io7s3jJ2ATF5whIiEmz81rK13ArIUxMn6aIEf+PRsGm MzrbdujmfE6qjAVJXtdPPpxYDzeiTW4JrQ7sRvmNvQ/0dLa4Vl7+RG8C0bneZyiFIsSL rvbFFp/9CvckUkQukeMjHkdxfcMqy0iY+dtYlaq2yEb4MxU6CvfELu6z3myNLF4BaE1x hWhIfXSnvKYNBVzZYkjGMghahDrX10eJ01uiUDox3Sea3YGriQGpGHwo8HKsdppKR8e9 mK5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-66943-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66943-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ks9-20020a170906f84900b00a3d01fda82bsi601338ejb.719.2024.02.15.05.01.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 05:01:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66943-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-66943-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66943-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 72B671F271CC for ; Thu, 15 Feb 2024 13:01:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B9AD1130AEF; Thu, 15 Feb 2024 12:59:57 +0000 (UTC) Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3669130ACA for ; Thu, 15 Feb 2024 12:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708001997; cv=none; b=rn4VJ2fdY1UZSRvv1RQpwNH89CX7UBequVeQqvvtQujJ+5xLQ82rZd7LnACmvAnBvYndfmasW+svoHQ/MZQynjg6dQOCFcV3X9wB4MjWxAtoxF1mxntad4XwhW9da7IYddyi3vHMjQv2kPpxTCKeO5Ca5CilrAizAujRAreBCzs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708001997; c=relaxed/simple; bh=UC17XZcFYPFqDIb9k2pMp2QXwXJqh0VGue9d5HvnQ3A=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=AFLjFkQlQ11iKbSpbRe62Br3rHYhyaTVA7e4diVDbUHulN3NqIfbgPps/sKvrbEaK9eMXhtNYWKMvXmca1KdxPEWTqgkcaNnbChFHAi5Lj2snxVtELxrXl5Xg2x++I14OFYAIo+aEpQ41ZNknHDguAQE3Bjp1uHvbgivz43Ss7Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4TbFX94csjz4x0t; Thu, 15 Feb 2024 23:59:53 +1100 (AEDT) From: Michael Ellerman To: npiggin@gmail.com, aneesh.kumar@kernel.org, naveen.n.rao@linux.ibm.com, christophe.leroy@csgroup.eu, christophe.leroy@c-s.fr, Jiangfeng Xiao Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, nixiaoming@huawei.com, wangbing6@huawei.com, douzhaolei@huawei.com, wangfangpeng1@huawei.com In-Reply-To: <1705974359-43790-1-git-send-email-xiaojiangfeng@huawei.com> References: <1705974359-43790-1-git-send-email-xiaojiangfeng@huawei.com> Subject: Re: [PING PATCH] powerpc/kasan: Fix addr error caused by page alignment Message-Id: <170800185784.599237.15590850355904015757.b4-ty@ellerman.id.au> Date: Thu, 15 Feb 2024 23:57:37 +1100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Tue, 23 Jan 2024 09:45:59 +0800, Jiangfeng Xiao wrote: > In kasan_init_region, when k_start is not page aligned, > at the begin of for loop, k_cur = k_start & PAGE_MASK > is less than k_start, and then va = block + k_cur - k_start > is less than block, the addr va is invalid, because the > memory address space from va to block is not alloced by > memblock_alloc, which will not be reserved > by memblock_reserve later, it will be used by other places. > > [...] Applied to powerpc/fixes. [1/1] powerpc/kasan: Fix addr error caused by page alignment https://git.kernel.org/powerpc/c/4a7aee96200ad281a5cc4cf5c7a2e2a49d2b97b0 cheers