Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4549320pxj; Tue, 22 Jun 2021 02:50:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBvnC16KHZDIgf7hgw4bHNYoLRP+AAYOnzcE/oTio5eRHdq6vUM50yhJvcMCYdCSklakdL X-Received: by 2002:a17:906:234e:: with SMTP id m14mr3036867eja.217.1624355410175; Tue, 22 Jun 2021 02:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624355410; cv=none; d=google.com; s=arc-20160816; b=e0f6g1r0K8NxoU+b9C+az32pWiMcbOSZcFjKyhE1JzxJyuElAGKyVLyJCjnxyk+u4m wYygoHuQZMMLo+dlrknxLF9NcQ7kO1ry30QzAl3pWMFYP2BAiKCZY9E19VvuV6xLlJRV 3PI8O7DGD0PyvEgu3AflJIwGZ6aig/8Yvp14MDFaY4u/Y9FhE/opKLmhLclazCD7ecQD F0/Viitcdn3CqRonTLPD1zhCiig2hjYYOcSB9YwBQuLBy+sdbXs8OaT1Zg3BWR/Q7WsS H75Cj6xI8zLgKTtXd4D7jtLG0F3W/7ThFUnVkAdlJ1bPK6mPlb6ozWtyKgqXAdabJYGp /ptA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nD+1l6o05xmy+VeXlqHaYhc8wOEE+zvUKMP+aUukBYM=; b=BI7gKPzdVWPSX7fPzYTfI39EB4U3RkJfCgBaeU9nrZbWHFVW2qDdnzegYijAngcu2/ BWaxbW1EkYuhItjtZs1oyOPLrMfisfnSTlqEnqzFR1RV3ayVf3hs+Z81ubLiAsMcQ/5j rHu9xuBtvFrz0T/8/81yy3WQnmWOVbA4cXLxuXXrEOIcMlhigQPLflNZ9gV/aF7sG7PT rL7ZofLstKRdPXujschCaTZlYNHfqZXzNev6VTG8cAa4Iu21vfcIfqN+FaV8CxpHwr8f kNTweTUxpAlZQQthD4rBU2jm1Xrszh258Dv3UrfMbtd24CfxlwaHzuvDijLVI3jNDYxO 4FJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BlLwkz0Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x5si3095949edd.181.2021.06.22.02.49.48; Tue, 22 Jun 2021 02:50:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BlLwkz0Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229807AbhFVJvM (ORCPT + 99 others); Tue, 22 Jun 2021 05:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbhFVJvM (ORCPT ); Tue, 22 Jun 2021 05:51:12 -0400 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1A16C061574 for ; Tue, 22 Jun 2021 02:48:55 -0700 (PDT) Received: by mail-ot1-x333.google.com with SMTP id n99-20020a9d206c0000b029045d4f996e62so1856401ota.4 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=C3CzDp4rBKnxY5xOUM2oTcTYWHokk5RjZY73q8wCmFENPYJ9mOG66gJTKdpCVWqzR8 wanBgqWJUpvDVNDUWoKsoMFBON1H1dt/Psl0mXCtGm7fUg9oTq8Jmfiz3ZG7QO9Jgk2/ 46OlMDlDZUeYWULxmINQC0jtKK6y5X37kpFPSI/ED+N1YKuLuvmDcNS58mI6dIQJahYx 2ROjvNf4B7d7vOR23FoE83Wh84Ft0+OTHRRiYFrzycBAPX/jIlkJbcNlvzLhR1NwrjHQ g+W5SYI88O+Joa7DHZDppi2KhbsRjq9+o8YCIJkBX9teQi8V4CG2k3iqF7C8Bhcao3kN wd8g== X-Gm-Message-State: AOAM531mEY3vK7cbRj0IxGyJBcheElzX3SRuFl0B8sYDOs8m6R2oW4dQ r6fy1f4BdzLygKvhA9TG02oVZEBM6tf64hDW8nfGsA== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.