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 08AF3C2D0E4 for ; Thu, 12 Nov 2020 20:54:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6A5412222F for ; Thu, 12 Nov 2020 20:54:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Ctgie1D8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A5412222F 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 451706B005C; Thu, 12 Nov 2020 15:54:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 401A56B005D; Thu, 12 Nov 2020 15:54:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2CA546B0068; Thu, 12 Nov 2020 15:54:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0156.hostedemail.com [216.40.44.156]) by kanga.kvack.org (Postfix) with ESMTP id 00CF86B005C for ; Thu, 12 Nov 2020 15:54:51 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 95AF1181AC9CC for ; Thu, 12 Nov 2020 20:54:51 +0000 (UTC) X-FDA: 77476970382.26.horn73_161776b27309 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 6ADA41804B656 for ; Thu, 12 Nov 2020 20:54:51 +0000 (UTC) X-HE-Tag: horn73_161776b27309 X-Filterd-Recvd-Size: 4880 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Nov 2020 20:54:50 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id q10so5693473pfn.0 for ; Thu, 12 Nov 2020 12:54:50 -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=Kiz7admIpkh5f8na25jRX8719oxnjpCDxUfGo3ANCBE=; b=Ctgie1D8MC2g1hh3J3AczqEEFg61iZjZlh/Atgs1FXSuN1BBfr3ABTuFUMCX1A3CN5 MFvwljUQCJCrKtFGCOLQy6M8uxXt5L9hfKGDMd0GkNUqzv8iYyZRsHMN+stmXgL006yT VUSf+UXiq1qxuZmcR6nKhiOrOrqy/z70tiTQ8bVW7oMHjwpPKMNDHDuvWUsM4k/Lb3dr nK+HTBu78MxN9EqObzoctChp0htmgXuCoB8UnsY5VyXfUrPXZ/LB8/J9TDXhlyW5z0Gt yr+YchGQhT4cSML2uIyFoJWEe690nfsQoeFE4WsrKWyzex01bvfFivVCvpdoW/aaeiKf Qo8g== 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=Kiz7admIpkh5f8na25jRX8719oxnjpCDxUfGo3ANCBE=; b=ImjsXCaeghrxTvRs/AmQnf/CoIO42CwGItxwm8mrPendmXmdK+RCvp0x/Bz0hSYRL1 LXfxKKxEjk2Z6VAi0Hl0bdVb9DN7chGAtl/MSbw1Ln9XDvSLdYOrTp4sIvmPeJ0dFnNJ WGOJUNNJriamLGc9IhsSnHk99VPdUwN+4kafOlyQHweRmErzunh8XgWBmyskzWmyk/r0 y7oU+DYallf4aaexv3fewxdI619DryFBwJkBh9Scp2Pdv9d6UzzTnpybGOFahv1/kB6Y QMDRjKsnwdEIWfqSd4K2Sq3qbOa9w41uyajvDTdQMVw/A7FnlQL5bOWQoWaDDok9mlFB 3Djw== X-Gm-Message-State: AOAM533WqQuj/BlO/EanfmkXbhaaW2cRx/+XYVwsC5KOUQsb57VwakVP TWrt1ZFZPuc1eadlhcp+chEuQYdFIE3V/sG9T55Ksg== X-Google-Smtp-Source: ABdhPJyeoHD62habj4+F4sFfzR5XHQJ3anER514HDgPtrc23ULhbOrZ5H5Va0VHS+mFcpWlU8KxFd+9ZnBpTU6JeHKk= X-Received: by 2002:a05:6a00:16c4:b029:162:bf9f:6458 with SMTP id l4-20020a056a0016c4b0290162bf9f6458mr1139365pfc.55.1605214489773; Thu, 12 Nov 2020 12:54:49 -0800 (PST) MIME-Version: 1.0 References: <0a9b63bff116734ab63d99ebd09c244332d71958.1605046662.git.andreyknvl@google.com> <20201111174902.GK517454@elver.google.com> In-Reply-To: From: Andrey Konovalov Date: Thu, 12 Nov 2020 21:54:38 +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.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Nov 12, 2020 at 8:52 PM Marco Elver wrote: > > On Thu, 12 Nov 2020 at 20:45, Andrey Konovalov wrote: > > > > 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. > > Whatever avoids changing the external interface, because it seems > really pointless. I can see why it's done, but it's a side-effect of > the various wrappers being added. It looks like unposion_memory() is already taken. Any suggestions for internal KASAN poisoning function names?