From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16827C2D0E4 for ; Thu, 12 Nov 2020 19:45:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D3B920759 for ; Thu, 12 Nov 2020 19:45:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="rKHdDyXn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726787AbgKLTpa (ORCPT ); Thu, 12 Nov 2020 14:45:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbgKLTpa (ORCPT ); Thu, 12 Nov 2020 14:45:30 -0500 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20C96C0613D1 for ; Thu, 12 Nov 2020 11:45:30 -0800 (PST) Received: by mail-pg1-x541.google.com with SMTP id i7so5088629pgh.6 for ; Thu, 12 Nov 2020 11:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tUsjnJsE70MPGpys5UT1OEoJSxFeQtN6aLTMo3hfEjk=; b=rKHdDyXn6oy67dBTpOqWUs9smSJZlYHldHIVXW792bY88duJKOdd/NkTFB1d9HduJh P7Mf3B8aMHapHeIsfXPwxlINzYZn7DBii1N/WZDxfDADxzU94FU9xvanoou6XfEHZCjr whOOUFtVeiU0pmGOfojKOAhlF1sylbgR4v1J5V9xRPdS19rJQZxIqGDxRFUzZbC5opox W9uUvJxCeWfLX61dhfLmvQJl3jLwWBBLzRO8p8+woJeBg+gkiJF4ilo75Gwm6mpqinCN ApVM1EuWvnU9jDx23PEYN6g7Y0WYHKXOX64Y6Ap6CoCZCt76JGnCsAl0q8+9Nkjt9TWt R12w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tUsjnJsE70MPGpys5UT1OEoJSxFeQtN6aLTMo3hfEjk=; b=SfdQJWpSFuSSlk19E5xS80LOWsc6sl9wyD94IUbcpQbJdnUNAtkqijjFpBCpl5U0X8 6FlR/vgscnP0ytGiKB0XNPRKf/x1734XjCqchak/w1T9AdSE5lOleyi0fTFPyfU0x3FH neF+6toHpAy2BDMJfOl0sl6fKQqS0Ddvz9hnaAvMF+NpnS2+C2rPU9QCXtWgJkTOobX9 Ssp8NbXcLVKWAl9al27GMwJUEWX6yhkvBLwWAK3PYmXlUxdZtjJ00SmDkymSuLfCriDq iwx4X1fTp5x+wmA4Md1uzn1II0bx10X8In34h+lLrze6cIhySGkqP+DhriKyUvq6wZqg 39kA== X-Gm-Message-State: AOAM530iB+OczJ2tl+mJ4WB7cZjMZ552M70CPgcGPqX6xuGCT1cZ5QgR pjvsIm6Nbqa+pmHLCHZ+WJiTNvBhxMO9Ch3BfpL0hQ== X-Google-Smtp-Source: ABdhPJymqAxJryKKC0ktlr8u0WBlSEAGCjBRalcMM6ulBX9LDg37qw1ly1XhtUHYBUIPWFyPX+Fs5wEsiV0gSU3nLUM= X-Received: by 2002:a05:6a00:16c4:b029:162:bf9f:6458 with SMTP id l4-20020a056a0016c4b0290162bf9f6458mr947513pfc.55.1605210329356; Thu, 12 Nov 2020 11:45:29 -0800 (PST) MIME-Version: 1.0 References: <0a9b63bff116734ab63d99ebd09c244332d71958.1605046662.git.andreyknvl@google.com> <20201111174902.GK517454@elver.google.com> In-Reply-To: <20201111174902.GK517454@elver.google.com> From: Andrey Konovalov Date: Thu, 12 Nov 2020 20:45:18 +0100 Message-ID: Subject: Re: [PATCH v2 10/20] kasan: inline and rename kasan_unpoison_memory To: Marco Elver Cc: Dmitry Vyukov , Alexander Potapenko , Catalin Marinas , Will Deacon , Vincenzo Frascino , Evgenii Stepanov , Andrey Ryabinin , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev , Linux ARM , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 11, 2020 at 6:49 PM Marco Elver wrote: > > On Tue, Nov 10, 2020 at 11:20PM +0100, Andrey Konovalov wrote: > > Currently kasan_unpoison_memory() is used as both an external annotation > > and as an internal memory poisoning helper. Rename external annotation to > > kasan_unpoison_data() and inline the internal helper for hardware > > tag-based mode to avoid undeeded function calls. > > I don't understand why this needs to be renamed again. The users of > kasan_unpoison_memory() outweigh those of kasan_unpoison_slab(), of > which there seems to be only 1! The idea is to make kasan_(un)poison_memory() functions inlinable for internal use. It doesn't have anything to do with the number of times they are used. Perhaps we can drop the kasan_ prefix for the internal implementations though, and keep using kasan_unpoison_memory() externally. > So can't we just get rid of kasan_unpoison_slab() and just open-code it > in mm/mempool.c:kasan_unpoison_element()? That function is already > kasan-prefixed, so we can even place a small comment there (which would > also be an improvement over current interface, since > kasan_unpoison_slab() is not documented and its existence not quite > justified). We can, but this is a change unrelated to this patch. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1769CC5519F for ; Thu, 12 Nov 2020 19:45:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6289920759 for ; Thu, 12 Nov 2020 19:45:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="rKHdDyXn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6289920759 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B482C6B0036; Thu, 12 Nov 2020 14:45:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AF7936B005C; Thu, 12 Nov 2020 14:45:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9BF0A6B0068; Thu, 12 Nov 2020 14:45:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0132.hostedemail.com [216.40.44.132]) by kanga.kvack.org (Postfix) with ESMTP id 6C2336B0036 for ; Thu, 12 Nov 2020 14:45:31 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1977D3626 for ; Thu, 12 Nov 2020 19:45:31 +0000 (UTC) X-FDA: 77476795662.03.coal81_400f8b927309 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id EB4B228A4E8 for ; Thu, 12 Nov 2020 19:45:30 +0000 (UTC) X-HE-Tag: coal81_400f8b927309 X-Filterd-Recvd-Size: 4608 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Nov 2020 19:45:30 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id i26so5090330pgl.5 for ; Thu, 12 Nov 2020 11:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tUsjnJsE70MPGpys5UT1OEoJSxFeQtN6aLTMo3hfEjk=; b=rKHdDyXn6oy67dBTpOqWUs9smSJZlYHldHIVXW792bY88duJKOdd/NkTFB1d9HduJh P7Mf3B8aMHapHeIsfXPwxlINzYZn7DBii1N/WZDxfDADxzU94FU9xvanoou6XfEHZCjr whOOUFtVeiU0pmGOfojKOAhlF1sylbgR4v1J5V9xRPdS19rJQZxIqGDxRFUzZbC5opox W9uUvJxCeWfLX61dhfLmvQJl3jLwWBBLzRO8p8+woJeBg+gkiJF4ilo75Gwm6mpqinCN ApVM1EuWvnU9jDx23PEYN6g7Y0WYHKXOX64Y6Ap6CoCZCt76JGnCsAl0q8+9Nkjt9TWt R12w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tUsjnJsE70MPGpys5UT1OEoJSxFeQtN6aLTMo3hfEjk=; b=QYaiFHoj3/FiAPlgCxMrFkpRfvKJ0s7GiiFnrRRNZiu7IPfulAFtJdc/jb90XlyDzb A8X/+dBd2D6sRGoQfdbdYyy3gMlPdlptdOlYwlL+08pRnMLMCcALWwSAJJ+Vtg5IOgg1 EuHtqykRjuy4G5k290q7etCekFKc2+6eIYub0FMTf8X+B9dGqmHU+Kraznk7GWam6GJu jCztSjwHQFNEUHGFdODgKIrFSuyuuaxHJ+dpEwPCqKvVg/J/HsM7jbwEfvGKtkeRXIoz 6qvtLNaByiabwlw2DXt5xGpX7lxFSqP7HAfEcFR65eyGq5Mcvi3QZnshc80BztZWj38D +l8w== X-Gm-Message-State: AOAM533nlAcEPzhEwyfUDjc5Nddn027cDm5f0sVvRCeHw4+dZn9kcQnx l448985AD3Rcrog4SwAL4U25O6VX+OKRWbFsqRLBqw== X-Google-Smtp-Source: ABdhPJymqAxJryKKC0ktlr8u0WBlSEAGCjBRalcMM6ulBX9LDg37qw1ly1XhtUHYBUIPWFyPX+Fs5wEsiV0gSU3nLUM= X-Received: by 2002:a05:6a00:16c4:b029:162:bf9f:6458 with SMTP id l4-20020a056a0016c4b0290162bf9f6458mr947513pfc.55.1605210329356; Thu, 12 Nov 2020 11:45:29 -0800 (PST) MIME-Version: 1.0 References: <0a9b63bff116734ab63d99ebd09c244332d71958.1605046662.git.andreyknvl@google.com> <20201111174902.GK517454@elver.google.com> In-Reply-To: <20201111174902.GK517454@elver.google.com> From: Andrey Konovalov Date: Thu, 12 Nov 2020 20:45:18 +0100 Message-ID: Subject: Re: [PATCH v2 10/20] kasan: inline and rename kasan_unpoison_memory To: Marco Elver Cc: Dmitry Vyukov , Alexander Potapenko , Catalin Marinas , Will Deacon , Vincenzo Frascino , Evgenii Stepanov , Andrey Ryabinin , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev , Linux ARM , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Nov 11, 2020 at 6:49 PM Marco Elver wrote: > > On Tue, Nov 10, 2020 at 11:20PM +0100, Andrey Konovalov wrote: > > Currently kasan_unpoison_memory() is used as both an external annotation > > and as an internal memory poisoning helper. Rename external annotation to > > kasan_unpoison_data() and inline the internal helper for hardware > > tag-based mode to avoid undeeded function calls. > > I don't understand why this needs to be renamed again. The users of > kasan_unpoison_memory() outweigh those of kasan_unpoison_slab(), of > which there seems to be only 1! The idea is to make kasan_(un)poison_memory() functions inlinable for internal use. It doesn't have anything to do with the number of times they are used. Perhaps we can drop the kasan_ prefix for the internal implementations though, and keep using kasan_unpoison_memory() externally. > So can't we just get rid of kasan_unpoison_slab() and just open-code it > in mm/mempool.c:kasan_unpoison_element()? That function is already > kasan-prefixed, so we can even place a small comment there (which would > also be an improvement over current interface, since > kasan_unpoison_slab() is not documented and its existence not quite > justified). We can, but this is a change unrelated to this patch. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D77E7C2D0E4 for ; Thu, 12 Nov 2020 19:46:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E89520759 for ; Thu, 12 Nov 2020 19:46:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UM+kr9xJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="rKHdDyXn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E89520759 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Y1knkFmd9vWAFo/OreK580803fQTmROqcrOl+fk59HA=; b=UM+kr9xJegOcPpuemlHTOxwT7 4DvDuyRVksT+UehaAYNqJ1AIJTs6vDS7bT4k+8izeDONPqGbHcBEqcuqRJt2tQtRQx6WHABefrgWa Tw2CJBfmNZMQdI4LUnx65vPz7GFrQvZPW0F/78r5qm4PQEGRlsvTBc5wytnc7vw+3/tnTQQXydSMX 6Q7DP5Ke5am/BdqdiL+LhB68j1kUAq8RS+O44r5mMNSLvgg8tIbtHI7yJODXkAvXlASTgzmTfAmHm Rwt0CGu6hyTQyI8uTb514dvOCnfGHxXRS8NoV4p1AugMG9tgF3vLXgXwyAX3tWK6ayuaUw6WP768I N5ENQ1CBw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdIXH-00031f-O0; Thu, 12 Nov 2020 19:45:35 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdIXD-00030b-Vx for linux-arm-kernel@lists.infradead.org; Thu, 12 Nov 2020 19:45:32 +0000 Received: by mail-pg1-x541.google.com with SMTP id z24so5098131pgk.3 for ; Thu, 12 Nov 2020 11:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tUsjnJsE70MPGpys5UT1OEoJSxFeQtN6aLTMo3hfEjk=; b=rKHdDyXn6oy67dBTpOqWUs9smSJZlYHldHIVXW792bY88duJKOdd/NkTFB1d9HduJh P7Mf3B8aMHapHeIsfXPwxlINzYZn7DBii1N/WZDxfDADxzU94FU9xvanoou6XfEHZCjr whOOUFtVeiU0pmGOfojKOAhlF1sylbgR4v1J5V9xRPdS19rJQZxIqGDxRFUzZbC5opox W9uUvJxCeWfLX61dhfLmvQJl3jLwWBBLzRO8p8+woJeBg+gkiJF4ilo75Gwm6mpqinCN ApVM1EuWvnU9jDx23PEYN6g7Y0WYHKXOX64Y6Ap6CoCZCt76JGnCsAl0q8+9Nkjt9TWt R12w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tUsjnJsE70MPGpys5UT1OEoJSxFeQtN6aLTMo3hfEjk=; b=SuvgmcrVSYxLQh4n5PeGhE1nyzUI9U22JUoQqUM2N6Bm6O4hkg6ZIcjN/tEKhkyir4 v1W/mxxLpGKPKy+rhjmvJO/HX7i4aTNJMPAy6MI4gFLgZN7KPMJX+EBfiNUeC8sIFG6i 1KfB9ZLsL2YklNu1y26TeaFBPeL7cecrfTgS7vnKrLSox/B1VRRPfS8x3LQ+aWv2KnwX v2s9GwciOp01ku8i4BfpGOBzNn7X0qXs2VRVIS6v3UPpCZb85xRqHf8mE9NHh3FG53vH ILbctJfaEQ/lR4myQLICnvNXryZU+MBor0xMCacQImt4duI+U+SE2wBrIeUsNJ4pHxh9 DlTQ== X-Gm-Message-State: AOAM530NZM4/rIfgDUnHeAuj7Nx4ivKPMu8DEHhZ/xZ/5ViL/9zbHKF5 KWZw0g0WFwXGXytTWyMcwn/EkN8d9L43CAVuLeIfnA== X-Google-Smtp-Source: ABdhPJymqAxJryKKC0ktlr8u0WBlSEAGCjBRalcMM6ulBX9LDg37qw1ly1XhtUHYBUIPWFyPX+Fs5wEsiV0gSU3nLUM= X-Received: by 2002:a05:6a00:16c4:b029:162:bf9f:6458 with SMTP id l4-20020a056a0016c4b0290162bf9f6458mr947513pfc.55.1605210329356; Thu, 12 Nov 2020 11:45:29 -0800 (PST) MIME-Version: 1.0 References: <0a9b63bff116734ab63d99ebd09c244332d71958.1605046662.git.andreyknvl@google.com> <20201111174902.GK517454@elver.google.com> In-Reply-To: <20201111174902.GK517454@elver.google.com> From: Andrey Konovalov Date: Thu, 12 Nov 2020 20:45:18 +0100 Message-ID: Subject: Re: [PATCH v2 10/20] kasan: inline and rename kasan_unpoison_memory To: Marco Elver X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_144532_161573_50E3AD5A X-CRM114-Status: GOOD ( 17.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux ARM , Branislav Rankov , Catalin Marinas , Kevin Brodsky , Will Deacon , LKML , kasan-dev , Linux Memory Management List , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , Andrew Morton , Vincenzo Frascino , Evgenii Stepanov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Nov 11, 2020 at 6:49 PM Marco Elver wrote: > > On Tue, Nov 10, 2020 at 11:20PM +0100, Andrey Konovalov wrote: > > Currently kasan_unpoison_memory() is used as both an external annotation > > and as an internal memory poisoning helper. Rename external annotation to > > kasan_unpoison_data() and inline the internal helper for hardware > > tag-based mode to avoid undeeded function calls. > > I don't understand why this needs to be renamed again. The users of > kasan_unpoison_memory() outweigh those of kasan_unpoison_slab(), of > which there seems to be only 1! The idea is to make kasan_(un)poison_memory() functions inlinable for internal use. It doesn't have anything to do with the number of times they are used. Perhaps we can drop the kasan_ prefix for the internal implementations though, and keep using kasan_unpoison_memory() externally. > So can't we just get rid of kasan_unpoison_slab() and just open-code it > in mm/mempool.c:kasan_unpoison_element()? That function is already > kasan-prefixed, so we can even place a small comment there (which would > also be an improvement over current interface, since > kasan_unpoison_slab() is not documented and its existence not quite > justified). We can, but this is a change unrelated to this patch. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel