Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp239111lqh; Thu, 30 May 2024 22:46:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqDpkKGCwdAL6/yNIS5587ieD7iyPp2JbbvrIRocW57KAVaTW6l0lg+CQYydmMCPUQXLVLKvZ2VDz134Q2Ah5X8mhH6eEp90CQp+b/gA== X-Google-Smtp-Source: AGHT+IF79rTS1QU9GnpRfarqoEbplPgkh3dSGi1RTUvy1bbdk9GxTIoCYA61mtTi4HDX6q9OcZFM X-Received: by 2002:a05:6a21:328d:b0:1af:d08d:da34 with SMTP id adf61e73a8af0-1b264bc9f4bmr6830790637.0.1717134369415; Thu, 30 May 2024 22:46:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717134369; cv=pass; d=google.com; s=arc-20160816; b=QEekXsE0hD4mk9gdO+yw4TEpqHgKzJGQSNdGBemlZJnKLmgJJuOjCANaqauxK+0xcr utt+ectwi71+74WlXOJhd95wV8bb+cPD9cd3GgqmRKOyrHUmssX5kO818RZWv9RoJ2Qn IbWHFJFynAcjTnPb4Fopu6mKhXHxR8aVpZwDv7U4HBze6T9tnuYVu210PeDeNfcI32RT NrTENXiRlfomb1vrJ2Kxt406c6JFFnsMKUyeyIB0LqLELy5zruh5l8vU4Zk5JL6ZDO5f GQDfnD7QDbCLjJaTHlPD2qHeS40C1LbpYUxAX3lXvHOLlj8usBzx2w2UpHMhg2FOw4v5 T58A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=0yKEGYdschhF3+Xfwqus+HU+NG/U9lVv2cR411sriXs=; fh=oyOsBUzhBDw9+nf97AuLa7ZyGUsHVS5D+TgVOjE2DN4=; b=Cf6fva0eMs5y1AjghHFRR2ZJSlh73V8lYlOj1qTKgSgtaT6VAKUTL6DTGE/oPPoU3t KrU7Doj+Mqb6lj3D4ARfxPka8UvM4cwVteOME4eIWh8LRepkhC6mjmkG+T61djlx5uX2 OZbuCNz4uOTd1Wrwt5gq8L4Ct/gSaqXIM1K5EjOucld5gek1hlYzan4ZX2/UhFOO6Ual 81aVJeXKSZ5fMGF7iAB7QA03qC7SkB/UJzCvNlcpFI++dDpqZm1uhwLdj+L8IHgxlkWJ gINGJqNmzGHYLzdKBPuE22PFhFWIyhvbrv64v1355lECpLhlSs4np/PZ93OAJ9o+RYsB rqdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-196302-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196302-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c3540f9147si690170a12.51.2024.05.30.22.46.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 22:46:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196302-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-196302-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196302-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5E96A282E7A for ; Fri, 31 May 2024 05:46:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 59D6278B50; Fri, 31 May 2024 05:45:57 +0000 (UTC) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 847851FA1 for ; Fri, 31 May 2024 05:45:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717134356; cv=none; b=Rv725d7oc82rw43EatuDKUGYE2Yj2ZE9y7KN/Ysn1hhwoqAH54DUc3k01SVu1bWZYOGrCPyvmU1KLyzTFzOjrgNXFvm/la0I+KxYPBDWIiopowEhp9+4e8cguETIDcomAUfwLHp4QO0gwBh13fi4InO33OTU/tj5AJaAxNJSFwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717134356; c=relaxed/simple; bh=dSGGG9jfRUQbGQ5msnaX0lDM4XMbZF87UCR4efj7Lis=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tjNoFd5dl1juhgAoOScVpDSc0JC4A7oC0QWv53Nqbh8e57h/AI+l0JGP75GKmPNUBmWIw9p0YzHoYWtAFVUOkX9l/9GZKGIzQB4/Um6pYNP8GY3MNw5XF9YYFXFUTjfIlzlnGE/At8e2c/rNlW7eJVsyCj9MGa1BOHHW/05sABk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id B2B94FF804; Fri, 31 May 2024 05:45:43 +0000 (UTC) Message-ID: Date: Fri, 31 May 2024 07:45:42 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Revert "riscv: mm: accelerate pagefault when badaccess" Content-Language: en-US To: Palmer Dabbelt , linux-riscv@lists.infradead.org Cc: Paul Walmsley , Palmer Dabbelt , aou@eecs.berkeley.edu, surenb@google.com, akpm@linux-foundation.org, alexghiti@rivosinc.com, wangkefeng.wang@huawei.com, jszhang@kernel.org, ben@decadent.org.uk, Bjorn Topel , willy@infradead.org, linux-kernel@vger.kernel.org References: <20240530164451.21336-1-palmer@rivosinc.com> From: Alexandre Ghiti In-Reply-To: <20240530164451.21336-1-palmer@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr On 30/05/2024 18:44, Palmer Dabbelt wrote: > From: Palmer Dabbelt > > I accidentally picked up an earlier version of this patch, which had > already landed via mm. The patch I picked up contains a bug, which I > kept as I thought it was a fix. So let's just revert it. > > This reverts commit 4c6c0020427a4547845a83f7e4d6085e16c3e24f. > > Fixes: 4c6c0020427a ("riscv: mm: accelerate pagefault when badaccess") > Signed-off-by: Palmer Dabbelt > --- > arch/riscv/mm/fault.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c > index b3fcf7d67efb..5224f3733802 100644 > --- a/arch/riscv/mm/fault.c > +++ b/arch/riscv/mm/fault.c > @@ -293,8 +293,8 @@ void handle_page_fault(struct pt_regs *regs) > if (unlikely(access_error(cause, vma))) { > vma_end_read(vma); > count_vm_vma_lock_event(VMA_LOCK_SUCCESS); > - tsk->thread.bad_cause = SEGV_ACCERR; > - bad_area_nosemaphore(regs, code, addr); > + tsk->thread.bad_cause = cause; > + bad_area_nosemaphore(regs, SEGV_ACCERR, addr); > return; > } > Reviewed-by: Alexandre Ghiti