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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 8FF6EC433B4 for ; Sat, 3 Apr 2021 14:45:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 213B261264 for ; Sat, 3 Apr 2021 14:45:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 213B261264 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 4B0F16B0071; Sat, 3 Apr 2021 10:45:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4623F6B0075; Sat, 3 Apr 2021 10:45:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2DC986B0078; Sat, 3 Apr 2021 10:45:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 1000F6B0071 for ; Sat, 3 Apr 2021 10:45:26 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C18EC1C976 for ; Sat, 3 Apr 2021 14:45:25 +0000 (UTC) X-FDA: 77991329010.09.A3B2249 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) by imf27.hostedemail.com (Postfix) with ESMTP id 821BA80192C0 for ; Sat, 3 Apr 2021 14:45:22 +0000 (UTC) Received: by mail-ot1-f49.google.com with SMTP id t23-20020a0568301e37b02901b65ab30024so7404443otr.4 for ; Sat, 03 Apr 2021 07:45:25 -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=Fd57dXyQV6AT1R00nKnfUO2FzSbFjinw6VgrMLgEL4U=; b=uX/VfAjFux5IF302lX518bHTStFi96or0bU6mH6tb/4P7FlLsv7YSQhUp6x+R8k0em ubIxuVl6x55LIVHZeOe9w9YStTWAdJw7kAQl7R5+7pxI9O0h+qM5+HDQEQFEvcm6leGZ GflGKyAqauMcIJY9ATi3Kyw9Tkqbl9WdYWLNKJXvcve8Bfywu74Zuta1ybgbaJtulC+s 2CR4bGtLHX1c3qe4BLws95WSx0n+FTQP2ZfGocczdClmNJK+l6CpYqIpF11a44j4fkg6 0FdOGjTsW8atFNhHDiKy2nsJYAlYoZjJtCTMuBF8cQYMTGEeqIHEKtE7VXuAPUgvY6qi CaCg== 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=Fd57dXyQV6AT1R00nKnfUO2FzSbFjinw6VgrMLgEL4U=; b=FN5tByFqFDGOYfu3S8yuupQlOi3nsqBaYhLXY6YjBD1R0l81gnZTcy5nRC7sDPJN06 enMsm7I3nYgH8ju7GhjIwKtpeyUmqaRpWfiXGEieTObGdH79kFTp1I1W6HYNruPzAyti LpHPTvjCetpgo0od/YgPcu101LfAg9MIo1NTZZvwxBNyvGDifLaRQrf7hh4Pdy649gFM afwrKmBOribcRWW7x3EwbnODeZbjvg8SfEGq78Uzu5ltQ1A6XbDSDknkTEDM3pXcw4Wd G+TSw7UYokB56wW79z43T7mnv3sFOcFJG5lF9875N8Hy3N+u96chIlRrawbX/Fbg4GnH 1OLw== X-Gm-Message-State: AOAM5311Rwhn5s4WZUbStWtzo+HT2VUFKD72iSx0SJZ9LGvHQgohrncj ICz8KtNGwvUB4YM2Xaco3zqs2EA7STzd41Qn4P+/qg== X-Google-Smtp-Source: ABdhPJx2Dj8ZBn5LJr20YtASOMkaB5/FF5uBlxh3qrOWZxY/85TFkpoGkjMQO2tRs8zHEyKBHTjSfMNxle27WK7Yv2Q= X-Received: by 2002:a9d:5508:: with SMTP id l8mr15738536oth.233.1617461124762; Sat, 03 Apr 2021 07:45:24 -0700 (PDT) MIME-Version: 1.0 References: <20210403051325.683071-1-pcc@google.com> In-Reply-To: From: Marco Elver Date: Sat, 3 Apr 2021 16:45:13 +0200 Message-ID: Subject: Re: [PATCH] kfence: unpoison pool region before use To: Andrey Konovalov Cc: Peter Collingbourne , Dmitry Vyukov , Alexander Potapenko , Evgenii Stepanov , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: 1ruzaky3ysfkax8cpry5q8fd8pk83job X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 821BA80192C0 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf27; identity=mailfrom; envelope-from=""; helo=mail-ot1-f49.google.com; client-ip=209.85.210.49 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617461122-166053 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 Sat, 3 Apr 2021 at 16:05, Andrey Konovalov wrote: ... > Which kasan_byte_accessible() call fails? > > KASAN checks shouldn't be performed for KFENCE objects. We have a > number of is_kfence_address() checks in KASAN runtime, but maybe we're > missing some. Perhaps, we should even move those checks into the > high-level wrappers in include/linux/kasan.h. Moving them into include/linux/kasan.h seems unnecessary and an easy way to introduce unnecessary overhead. AFAIK, there should be no difference between having them in the high-level wrappers and the inner runtime functions. I think until we understand what is actually going on and could thoroughly justify, I'd be opposed to larger changes. The small patch here is innocent enough, but it'd still be good to understand. (FWIW, I believe the issue was encountered with SW_TAGS on a downstream kernel.)