Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp228881rwl; Wed, 4 Jan 2023 18:16:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXs+ybq6SL+h7wqO+7OY18obSEaH1zhjsndvTe5LiHU1tl4YCIyl8WhIhx3R4V82agjiE7VE X-Received: by 2002:a17:907:6e16:b0:7c0:9f6f:6d8 with SMTP id sd22-20020a1709076e1600b007c09f6f06d8mr55353513ejc.2.1672885009516; Wed, 04 Jan 2023 18:16:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672885009; cv=none; d=google.com; s=arc-20160816; b=TQA/awyXntbzWZ9cHu7j4qWaA0tp8jFj2NteHgPJVVODzoi6EuMEA2gmu7IyW4+bvG 9d2MXQWQOa6ZrFYHmxQFUC3PK/vj7pkmVCGcfHPBuctFXBSuQD2VRMSzNwZls5ZqcD7G seKRYjm+Kwep9axjg5MJ+v0ELuug3BmplPXUunMdViDrdQzivWYLqmnTtbcXe3TLv+Y1 lo6ic8UdbOanYwEGmxAyHzq0PEnJ3oL6Ckw2YyBi3bmOagreTLSPpm4VMqiNUO5Ax0a6 DyW/IImRpefh7z38KhbvvJWI73OyV/9htbw6qrcb3f4VBI2RdC7WF0taLBrImdpOdqum ZUQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=hUrfx5rymV6PAvjGCkeIctTq/mmMCexOy9WfgvwN1Yg=; b=vso0PpQaWiJDqAPsGz2FphPRPbdzteUyxmfPy4z5OL+OXlgDAK1ZsyHkCWRykQk2r6 J3036ocD25GpifhRviPOOJpBxTGr2L02MQ/CdRJVU9MtyZ9j49BMrXBdja4QXt7Et1vU 3nv+hB8AWH6EVaO/B0GLBDMi4OCfLiqCRAmWZgqLAWel35GcmDoSVn0gEOTT79NdfOtb CKQpsyrckfXx62ML73qsymlF6sCRT9bly4ILcVANtxSFcljA+VbW1wfcev4nsT0gQtuu 0oF49Q5MeTeBvuLG6c8/Pr8o/aecWw6feLO/4P8sF5ZrzlmiKzYN1JFIsoJpbN8htDdr aLsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=gtIa7MIV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hw20-20020a170907a0d400b007c09df6e6a1si23052530ejc.923.2023.01.04.18.16.35; Wed, 04 Jan 2023 18:16:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=gtIa7MIV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229577AbjAEBmc (ORCPT + 56 others); Wed, 4 Jan 2023 20:42:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbjAEBmN (ORCPT ); Wed, 4 Jan 2023 20:42:13 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25B4E2F7AF for ; Wed, 4 Jan 2023 17:42:12 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id c9so19403287pfj.5 for ; Wed, 04 Jan 2023 17:42:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=hUrfx5rymV6PAvjGCkeIctTq/mmMCexOy9WfgvwN1Yg=; b=gtIa7MIVyvGMax/CEKEhY/D/ZiZmkvm0uNj297J+blrWhmKvjxfJHG5Z9jXEgIskts vz5mkXbYrV0lJmBZyLTFXFwiy2ejJ/J5kDvGMOUWFX1/5Qe7AlBMf1APcdunfrDmOEg4 qHXsClzZuMiG0/tLMAdJ/P9truPq8u9PHcMNNfZlj2VfUmP031eOYYftEy66RZs1Kgy3 Jhmobu5DaESqXDtE0MBS35YlBisuDInr8UYg4CQVnPppDXtRcoDoDwYs95jkyROk/ck1 DhixM7ZZmxeNrr81wZCxSjmH0mkBiZMFmQBa8EEObfKklE5YByuPDr6Hh1f9luh8a4d1 3KsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hUrfx5rymV6PAvjGCkeIctTq/mmMCexOy9WfgvwN1Yg=; b=mgMSQRVmfPJmEjvt5u9X2vhiSJCvCaj3r1U8rGNiRjRQLF8K5GQMd/7IcaACFAGCW+ 09FsRTawxqhuH1d5G8i/VJFMk+4rGTp9JrTrbc0Xbjf4xjC57Eku8FEUdtpWic9OC51H xsBcDFLy/bGuY95fQBm9SLX0S5u9x0yNnDnYffwX6Dla4ySAR041Keje+p8qiLvDtacQ WwK4UdQqiSdQP5tdCNriAHt1l1NxjRF6q8YNsooHXjDbvR4DHW65KrPHFNiAzcH8Qd+3 /sm2eZQTWWS1KFlk7OAUjSsDPJgyM16BdQJRNsgEV4+6+psdETYl2ssc7nA1WeUfzCK9 BRMA== X-Gm-Message-State: AFqh2kpD4inSAqmpcV1QseCDqZW9GHe8aAgtJ2ECA9KNTeycxtUBo01c 8lDNEZFyskFrn1+7CjHfILLhkQ== X-Received: by 2002:a62:e413:0:b0:582:13b5:d735 with SMTP id r19-20020a62e413000000b0058213b5d735mr62623pfh.0.1672882931539; Wed, 04 Jan 2023 17:42:11 -0800 (PST) Received: from [2620:15c:29:203:fc97:724c:15bb:25c7] ([2620:15c:29:203:fc97:724c:15bb:25c7]) by smtp.gmail.com with ESMTPSA id p5-20020a622905000000b005749f5d9d07sm23726355pfp.99.2023.01.04.17.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 17:42:10 -0800 (PST) Date: Wed, 4 Jan 2023 17:42:10 -0800 (PST) From: David Rientjes To: Feng Tang cc: Andrew Morton , Vlastimil Babka , Christoph Lameter , Pekka Enberg , Joonsoo Kim , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Andrey Konovalov , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Vincenzo Frascino , linux-mm@kvack.org, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [Patch v3 -mm 2/2] mm/kasan: simplify and refine kasan_cache code In-Reply-To: <20230104060605.930910-2-feng.tang@intel.com> Message-ID: References: <20230104060605.930910-1-feng.tang@intel.com> <20230104060605.930910-2-feng.tang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Jan 2023, Feng Tang wrote: > struct 'kasan_cache' has a member 'is_kmalloc' indicating whether > its host kmem_cache is a kmalloc cache. With newly introduced > is_kmalloc_cache() helper, 'is_kmalloc' and its related function can > be replaced and removed. > > Also 'kasan_cache' is only needed by KASAN generic mode, and not by > SW/HW tag modes, so refine its protection macro accordingly, suggested > by Andrey Konoval. > > Signed-off-by: Feng Tang > Reviewed-by: Andrey Konovalov Acked-by: David Rientjes