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=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,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 262AFC56201 for ; Thu, 12 Nov 2020 15:09:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6CDB922201 for ; Thu, 12 Nov 2020 15:09:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="gnR8Ce66" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6CDB922201 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 A4BEA6B0036; Thu, 12 Nov 2020 10:09:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9FD066B006C; Thu, 12 Nov 2020 10:09:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8775C6B006E; Thu, 12 Nov 2020 10:09:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0250.hostedemail.com [216.40.44.250]) by kanga.kvack.org (Postfix) with ESMTP id 56E1D6B0036 for ; Thu, 12 Nov 2020 10:09:40 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DCAA91EE6 for ; Thu, 12 Nov 2020 15:09:39 +0000 (UTC) X-FDA: 77476100478.17.feet63_571761627307 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id B6D85180D0181 for ; Thu, 12 Nov 2020 15:09:39 +0000 (UTC) X-HE-Tag: feet63_571761627307 X-Filterd-Recvd-Size: 5124 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Nov 2020 15:09:38 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id q5so5470378qkc.12 for ; Thu, 12 Nov 2020 07:09:38 -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:content-transfer-encoding; bh=CoGYL/qpX4DTdicVvMAnSSNFSp8J2Bcqtm1uW4R8eNw=; b=gnR8Ce66rzxuhfKbOZw6yNQHhGoSSDN1NJC+WZJoHdZBKxgZVJWg48QvKpsf/ZxcgQ njRphhUsypMHg597vVPRfY5FoMuM7BJ0yZMIycYXJ2ne8mhVsQWnTtr+tLDO11YTcDsd KRKTH2wxQhz1ondJZZY7PasdcvcO3bvOu3crpiD6xzPtKrojBbZ8Csfryh63M7WksKkg jUsa2sjJIoqinl3AYVaMZUpqVg1GqyFp6LyqPthkD/q+zaAME5Li0PuvWLcgT06eb3IP ID+qGpkICMB0ymlNd4tuTOXgDwtBooZqotNURoVQfHJKtb/jRYNDf3FNUPyOZZmB2ZBc rWgQ== 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:content-transfer-encoding; bh=CoGYL/qpX4DTdicVvMAnSSNFSp8J2Bcqtm1uW4R8eNw=; b=tt8Fm4KqoBMlxdgDNLHoU97OtvI31HZg2ZwRKQ+SU/GumKnpA5BEVxR/CQj9JBvfKF Tgq6e929pLoAuAL0B0IbGVNwJ62I//UI/ueUeJGXxbqO62UKMMpevyuJ/xi48vvcKlPJ 4jvoMaK3Qzr5KPy1HIt15WQVKTYiVw54WBSRwIJ/1Yf1tcdmgK/jr3RL5Gf2afRgVyAU vWM2GeS2ugG+lPaD7HHPTNvHmABHhUqudK5otv5j8NtUU1teIXjEGZEO5L52uW2U2GZQ rFPpAJTV3fj5HhFxFHTSZ52MqrNeVfwuNtn9xDpejZlVOzctj+T5C7J9KWJEeLuo8pVM H+Dw== X-Gm-Message-State: AOAM532PkkW7Q292mQjC8ha7/6yTvr+vggry+4N6ZIaDdRM+4JJ4XR0F F95m7/fhHqQmmFQDXH7plh5HKJiItuQBbeud1bFkDQ== X-Google-Smtp-Source: ABdhPJyoRTmzJUSMlMiQQcxVEqJ/8FJ/nWh57GUiA27VdMzgblETurxtH9pp4CGtm5ZNBg+WajX37g8EsWwWVOK70TI= X-Received: by 2002:a37:b545:: with SMTP id e66mr183119qkf.392.1605193777579; Thu, 12 Nov 2020 07:09:37 -0800 (PST) MIME-Version: 1.0 References: <619cb0edad35d946c4796976c25bddb5b3eb0c56.1605046192.git.andreyknvl@google.com> In-Reply-To: From: Alexander Potapenko Date: Thu, 12 Nov 2020 16:09:25 +0100 Message-ID: Subject: Re: [PATCH v9 17/44] kasan, arm64: move initialization message To: Andrey Konovalov Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , Dmitry Vyukov , Andrey Ryabinin , Marco Elver , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev , Linux ARM , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 7:50 PM Andrey Konovalov wr= ote: > > On Wed, Nov 11, 2020 at 4:04 PM Alexander Potapenko w= rote: > > > > On Tue, Nov 10, 2020 at 11:11 PM Andrey Konovalov wrote: > > > > > > Software tag-based KASAN mode is fully initialized with kasan_init_ta= gs(), > > > while the generic mode only requires kasan_init(). Move the > > > initialization message for tag-based mode into kasan_init_tags(). > > > > > > Also fix pr_fmt() usage for KASAN code: generic.c doesn't need it as = it > > > doesn't use any printing functions; tag-based mode should use "kasan:= " > > > instead of KBUILD_MODNAME (which stands for file name). > > > > > > Signed-off-by: Andrey Konovalov > > > Reviewed-by: Catalin Marinas Reviewed-by: Alexander Potapenko > > Cannot we have a single kasan_init() function that will call > > tool-specific initialization functions and print the message at the > > end? > > Unfortunately no. For different modes we need different functions that > are called in different places in the kernel. E.g. for generic KASAN > we only need kasan_init() to setup shadow pages; for SW tags we also > need kasan_init_sw_tags() which initializes per-cpu state and > finilizes initialization process. Ok, got it. --=20 Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Stra=C3=9Fe, 33 80636 M=C3=BCnchen Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Halimah DeLaine Prado Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg