Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp763376lqs; Fri, 14 Jun 2024 05:15:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmnuad+ggg86NjbpPoKP20atunYkfI+i7/g739bQGIq+RLmwieCJ52hI42/wpseSm3x+mmd2pPyZnVtATAZSg0iMjWnO8idBeFFZIguA== X-Google-Smtp-Source: AGHT+IFbuXcJsMSPlP2fBcQaYI5XWe2KzdQeBmvR8sbKBFAzr06YV3k4QPbRmlif4ccMOkV5t3e2 X-Received: by 2002:a05:622a:14ca:b0:441:37b:cd6c with SMTP id d75a77b69052e-442168b7319mr20430231cf.25.1718367310276; Fri, 14 Jun 2024 05:15:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718367310; cv=pass; d=google.com; s=arc-20160816; b=dD/NqdTbS7kIiTEV3tqqKnPXDU6EBTt+BPSHIwNmVX5Wun1dwVHuR4xIEJrRDMaUvI a5U1LgNqSDz5K9QWJFGJZ3LZ5kBCgSaicIj85KZit827V/JjlLXGQI7AiLquCkhgOXqI Bp5ToQQOMipDKeRx5rsCbc3Y1yiAPFtBf3nB7dh9I9T/G2TUVp7+jpj2j7mspRS3Uf7Z kQYN3pKfSb8AkFRMk0cXH7SyRk6wBvbh+CMzvL/uC3hziMJ5h1JldZz2stmZC7r8OlB0 S6JJ9jEzeVOzNjtuxqJmlGBhgpT1PFANrli0a8wUwALqRApGg+ODcYq9KavkLA/oBBDK Jwtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=LX4EUljvFqSnOBU+TT5aydICyOEMY1+G4VpnprRU4mo=; fh=ELbslxhAgXxiufDcP3vY6hiJIUBrMy76XRS3ZkH8ZmQ=; b=oHzA9sleLoql/PSLfN7eiqMOAQ2zlDVV0kIcM8pbY89FgQtBkSqMRVDO5IrqK3bM31 58Qg6QTYdMmM8hpcxKzTvdsP7wrJvtKa8b7Yjrj+TAPGbjtf2ycfFpsru+9jVtIyuq7H GAaV/s197p3R4FWkd3ADbQR/RpgnDZc8GxFGtA7SruLdDT9j7P0UerbuSddbXgYOWHdN +dtuKqDkV0N9AU4UODpkRnXLO7INoD/NBQXb5Z/0dnN8EiR+v+yTO/0eOCljTn9Uyk7S ttemnMkrDaRcDoWlPry+sIZGxbrGAi+Eg6uF0q8OJ1wylNmIwlgUrNg4Pi9Uhb/veS0+ dt8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ixvY7Wjv; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-214874-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214874-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-441f2ea8a69si37056321cf.253.2024.06.14.05.15.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 05:15:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214874-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ixvY7Wjv; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-214874-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214874-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 012131C24A73 for ; Fri, 14 Jun 2024 12:15:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09CC27E574; Fri, 14 Jun 2024 12:15:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ixvY7Wjv" Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9570F196C8C; Fri, 14 Jun 2024 12:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718367305; cv=none; b=piFCv3DIF3Sx7mKBz+SFxCY9ccex1iQAwxmUhsGW/Slz1NW2eZC45OdKdH42zLKLyB383vyx7uvYbzs/ompmPXcBDO2ZT0zi3+u4J+kwPas5fNcx3LubKVjoNt9Fw4EXjOE6pBvlvFNtT/StVhaSzA1VinBD4NaJ2OF+3sOeayk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718367305; c=relaxed/simple; bh=bT5WI50G/xe0b9CL3tlQRNjDOMccYX8o9ugjNQ5PcwE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=mrjXGUTZBY5Hq9RT2lwjIcMoyCPjoCdkte/FJ+cUlekIfoA35yTKxQn3Ond6wYIyNcEszbebWQLtQeVXRRoPHLF2ToDKKrAfR9P7yrEk+yHblGxdCg/+qF7YYUtUEzkjPHk2heDowBQxCs1tev4mh4Z3NL3PhJaQMiNB0HFryOE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ixvY7Wjv; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-52bc3130ae6so2353090e87.3; Fri, 14 Jun 2024 05:15:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718367302; x=1718972102; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LX4EUljvFqSnOBU+TT5aydICyOEMY1+G4VpnprRU4mo=; b=ixvY7Wjvo+JRCsKZOekovmhZCFjorh12H2mKuVGDlOBio0InJbF+hykfRY/hMUXHUO 6FJ0At5misQLneZuFXGePgtXViKKJ8vgd3RSclYl2/DttTTOLDDvHmG+qNsY7VGZi3fh l8h86QimKV72zSFFf7EGlvWDdTIXJs9SbeXseVQ8/U8asAc388y1b6XzBBtLHpLOgMjD tRakEpCFjwe28BZUTVs9CwTnxRM2G269tWY8mrvs11196b4JNHrnfvlbGaC08zmwFGOo C+J5ptNEeJdnFsvRgQIniYHAWzTMcqtIRhiv94rUGfXFDXCa5xMqnXdW/Hbe9vY2dQdo ICWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718367302; x=1718972102; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LX4EUljvFqSnOBU+TT5aydICyOEMY1+G4VpnprRU4mo=; b=DcyYNNF9fSL9EdJQUt0yYgB9itR4iECzQ8DkqYu/sSkuWvssothuMSG9rL11JZEawX S5ZoevPtmQmz8oiD13p5EqUMRQUUSl7V8qZZb7QMx7sInopj2LJ6FJ1F8MKjqbpGcRil A0JvWntJZzTxp/0KJjHBanu/MggqBmYyVaNCMWhxR//LNSJVg1IFhO1963HqzgWIyBSu aBFdQc1NNAe2K6fHmyXLl+ZeBHqARrMN+Ir8MZKcePcmv/R+NUu/Ovhk9iRCYKK9/NcD 1FRVCfBxp8BSBsyxqgItSpwnmuNbKEkJapFnddr4aHMGP2AiOgIcJRmO3KEjySNtU6Er PD/w== X-Forwarded-Encrypted: i=1; AJvYcCWKXz5mWFh/PYN4dnycE80RHyeniqE/7T+5HiNalSiTfP08KmuboMoys1/mYdl0+L0jEwZJfUotM8dY7hHZnGEwSvjzptnV0qG7wWyowedY X-Gm-Message-State: AOJu0Yx9NuaXdGZLDiX5LVce/X8ExUJHBYdym3rtVHdvEw6NbEU/Pnwd KJtw5NC52UGxGGgV950YUOKv6Wtsp2Esm++Y3ZlzLrDHu/TuZYpp8Y0HGi4IzVI9Ul358A+35by 6U72e0PkqZXBZYzyKpp7NSjqltfo= X-Received: by 2002:ac2:4181:0:b0:516:d219:3779 with SMTP id 2adb3069b0e04-52ca6e99397mr1518697e87.58.1718367301474; Fri, 14 Jun 2024 05:15:01 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Puranjay Mohan Date: Fri, 14 Jun 2024 14:14:50 +0200 Message-ID: Subject: Re: selftests: ftrace: WARNING: at arch/arm64/kernel/stacktrace.c:112 arch_stack_walk To: Naresh Kamboju Cc: open list , Linux ARM , lkft-triage@lists.linaro.org, Linux Regressions , "open list:KERNEL SELFTEST FRAMEWORK" , Catalin Marinas , Nianyao Tang , Mark Rutland , Stephen Boyd , Puranjay Mohan , James Morse , Will Deacon , Arnd Bergmann , Dan Carpenter , Anders Roxell , Steven Rostedt , Masami Hiramatsu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Naresh, Thanks for finding this. On Thu, Jun 13, 2024 at 3:16=E2=80=AFPM Naresh Kamboju wrote: > > The following kernel warning noticed on arm64 qemu-arm64 and rk3399-rock-= pi-4 > device while running selftests ftrace tests on Linux next-20240613. > > This is always reproducible on qemu-arm64 and rock-pi-4 device with > kselftest merge configs > > Reported-by: Linux Kernel Functional Testing > > Test log: > ------- > kselftest: Running tests in ftrace > TAP version 13 > 1..1 > # timeout set to 0 > # selftests: ftrace: ftracetest-ktap > # unlink: cannot unlink > '/opt/kselftests/default-in-kernel/ftrace/logs/latest': No such file > or directory > # TAP version 13 > # 1..141 > # ok 1 Basic trace file check > <4>[ 96.183553] ------------[ cut here ]------------ > <4>[ 96.187100] WARNING: CPU: 1 PID: 538 at > arch/arm64/kernel/stacktrace.c:112 arch_stack_walk 29c1c24a2707 ("function_graph: Fix up ftrace_graph_ret_addr()") made the ftrace_graph_ret_addr() use the 'idx' pointer to optimise the stack unwinding but arm64, riscv, and some other architectures pass `NULL` for this parameter. The fix for this is to pass a valid pointer to ftrace_graph_ret_addr() like x86_64 is doing. I will send a patch to fix this unless someone else has already sent one. Thanks, Puranjay