From nobody Mon Dec 1 22:04:01 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 C4AD02D594B for ; Fri, 28 Nov 2025 03:34:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764300893; cv=none; b=RAX6p/g4p0e82WtVoxUKFDXKt4DZceEcDhy5AetleX1oP5NrbrbNYEPXQSIfn7PObofPZecck5rQo6LhR+yxV2ETHCevjeUCZBqa6D9HpHFAUNF6LyAywoGc6T0YXUIZwtOiWsvhn/eNS36D1eBySsyE3hc3uBD4yZST7T3Ptvw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764300893; c=relaxed/simple; bh=TboqYHN1u4h15B2C/eW5kz6QxmWkAtHX21LjJuJdE8g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=QkLMuI4c4lqAa6BccHqJqHnR3w+Xf9cAIaJ2wmE4c+663tEFFwZx2cct8VApo1rywMkdj7b/oQkopIedjM9AEFp+EjgZrbl8y+kWrVUr5b9joUC1GPXJbw18kdiE07Q8yPhRsufvVMoMmEf30MHFgXdD4N/FlvfVR7lO/39w2qU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=AgmlBlwu; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AgmlBlwu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764300890; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r92fL9oKQlRTavP6tbfc36+c9pPVRtr0L8H+RYQ9Yos=; b=AgmlBlwu7BGEgeYndd5NrbOx5GiWESVLTd5Pkl3v6tLrN2vqKlE6TG1Sb0fKOe7780AvrI itfrsJOtk3zAdH6nFjCll3pF53Wx/bqldekA/iatT6gCxGQm6CV3Kkr28TCLmdyME/IQfH NBYAwUwtjpeu8/zVB8T/PeMuoF5EJh0= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-119-wgaq95i9OjubHDsKvyV9Bw-1; Thu, 27 Nov 2025 22:34:45 -0500 X-MC-Unique: wgaq95i9OjubHDsKvyV9Bw-1 X-Mimecast-MFC-AGG-ID: wgaq95i9OjubHDsKvyV9Bw_1764300883 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EFFC8180009D; Fri, 28 Nov 2025 03:34:42 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.112.7]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 46F4D19560B0; Fri, 28 Nov 2025 03:34:34 +0000 (UTC) From: Baoquan He To: linux-mm@kvack.org Cc: ryabinin.a.a@gmail.com, andreyknvl@gmail.com, glider@google.com, dvyukov@google.com, vincenzo.frascino@arm.com, akpm@linux-foundation.org, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, elver@google.com, sj@kernel.org, lorenzo.stoakes@oracle.com, snovitoll@gmail.com, christophe.leroy@csgroup.eu, Baoquan He , linux-riscv@lists.infradead.org Subject: [PATCH v4 08/12] arch/riscv: don't initialize kasan if it's disabled Date: Fri, 28 Nov 2025 11:33:16 +0800 Message-ID: <20251128033320.1349620-9-bhe@redhat.com> In-Reply-To: <20251128033320.1349620-1-bhe@redhat.com> References: <20251128033320.1349620-1-bhe@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Content-Type: text/plain; charset="utf-8" Signed-off-by: Baoquan He Cc: linux-riscv@lists.infradead.org --- arch/riscv/mm/kasan_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/riscv/mm/kasan_init.c b/arch/riscv/mm/kasan_init.c index c4a2a9e5586e..aa464466e482 100644 --- a/arch/riscv/mm/kasan_init.c +++ b/arch/riscv/mm/kasan_init.c @@ -485,6 +485,9 @@ void __init kasan_init(void) phys_addr_t p_start, p_end; u64 i; =20 + if (kasan_arg_disabled) + return; + create_tmp_mapping(); csr_write(CSR_SATP, PFN_DOWN(__pa(tmp_pg_dir)) | satp_mode); =20 --=20 2.41.0