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=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham 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 B0CD3C2B9F4 for ; Tue, 22 Jun 2021 09:48:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3DF336128E for ; Tue, 22 Jun 2021 09:48:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DF336128E 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 D1BBC6B0062; Tue, 22 Jun 2021 05:48:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF26F6B006C; Tue, 22 Jun 2021 05:48:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBA996B0070; Tue, 22 Jun 2021 05:48:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id 8DC5F6B0062 for ; Tue, 22 Jun 2021 05:48:56 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 37B40F04B for ; Tue, 22 Jun 2021 09:48:56 +0000 (UTC) X-FDA: 78280885872.17.3F9AB15 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) by imf14.hostedemail.com (Postfix) with ESMTP id E5690C005A20 for ; Tue, 22 Jun 2021 09:48:55 +0000 (UTC) Received: by mail-ot1-f50.google.com with SMTP id v11-20020a9d340b0000b0290455f7b8b1dcso7701601otb.7 for ; Tue, 22 Jun 2021 02:48:55 -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=nD+1l6o05xmy+VeXlqHaYhc8wOEE+zvUKMP+aUukBYM=; b=BlLwkz0QZDydr7SNM/bXhFBnc2kM0mgn/8nn8V4kWzH9i/a9lVOPNtE9iMb+8YxrjR Mre/2mnFj/gq9qoQWjBGg+cwAKwjWqplxPF1cc4dbTWk2WR6RkvePXJGOcUECIbduaJQ Rro3+vkRKKb1LH9E7BcEIjx0ZAZMyfT8ZUiB02OX/3bVF9cBIZGK+wgNd17pxGEtguwR Q0JI8sK6nnov+RxBQN5QkiwyIw4DSZSL8ixAkFWnseaVz1p60+VDHqKraA8oZZzw5Zvx 2B9BJqVag8BpyTihdC9ZYwjxX6haC1k79P/yC3tWAp+JeJAlL+15rgMgthykfR7atUhl WMKw== 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=nD+1l6o05xmy+VeXlqHaYhc8wOEE+zvUKMP+aUukBYM=; b=WPzs58oOvHTcjxrgtrEKTyMH0aMxO4sR6jI/6mWBdctLh7uqKXTDyvmtTGWZIAwUde 5JxGiRfG12X1MDF3RLtSKosRFQuOy0vogNT26H73jxr+bLGb4K3sNiE9n+Kd9N8FpjRb rZOPMcn3RaoZ8OWGsE5E4TQiC2KJPNfZEzmI6dvZ31FlROHw58LDMYoa+IhkhbeQyewE mxq/+KFgTEAg2CaYsp1CTeFOiuAHeX364n3DzxlxfgZLmOmt4Ucna7icSfYohIpbLGP9 GNuOpWyptXLsKSVkPMUgi012rAOmv1PfMYkm7k0hWnTKdNkjYxrWAN8TkPVMLq0SdCq3 q9WA== X-Gm-Message-State: AOAM531f6ZVtSiB1jzO1I+vnysVXMjQFtnzomjVaga+MKhOwoomeQHz5 2ag8w2+UhBsk8c7a6hiNr8dRvuv95aV/fN+e8cVoag== X-Google-Smtp-Source: ABdhPJwI4wpym27x4pBWkuYhL+X3gpT+E2b8RxSSxNrlJWT0CL0jEM4nvpVx7PzkmNccX3NLHdQxN4J4vmhAa2geJnw= X-Received: by 2002:a05:6830:93:: with SMTP id a19mr2377707oto.17.1624355335059; Tue, 22 Jun 2021 02:48:55 -0700 (PDT) MIME-Version: 1.0 References: <20210620114756.31304-1-Kuan-Ying.Lee@mediatek.com> <20210620114756.31304-3-Kuan-Ying.Lee@mediatek.com> In-Reply-To: From: Marco Elver Date: Tue, 22 Jun 2021 11:48:43 +0200 Message-ID: Subject: Re: [PATCH v3 2/3] kasan: integrate the common part of two KASAN tag-based modes To: Alexander Potapenko Cc: Kuan-Ying Lee , Andrey Ryabinin , Andrey Konovalov , Dmitry Vyukov , Andrew Morton , Matthias Brugger , kasan-dev , LKML , Linux Memory Management List , Linux ARM , linux-mediatek@lists.infradead.org, wsd_upstream , chinwen.chang@mediatek.com, nicholas.tang@mediatek.com Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: E5690C005A20 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=BlLwkz0Q; spf=pass (imf14.hostedemail.com: domain of elver@google.com designates 209.85.210.50 as permitted sender) smtp.mailfrom=elver@google.com; dmarc=pass (policy=reject) header.from=google.com X-Stat-Signature: nkwynqhidsrepayjhqouht81f4b3yez3 X-HE-Tag: 1624355335-694677 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 Tue, 22 Jun 2021 at 11:28, Alexander Potapenko wrote: > > > diff --git a/mm/kasan/report_tags.h b/mm/kasan/report_tags.h > > new file mode 100644 > > index 000000000000..1cb872177904 > > --- /dev/null > > +++ b/mm/kasan/report_tags.h > Why don't you make it a C file instead? Yes, good point. report_{hw,sw}_tags.c essentially define it, but it's called by report.c code. I think I suggested to make it a header first because there were still parts that were report_{hw,sw}_tags.c specific, and the helper function would be used by those 2 to build their version of kasan_get_bug_type(), but that doesn't seem to be the case anymore. > > +const char *kasan_get_bug_type(struct kasan_access_info *info) > If this function has to be in the header, it should be declared as > static inline. > But I don't think it has to be there in the first place.