From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D75293909B8 for ; Wed, 13 May 2026 10:57:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778669879; cv=none; b=Y5iVaHMnl3jx3xItIXAezomJZaRNr0pOQODOlZkJjHIbbBPbFf3f+iMSBb+r3n4i/OWGEIePDqkcuGcpy7ZZhUT0fmXxNtvi/H8JvEyfWMp/7Z54Ec2TbBvvACVCRnZ5Tk/5Ymv2RyXS9n2ln4nXdcstZKpAe8rdwQy6tGmcvu8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778669879; c=relaxed/simple; bh=ggr4lWgxj0PVy4G+xEkFtwTJwkTF817dsnRVC/g/pUs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GTYYee4OH8Tfc9pfrdyFEfqycfih1fZ96DReLjbFudtCSRxdyVs4Ocz799QatDgy0eRzY15eOU6rwqBwSMppWyk+UXHq1UFbpOh9PGssiacZh78uHDBgOS+udTfyDGybffuBYOK0j6vnCHV1QpZ/F2Zu+cE1pXRchJVyrPv9lck= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=Exg2M772; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="Exg2M772" 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 B80811655; Wed, 13 May 2026 03:57:51 -0700 (PDT) Received: from a080796.blr.arm.com (a080796.arm.com [10.164.21.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id ADC443F7B4; Wed, 13 May 2026 03:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1778669877; bh=ggr4lWgxj0PVy4G+xEkFtwTJwkTF817dsnRVC/g/pUs=; h=From:To:Cc:Subject:Date:From; b=Exg2M7721p0tBdyqCgso9KybEzTA8oAxesZ4mf2UMIhbm0gl3yHm2Kl6DkVg3/+Yb ox7M1f3Qz20fiOdNkTNlcL836gk8nUUtcKgWeB3JF/aucbc7utDkpX5SwT2Xo3Vheb WD+VyxUy/vBf6B1lbYUoDf6lQJzVgmVHyjf9c38E= From: Dev Jain To: akpm@linux-foundation.org, vbabka@kernel.org, harry@kernel.org, ryabinin.a.a@gmail.com Cc: Dev Jain , surenb@google.com, mhocko@suse.com, jackmanb@google.com, hannes@cmpxchg.org, ziy@nvidia.com, hao.li@linux.dev, cl@gentwo.org, rientjes@google.com, roman.gushchin@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, glider@google.com, andreyknvl@gmail.com, dvyukov@google.com, vincenzo.frascino@arm.com, kasan-dev@googlegroups.com, ryan.roberts@arm.com, anshuman.khandual@arm.com, catalin.marinas@arm.com Subject: [PATCH 0/3] kasan: hw_tags: some micro-optimizations Date: Wed, 13 May 2026 16:27:31 +0530 Message-Id: <20260513105734.3380544-1-dev.jain@arm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Patch 1 uses GFP_SKIP_KASAN to skip unpoisoning of a slab page in the page allocator, since slab allocator itself poisons the slab page immediately. Patch 2 and 3 remove wasted work while poisoning the tail end of the vmalloc/slab allocation. --- Based on 7.1-rc2. Dev Jain (3): mm/slub: hw_tags: skip page-allocator unpoisoning on slab allocation kasan: avoid re-poisoning tag-based kmalloc redzones vmalloc: hw_tags: optimize vmalloc redzoning include/linux/kasan.h | 17 +++++++++---- mm/kasan/common.c | 55 +++++++++++++++++++++++++++++++++---------- mm/kasan/hw_tags.c | 13 ++++++---- mm/page_alloc.c | 2 +- mm/slub.c | 22 ++++++++++++----- 5 files changed, 79 insertions(+), 30 deletions(-) -- 2.43.0