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_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 104C2C433E0 for ; Tue, 9 Feb 2021 21:34:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 81B0064EA6 for ; Tue, 9 Feb 2021 21:34:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81B0064EA6 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 126A66B006C; Tue, 9 Feb 2021 16:34:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B1B96B006E; Tue, 9 Feb 2021 16:34:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE2026B0070; Tue, 9 Feb 2021 16:34:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0009.hostedemail.com [216.40.44.9]) by kanga.kvack.org (Postfix) with ESMTP id D47136B006C for ; Tue, 9 Feb 2021 16:34:30 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9FC701857988F for ; Tue, 9 Feb 2021 21:34:30 +0000 (UTC) X-FDA: 77800033500.11.sleep82_00148642760a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 81CAC1856C2F7 for ; Tue, 9 Feb 2021 21:34:30 +0000 (UTC) X-HE-Tag: sleep82_00148642760a X-Filterd-Recvd-Size: 4582 Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 21:34:29 +0000 (UTC) Received: by mail-ot1-f47.google.com with SMTP id e5so12056155otb.11 for ; Tue, 09 Feb 2021 13:34:29 -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; bh=mYfAaU+gBcca7IuAhhFeMVoOKmdaZyZ+mleDrl99M6o=; b=uMWC68Ks3SY1GdCW+5mYxEwWNi1OLwA4mZXnhEiNyGp0shbrH30kRTYhdUIi0hTZvQ oB6vFwXp4o01GrgAw59WEHUxznMVOoxEQMLFXcqX6jWWyXCbBzNrsF5YSrLesSpJ87TJ tn+qWNcgkGNP7Kg7ZNtMF/btsp5mIMXhfWtoxh6rw9c07SLWQ4+SCOjIe26QKzCnqTLZ lbNrAismaj657IC3R1UrNZeV5XKbrLUJbGUuBzNV60CuyhVc91y83PA94MyGea12z8oX SgbhCWEMqvroz5IaWpId+eEtTHrHYHXMghXGRi8K7zQuXN59+sSeMkO7hhV8Lw3nSeGm jzgQ== 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=mYfAaU+gBcca7IuAhhFeMVoOKmdaZyZ+mleDrl99M6o=; b=sh/Ibf1E6zUh+GbkeaW/VUir5N9EGVMh64y1om15FMi/DNO8mfx2ewdd6axzHXMCkK g9D3WzUwjAr21Idkgwaj8HVypjRfcmVGEgPgyD5FTgA6MKwrAO75/oYr0ru8V8fvuFhT PGw7ab7eFCXIMhMx9pGhs93T6Z3ZCwZ8oEhiEsjM0j7Zj3FFgEuK+px8zGBamWhnaQWM nbykNUDqq/e8T+U5ee3R40spQzOrx3iiGkT7xrh5cZWpdcxoxrTYW9+uWS7fpoeumqb8 lD70NJn9zP0+LA+puc5BPNp3zxVIsi8U0GaX3YLqgM7TyfByBeVkhZfSVKp6TvtKCaRc Z95Q== X-Gm-Message-State: AOAM531jjdC3ksaomz9y/SDV3E5W4njfqXAt/WDDHyrW5hyUtpLuRHhF pVdtEPG27ouz8jjfa/S4Rmd/4Z7O1gk7n6PZC1FfUdC0Dko= X-Google-Smtp-Source: ABdhPJzVv6WwYxud20Q05eogiv5EadoAYl6sP2LpfAO8KxmSzeS3MpXkbVqBHmfZLPwaKo/EbOpeyR3xfUzCaZFl/l0= X-Received: by 2002:a9d:7a54:: with SMTP id z20mr11279517otm.233.1612906469227; Tue, 09 Feb 2021 13:34:29 -0800 (PST) MIME-Version: 1.0 References: <20210209151329.3459690-1-elver@google.com> <4f39ad95-a773-acc6-dd9e-cb04f897ca16@suse.cz> In-Reply-To: <4f39ad95-a773-acc6-dd9e-cb04f897ca16@suse.cz> From: Marco Elver Date: Tue, 9 Feb 2021 22:34:17 +0100 Message-ID: Subject: Re: [PATCH mm] kfence: make reporting sensitive information configurable To: Vlastimil Babka Cc: Andrew Morton , Alexander Potapenko , Dmitry Vyukov , Andrey Konovalov , Jann Horn , LKML , Linux Memory Management List , kasan-dev , Timur Tabi , Petr Mladek , Kees Cook , Steven Rostedt 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 Tue, 9 Feb 2021 at 19:06, Vlastimil Babka wrote: > On 2/9/21 4:13 PM, Marco Elver wrote: > > We cannot rely on CONFIG_DEBUG_KERNEL to decide if we're running a > > "debug kernel" where we can safely show potentially sensitive > > information in the kernel log. > > > > Therefore, add the option CONFIG_KFENCE_REPORT_SENSITIVE to decide if we > > should add potentially sensitive information to KFENCE reports. The > > default behaviour remains unchanged. > > > > Signed-off-by: Marco Elver > > Hi, > > could we drop this kconfig approach in favour of the boot option proposed here? > [1] Just do the prints with %p unconditionally and the boot option takes care of > it? Also Linus mentioned dislike of controlling potential memory leak to be a > config option [2] > > Thanks, > Vlastimil > > [1] https://lore.kernel.org/linux-mm/20210202213633.755469-1-timur@kernel.org/ > [2] > https://lore.kernel.org/linux-mm/CAHk-=wgaK4cz=K-JB4p-KPXBV73m9bja2w1W1Lr3iu8+NEPk7A@mail.gmail.com/ Is the patch at [1] already in -next? If not I'll wait until it is, because otherwise KFENCE reports will be pretty useless. I think it is reasonable to switch to '%p' once we have the boot option, but doing so while we do not yet have the option doesn't work for us. We can potentially drop this patch if the boot option patch will make it into mainline soon. Otherwise my preference would be to take this patch and revert it with the switch to '%p' when the boot option has landed. Thanks, -- Marco