Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp90859lqc; Thu, 7 Mar 2024 11:08:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUaa7mJ5Q+e152Z5H0tdMvID8Gla3bY4e+DUvpL0OMPBA7wyzfqnqyUiYwxBSVUFxciMrlyS+3iMiThdQzY//f30PGC/waZREy92wAQRg== X-Google-Smtp-Source: AGHT+IFmLua0U0os/rPHBsE6fX2Sz4bUR0YmkWghwGcIWYpr6UhhTJ8b963BmjkZYUBPfz2lEiGS X-Received: by 2002:a05:6512:ba9:b0:513:e21:2a64 with SMTP id b41-20020a0565120ba900b005130e212a64mr2663876lfv.31.1709838518070; Thu, 07 Mar 2024 11:08:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709838518; cv=pass; d=google.com; s=arc-20160816; b=z2R9E98f/SYZbnCM4AFMw/vLPVXYQZggpaAVY0/N7ieYY5ctVT83GXJL54jA5kU9Xc KiEDtC9AOC0uDaylexJ+7WMG4d5B3tOh6bfVxvBUWxjlOwySZLN8+u75j6u/+fgybPuW rf1+G2z7+4DI2AuBTix0FEM1jYiiUxq/+N35tabWmF6KTUkqf9aOuPDQ59ImzulBcQ1o zffw64bLr/D3j9sakInsVpD00ZPl6L5+QsuGJxBwst/4WbmPRb9XgmwLramM6YvDAiQN L2C8K6G51fof31SivfxGwlsjVvSiZ9vse5UjDFRIo4nu8et4mWg5nYj5MUb21/D5ChZW NTEw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Lg00SltJpoNRIhc0Zd1SHPpVGEI2+YhR9NTH/1oo+rQ=; fh=Z2Yff8FpzHA77PzErVAPHZNVLI1Nhp7CEq7LT05A1sU=; b=sgsCaycko92lTBWzcTnZdiS8ycHgVR0R9TFlaR+CzRosqJXcLxCt/q2TCpB2Op8AU4 qsKyJstjA0GTr6RCyVuaERr0U6PMePzYITMYSmdBhrE8C4t654jzYRbdjLKr2XkLqbGu 18AOJSM6RCJ21/2pIlwSdTCvCPym80zHkBh1FH9KlRMhKQECxyWikpGTSS7hDvu8G4en D12UzPXvZwpRnT50qJxRVU9URZNCyEHzCI5Yy+5pNVKvgLTvs6hzocIEg7y3viyq3luE zsww//Vkkfe5jc8hp04pJs/YC9j9Jc3wmc+TcWKQH4wGcMvHERGFfZFzLXJ/fqCnwTG4 vZ4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eV2GjNTs; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-96063-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96063-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gs20-20020a170906f19400b00a4523024e21si4151913ejb.336.2024.03.07.11.08.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:08:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96063-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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eV2GjNTs; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-96063-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96063-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 C25801F22039 for ; Thu, 7 Mar 2024 19:08:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DBCB913AA26; Thu, 7 Mar 2024 19:06:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eV2GjNTs" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 7F4B31386CB for ; Thu, 7 Mar 2024 19:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709838367; cv=none; b=AYlBsMcuJikQ23tWg3lcpEz2m+J2VS/aFl7Piuo1P56nNP6N0g+3zGcZ072YHBwSBHtgmpCETWoYLDg/yV2R2jj/BXPL6VbnoPbxT1noIP15wqhv4qcVlegjKgYugZQxoyP76QOpBZYCHrSF4/AqTn9gUHIMHshZdMjXQNQwWcY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709838367; c=relaxed/simple; bh=JZz52JX16HZ+UtSl1eWRwEyq6yI1e9kFnFSNg89Zjkw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ieV3Sdll2ow7igCFm5PYlIacGi58JQeP5T6MQV/3Gj1qS6hb3On1LriYLhc885Bx9eChWrCgvXRF+xZy0FXoGx3kV4RNpOY3JJkcWA0mat974g15ooil/ImwT7BG0BUo5K1Lz422Vr6ARgbJDLbHivN//dkNCwJYU42ozbQY9qc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=eV2GjNTs; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709838362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lg00SltJpoNRIhc0Zd1SHPpVGEI2+YhR9NTH/1oo+rQ=; b=eV2GjNTsFL+dTMc3eK3FepLxOlx+n3hqe3sXXrxoONpCeV074Q7iej9Sx0+kOi1qH9kqC0 7eixk2v+5oqeBY+4gFCwgxK9GLPRS556t3MNmSGURFf8SFc7PTsBBsj/Z6HX1+g3inYAwH yWJuuhQvMcjuDMWaliQEXy0bUfcmtN0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-518-bXABBfJUNVGBfGntdYleAA-1; Thu, 07 Mar 2024 14:05:56 -0500 X-MC-Unique: bXABBfJUNVGBfGntdYleAA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 48A7185A58C; Thu, 7 Mar 2024 19:05:56 +0000 (UTC) Received: from llong.com (unknown [10.22.17.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD6AB2166AF1; Thu, 7 Mar 2024 19:05:55 +0000 (UTC) From: Waiman Long To: Catalin Marinas , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Waiman Long Subject: [PATCH 2/2] mm/kmemleak: Disable KASAN instrumentation in kmemleak Date: Thu, 7 Mar 2024 14:05:48 -0500 Message-Id: <20240307190548.963626-3-longman@redhat.com> In-Reply-To: <20240307190548.963626-1-longman@redhat.com> References: <20240307190548.963626-1-longman@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: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 Kmemleak ia a memory leak checker. KASAN is also a memory checker but it focuses more on finding out-of-bounds and use-after-free bugs. Since kmemleak is inherently slow especially on systems with large number of CPUs, adding KASAN instrumentation will make it slower even more. As kmemleak is not for production use, the utility of enabling KASAN there is questionable. This patch disables KASAN instrumentation for configurations that enable both of them to slightly reduce performance overhead. Signed-off-by: Waiman Long --- mm/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/Makefile b/mm/Makefile index e4b5b75aaec9..fc0f9a63a61e 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -5,6 +5,7 @@ KASAN_SANITIZE_slab_common.o := n KASAN_SANITIZE_slub.o := n +KASAN_SANITIZE_kmemleak.o := n KCSAN_SANITIZE_kmemleak.o := n # These produce frequent data race reports: most of them are due to races on -- 2.39.3