Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp424418pxb; Thu, 12 Nov 2020 07:11:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAewM5GomujSKDvaXS0+F+eJU8RwFEUQFm1PiEYggiBLMCT3dqIVTYBTF2xT7rrtUMTXEk X-Received: by 2002:a17:906:d0cd:: with SMTP id bq13mr29369786ejb.372.1605193918138; Thu, 12 Nov 2020 07:11:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605193918; cv=none; d=google.com; s=arc-20160816; b=ugVEoK8fv85LghVhWRob6R7OgQx5WwzU6CJ1oHoghBW5cyLeKTPrimt71DR050oj93 Jkvh3MnZwKyRqbd0CNbK00NkOvcitYZn1ib0kt8dpZdvQKWeQ8Y17j0ODItPXcZco7Gi SQON+7wntsKxSmF2PbUqpjjb/4Vt/KYu1lDEONzMdGHToCb9le7ocD7ujZS0bNfKhssq xNr+gbGebLxz9S2idXy1dRglkBtdI6u6xv9pqiMa3Pm1WcF+5iytNtCRnWJgQSHpUzvj 9tm4MEN5scdNihQkn9Rd4dIhhXBTUAdp9Q5so9ujlevZpavS57BnAELIgmwz28inClbG uzww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CoGYL/qpX4DTdicVvMAnSSNFSp8J2Bcqtm1uW4R8eNw=; b=DnnC1XC/2jPOtVmv1MDw3PH3Kh+FatDftun7cf8XjF3mOGcGj8K/f2z1DVvwi9ZZPy hpwIwR0nxTqsGHwlGgiHz6RKkIN1AXwOHpclyTP8SHji3Nj93v5qI688HLPHCcrPr7qZ /xoeVGVPgmH2+0woNFUJ5K14tPNH+eyAyHqwopWCOk2MuBHWCUn4ZhJTzHjBnDpLaD9Y /BvOtn7vykT5pdt7gwE2WEo4/Ae/blETK5nLYnvIb9075Av5craXww5HprEmBGl9HUSm 3K76IaRJzxhdc8g1LOyi8zSTG2jkCMwRj3IsWEN9rJ7S5pcc2PngcThZdtzEeHMpwxXY Xf1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gnR8Ce66; 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 u11si4121225edx.602.2020.11.12.07.11.31; Thu, 12 Nov 2020 07:11:58 -0800 (PST) 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=gnR8Ce66; 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 S1728345AbgKLPJj (ORCPT + 99 others); Thu, 12 Nov 2020 10:09:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728073AbgKLPJi (ORCPT ); Thu, 12 Nov 2020 10:09:38 -0500 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98E29C0613D1 for ; Thu, 12 Nov 2020 07:09:38 -0800 (PST) Received: by mail-qk1-x744.google.com with SMTP id 199so5487634qkg.9 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=Rtih3reqGyjxKLabMRBRYmZ0+Qv1VUMJBeK5HP/SzSUY9KfvGd9vEeW20dNcBtcKbl pWYslil7dVOQtfHWIBSt/uWde6jFjlMmbINjX4KkxVTQyfFtskG2A7I4e6clT6M+sKhP rf+15QtboO1hrhyLex+7Qau04JvvG/aBjqjrTtF3rMxLPVhma3nC+bpAGtOPZZoct1Uh 8NfXPiV8WITh/S7UwUFRtnprHdbkWqhQ7VCOKgykGy/h4a+mMdj3sbPvH4t6eCe02Xp8 lGGNvXoCjI9frnQUudO3ofD7aKlAclflYsoPkqYF1O+3nzE7jzbvw4mxF/N9gnxvm+3Q AwTA== X-Gm-Message-State: AOAM531lie9wLHStpjLfwC6yW4jvoiSzheKZS38hbTuIiwPzESKyi3Iu lzuh79yrGwTfO9WNz9jqW1XBJx8UvUPKOSmba14F9Q== 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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