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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 956D6C433EF for ; Mon, 18 Jul 2022 14:27:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D76BF6B0072; Mon, 18 Jul 2022 10:27:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CFFDE6B0073; Mon, 18 Jul 2022 10:27:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B9FEE6B0074; Mon, 18 Jul 2022 10:27:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A5F696B0072 for ; Mon, 18 Jul 2022 10:27:02 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 7B83F120345 for ; Mon, 18 Jul 2022 14:27:02 +0000 (UTC) X-FDA: 79700447484.24.7075834 Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) by imf27.hostedemail.com (Postfix) with ESMTP id 21EE940090 for ; Mon, 18 Jul 2022 14:27:01 +0000 (UTC) Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-31e0d4ad6caso48396137b3.10 for ; Mon, 18 Jul 2022 07:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Mtj0EAXN9U90VAEHDyJp+h4NOUaHKEG8aPk/GVml+8g=; b=sdl0ANPhWcYPKRHeSiX1ABKy52Q5uvPDzWi8yihz91FuiqXXxpmBjVZ9WIUQy6cTHc SVeSJDUI7mE0oz1+jwRcPlb5SNGDfV6W12sAtvt7t07e1nVG0CA7y1C5GJrYMdhOiTXQ zZ94pG2BXNmmp3guQGPtbHGYaGZ6xiPeBWVZacMwDedrGf1lyWCFPkaki4fyOdCWuWhf Hjw6S8dfyMpJeJXQ9A8p+Cuk9qR3a3Sjxx3KSzyTuA9O7XbyBemHwAdQGk8SOEsoT7LK xd9g/XFSsdVj9oXrndkCoI96eLOyfjql8zI7+HdJ0er6oSeib3d2Gdn1G5gJfE3uIFFq Zqug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Mtj0EAXN9U90VAEHDyJp+h4NOUaHKEG8aPk/GVml+8g=; b=6rNCn1d7Hah05uij+C7vIdfOushMXaIKNqj57TJDcOKZjt/X49JLL/l1tpkV7lwhSm AsIMMgD47Ln9V5Bb9G4D0EsL9rc/hutS0rfufBN0ve29PrAC00gMWbC9XzTrJUeNjPCH Q/ApTBg3F5jorPiBYDKMZk+gMlQTu25B7v0v5et5VTzMmX9bF8QAdHMN87XN/t14rgoy vj/Rxz4lVldvt5iNKkXU8HgqFnGNha2YKT3OxCn5vrwiwPy+bGvlLQ1eYsIFL0J3zMfh 9IDPyS3NtuoF/7VAImklBou5il87kabiXPY3pAP0Ugjg2/S1Wz0Pw6t8brU8S0q9BIfi af0Q== X-Gm-Message-State: AJIora8/86DOls0dGd3Dc/kQlNPrSwSJnyX495rtqu5cyCBR8vaLIy/a YdnvOq0vzbCneIp5RFmZJxcxNHT/CpjKUbG/YRraZQ== X-Google-Smtp-Source: AGRyM1s20EyQDEGyRPBZ7Wv7r8r/+XMLmzdGIFx3v1owTss4vMR1A0bYTVN4giqCYWmMweRoaJzVLm5YlcC2vG/Heo0= X-Received: by 2002:a81:5a0a:0:b0:31d:ad7c:8fa5 with SMTP id o10-20020a815a0a000000b0031dad7c8fa5mr30075011ywb.512.1658154421240; Mon, 18 Jul 2022 07:27:01 -0700 (PDT) MIME-Version: 1.0 References: <20220628113714.7792-1-yee.lee@mediatek.com> <20220628113714.7792-2-yee.lee@mediatek.com> <20220715163305.e70c8542d5e7d96c5fd87185@linux-foundation.org> In-Reply-To: From: Marco Elver Date: Mon, 18 Jul 2022 16:26:25 +0200 Message-ID: Subject: Re: [PATCH v2 1/1] mm: kfence: apply kmemleak_ignore_phys on early allocated pool To: Geert Uytterhoeven Cc: Andrew Morton , yee.lee@mediatek.com, Linux Kernel Mailing List , Catalin Marinas , Alexander Potapenko , Dmitry Vyukov , Matthias Brugger , "open list:KFENCE" , "open list:MEMORY MANAGEMENT" , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658154422; a=rsa-sha256; cv=none; b=2MqDBzFpBr1usHemFMG6OLf3eNd+R7luOg3xBFupdWWSE0/JSkmIK2w4MwO+NTVorvP3ZF ErBvLXbv82CY13BIjuNaF34ODFm/P/OW3/hL/1zlBL0V/N11orWbOmxnDd/Ce1/Pm0lxLm s1BqA+bQfMlS/60U6XI9sVeDmKmg8jY= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=sdl0ANPh; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf27.hostedemail.com: domain of elver@google.com designates 209.85.128.176 as permitted sender) smtp.mailfrom=elver@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658154422; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Mtj0EAXN9U90VAEHDyJp+h4NOUaHKEG8aPk/GVml+8g=; b=nHruyeY00MMfOAzDYkVMEyl8r/IuxjtmXu4bG9p41Repie3sfQOnbjgCDdeonl3pqCMz1M huBm+Vu83NsvksvSu0RlOe3ENfyDNF9JCCrVY0eLNmBOQqdmDiEdCu2Qipjes6dHmNGMk6 TM65EeauKZhv7KZn7Sse4NIsBXm4LaQ= X-Rspam-User: Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=sdl0ANPh; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf27.hostedemail.com: domain of elver@google.com designates 209.85.128.176 as permitted sender) smtp.mailfrom=elver@google.com X-Rspamd-Queue-Id: 21EE940090 X-Rspamd-Server: rspam12 X-Stat-Signature: bjewmxngm1p5f7o6j5hz69pho9mbnd34 X-HE-Tag: 1658154421-794144 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, 16 Jul 2022 at 20:43, Geert Uytterhoeven wrote: [...] > > - This patch has been accused of crashing the kernel: > > > > https://lkml.kernel.org/r/YsFeUHkrFTQ7T51Q@xsang-OptiPlex-9020 > > > > Do we think that report is bogus? > > I think all of this is highly architecture-specific... The report can be reproduced on i386 with CONFIG_X86_PAE=y. But e.g. mm/memblock.c:memblock_free() is also guilty of using __pa() on previously memblock_alloc()'d addresses. Looking at the phys addr before memblock_alloc() does virt_to_phys(), the result of __pa() looks correct even on PAE, at least for the purpose of passing it on to kmemleak(). So I don't know what that BUG_ON(slow_virt_to_phys() != phys_addr) is supposed to tell us here. Ideas?