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.3 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,URIBL_BLOCKED,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 82400C4741F for ; Fri, 30 Oct 2020 17:46:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CC8BC20A8B for ; Fri, 30 Oct 2020 17:46:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ZXXWtx1P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC8BC20A8B 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 F18286B0036; Fri, 30 Oct 2020 13:46:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EA1886B005C; Fri, 30 Oct 2020 13:46:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1BF66B005D; Fri, 30 Oct 2020 13:46:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id A00F56B0036 for ; Fri, 30 Oct 2020 13:46:47 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 430B88249980 for ; Fri, 30 Oct 2020 17:46:47 +0000 (UTC) X-FDA: 77429322054.19.cap03_0d14ea427298 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 1B1141AD1B9 for ; Fri, 30 Oct 2020 17:46:47 +0000 (UTC) X-HE-Tag: cap03_0d14ea427298 X-Filterd-Recvd-Size: 4689 Received: from mail-qv1-f68.google.com (mail-qv1-f68.google.com [209.85.219.68]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Fri, 30 Oct 2020 17:46:46 +0000 (UTC) Received: by mail-qv1-f68.google.com with SMTP id d1so2528425qvl.6 for ; Fri, 30 Oct 2020 10:46:46 -0700 (PDT) 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=+DWGshIzBKZkowUsfKXy+FsPzRhu2gsbri/5lPafTJ0=; b=ZXXWtx1Pbs8pMJTJnYFVoEtqtLap1iZkY6G5Fh8lMVJqCCGDYhY8E19a8EJdRMGo2Z Ee9+8bxgmGo1AN6ABpJ16CdUth6nAF3Jhy+uZWhEwrizCMp5Rjs+ApCkssS/Op58bOcZ a+qPbIediFWA4I80Rx/D9tyV6Pr4aeYud9kivqbxpOR1CesWSbSge91Bl1/8joF1HZNG ZgOyvBgdhQoVzFCLj8+YhsSJJ9sZIIJo1yXEs9Axoj9n5GN9SiJcwByYMooQGJEV/2gC L8RrkDMuOf4AVdX0O6Rd5ubKxeRs2JdB4gv6wwXscN8uqGlKdQw6iWBla39gWxFOcHwd 9DjA== 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=+DWGshIzBKZkowUsfKXy+FsPzRhu2gsbri/5lPafTJ0=; b=PLSpLuwzM7J9M3f7tDthI2LomL0WdkK/CT2SO9w5Z95/Mzn8eMorWW7BbIU6w7S3jx f44+eQMg3LMLsDwq61Qqy0rlUxy/Z9RVq2E+fbYDa7+eSQVL9XDu0grnfGIoBTa6g07n RlVpH63haLz7DmgmFiSRlKp55VALlP0UByHA7gsJZ1OrVBxff0AaPnf0nMGvyvrOUSPX 29FnnOH2Aq9QPU4ORQ7o58dBvLGPP5BYijacELdauHlMAi9MhcB2nGGi1/0opXlVvdAl visznb5GQZGLcTX3Af6NNBM7qatpbQVG+TUskjVYwhB2xuWNPFyJDpJzkk6BMMOanGT5 QDow== X-Gm-Message-State: AOAM531zW/SGhLccrKxDubfoC+0G5Jwy/g4tmM57BmPJ57qW87Lupkor esN8kEq1DUT6qN6jzhPbiZHjlGJStL2Jd3qAxj6VuQ== X-Google-Smtp-Source: ABdhPJxQ9rQz32r4JmDJAlhCcli/7SKf2LLsP72XKDpHUf2yg2onReDSTMzkXEBq7AlNv74LToj085dqk3VHcI/DfbQ= X-Received: by 2002:a05:6214:a0f:: with SMTP id dw15mr10113630qvb.44.1604080005622; Fri, 30 Oct 2020 10:46:45 -0700 (PDT) MIME-Version: 1.0 References: <6f87cb86aeeca9f4148d435ff01ad7d21af4bdfc.1603372719.git.andreyknvl@google.com> In-Reply-To: From: Dmitry Vyukov Date: Fri, 30 Oct 2020 18:46:33 +0100 Message-ID: Subject: Re: [PATCH RFC v2 12/21] kasan: inline and rename kasan_unpoison_memory To: Andrey Konovalov Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Kostya Serebryany , Peter Collingbourne , Serban Constantinescu , Andrey Ryabinin , Elena Petrova , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev , Linux ARM , Linux-MM , 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 Fri, Oct 30, 2020 at 5:35 PM 'Andrey Konovalov' via kasan-dev wrote: > > On Thu, Oct 22, 2020 at 3:19 PM Andrey Konovalov wrote: > > > > > > Currently kasan_unpoison_memory() is used as both an external annotation > > > and as internal memory poisoning helper. Rename external annotation to > > > kasan_unpoison_data() and inline the internal helper for for hardware > > > tag-based mode to avoid undeeded function calls. > > > > > > There's the external annotation kasan_unpoison_slab() that is currently > > > defined as static inline and uses kasan_unpoison_memory(). With this > > > change it's turned into a function call. Overall, this results in the > > > same number of calls for hardware tag-based mode as > > > kasan_unpoison_memory() is now inlined. > > > > Can't we leave kasan_unpoison_slab as is? Or there are other reasons > > to uninline it? > > Just to have cleaner kasan.h callbacks definitions. > > > It seems that uninling it is orthogonal to the rest of this patch. > > I can split it out into a separate patch if you think this makes sense? I don't have a strong opinion either way.