Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4375936pxb; Tue, 2 Mar 2021 13:37:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/Eh7Tw+LsVilL+w1CzkxLVde3y8j3wg7YETbAiqhWYHDaqW5IYnQ+2NfoOJxuXbLz6YIR X-Received: by 2002:a50:f113:: with SMTP id w19mr22260881edl.226.1614721063828; Tue, 02 Mar 2021 13:37:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614721063; cv=none; d=google.com; s=arc-20160816; b=rTwlktMgcGSZ2O+E07aRAi2C33sToQur/VjcHJODzdLLMWYYBxRqDrECk4v0DxkKUC whGXB0S0KDzz69zX2r0zv8VOqNmf5wjfMVC+BfEN12cvPEyjS4zthvdHODqB1aAi4pdf 1bQkG7xUopVwUWv6tVUvxllVJRzTqsGOxE1kpCKCKuYKuFq97zntWTltgmYKWFmmuYxD ZI/QXSGSz8pee4MoIguWh6pXAla6xlTnbkzHGrBDp1xjJW6d0Bwz4F3D94dJdZlx2DvN SnMbejWfdEmZZTG0BdboXY6hs3L1OvGD8JsBa2aO6RvvTbJkkZ4pD/AJr1yBRDapKG3B dS6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vwRL+zg0sY1QI/aDS9tQBo/9/k6q6jsJr21NnguWVBI=; b=XqnAoT1SZSVr83S8Lb5xPINLWVBh+o2ctePbhXUM3/jmUDR0DF8BvL0GblsfVAMdsN r8y+5ASeUH/n6JJ44Ew+5HnytLP/G43QS7Xj+xurY8DxVnEu3D9bHwSpIQQD9XYTYw4+ Wfv/xV33BdwyMPK4MWeZwdyJR726uyzFVUyF1U8AuRS6jgg/BSuvkx4PWRgvOg8Y1ID5 wKBYUfy2etsgKrEjlSKAbob4VOSBEkSidO/dvHKRGr5zFAe+UBQMrixIcFqUooryPMYH +r45asKRrEc3zGLmlJ/SXn171+GY4gmPkyZaO9qS7fIMXsaRDhpULtJkMZYsUeuvX19O okvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Gdg7LlV9; 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 cx17si13248959edb.495.2021.03.02.13.37.21; Tue, 02 Mar 2021 13:37:43 -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=Gdg7LlV9; 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 S1577710AbhCBJwJ (ORCPT + 99 others); Tue, 2 Mar 2021 04:52:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1838186AbhCBJbF (ORCPT ); Tue, 2 Mar 2021 04:31:05 -0500 Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 679D3C061788 for ; Tue, 2 Mar 2021 01:21:15 -0800 (PST) Received: by mail-qv1-xf2d.google.com with SMTP id r5so9510576qvv.9 for ; Tue, 02 Mar 2021 01:21:15 -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=vwRL+zg0sY1QI/aDS9tQBo/9/k6q6jsJr21NnguWVBI=; b=Gdg7LlV9KTMCHNPEerej0NoU4fufDpYllG9eP8gSI0Y59DAync1sFK8G8dRPBqhLcu n/Neic57sVkPsdrKtFEWL/DhdlMG8bIvqFPb/Oto0y7wA6Np/nFdBehh/7/2WYXiaW9/ PUWgCXdI893sti3BPKa0u3WEivJzBWOBz65gJ0cHl8Tqq/anY/kXvtaJXHeB/ONDKDDF tpfnKWPZV55J8diU/JQpIkQXORqbpEFuAd5qWqJJw0StaGBcrmHdOv/lI7AYDkYorFuM 3rP9xZ98HT3e3b1BVG+gRYRqxVBvHJAQfO9xHKnpx+YGSUudDn9U2OZaIyGaCusWpVZI vIbg== 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=vwRL+zg0sY1QI/aDS9tQBo/9/k6q6jsJr21NnguWVBI=; b=bqKVoP5sqBhdI6NDQO2wbIy2qXzdroJZA7xuHPjFPo4ILgH1e8iihNAp4fjUa3TvtN sYg2cI0nL8Z+2w5eoGl5KCVO4Tb+K9DnacUHuSH72YEHmDl/kW/HCuAXkO0aqPuKF26D i8sPuzvmzyFww6OyEP+NLCbkQDVVrwBcenzRd1yxwNQVUfReum6QomwWFB0Sh2djuFBz xbrO9WuAgpIhkkBllZK3DzwffXcbOuaW2eblPNcDN3WZWm2B0OUmicZtODYbVlZK9kKw u+sYaEMFxcVvjxpDl1KQyM9JH6zqRb2m5/vXF+HFkt4BG6PFyWZLEOQfmmyhA0v3czkL KiEw== X-Gm-Message-State: AOAM5323jxY3xBAC6rnowDb+L52fuw8zmoTdcoun2V7ci2Tk5zXlm3Xt WQYPxEOA56Am1d9r/cPO8zYrXaJQfNFhujVdxUUL5w== X-Received: by 2002:a0c:9a04:: with SMTP id p4mr2656029qvd.38.1614676874297; Tue, 02 Mar 2021 01:21:14 -0800 (PST) MIME-Version: 1.0 References: <51c397a23631d8bb2e2a6515c63440d88bf74afd.1614674144.git.christophe.leroy@csgroup.eu> In-Reply-To: From: Alexander Potapenko Date: Tue, 2 Mar 2021 10:21:02 +0100 Message-ID: Subject: Re: [RFC PATCH v1] powerpc: Enable KFENCE for PPC32 To: Christophe Leroy Cc: Marco Elver , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Dmitry Vyukov , LKML , linuxppc-dev@lists.ozlabs.org, kasan-dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > [ 14.998426] BUG: KFENCE: invalid read in finish_task_switch.isra.0+0x54/0x23c > [ 14.998426] > [ 15.007061] Invalid read at 0x(ptrval): > [ 15.010906] finish_task_switch.isra.0+0x54/0x23c > [ 15.015633] kunit_try_run_case+0x5c/0xd0 > [ 15.019682] kunit_generic_run_threadfn_adapter+0x24/0x30 > [ 15.025099] kthread+0x15c/0x174 > [ 15.028359] ret_from_kernel_thread+0x14/0x1c > [ 15.032747] > [ 15.034251] CPU: 0 PID: 111 Comm: kunit_try_catch Tainted: G B > 5.12.0-rc1-s3k-dev-01534-g4f14ae75edf0-dirty #4674 > [ 15.045811] ================================================================== > [ 15.053324] # test_invalid_access: EXPECTATION FAILED at mm/kfence/kfence_test.c:636 > [ 15.053324] Expected report_matches(&expect) to be true, but is false > [ 15.068359] not ok 21 - test_invalid_access The test expects the function name to be test_invalid_access, i. e. the first line should be "BUG: KFENCE: invalid read in test_invalid_access". The error reporting function unwinds the stack, skips a couple of "uninteresting" frames (https://elixir.bootlin.com/linux/v5.12-rc1/source/mm/kfence/report.c#L43) and uses the first "interesting" one frame to print the report header (https://elixir.bootlin.com/linux/v5.12-rc1/source/mm/kfence/report.c#L226). It's strange that test_invalid_access is missing altogether from the stack trace - is that expected? Can you try printing the whole stacktrace without skipping any frames to see if that function is there?