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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2B09C433EF for ; Tue, 24 May 2022 02:22:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233262AbiEXCW4 (ORCPT ); Mon, 23 May 2022 22:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233271AbiEXCWz (ORCPT ); Mon, 23 May 2022 22:22:55 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5382F9969A; Mon, 23 May 2022 19:22:53 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4L6dJq1p1dz4xYY; Tue, 24 May 2022 12:22:50 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1653358972; bh=23gpOQQJ/fv8/qwDF68c85b3c418u/QJJTgIjBTIEYY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Vz/0zOkh11h32x1S+vJ0dfgu+9jJgWUJNHb0CchW47kngs0PqZLMKT7noGRBVFEwE 39XRrPncQJjqRDMGqzleHq0xMSJOoyAeGnmsgCeOWcevvawiwHUQL05alQKkjBDNr2 DB/mKxEjKdt3VtW72OKus9OFCAh+QQr5LPwIYflgraXq1NiXjFZ4CDkql2MlO6JRvj hRiWh8rPsSysHWoFNTliHIKLSaeZpQQyAa2uyOJAUJBlY2tJzgh6rRoTXwIKdFnXI1 IecCU3YpTi4TzIfXCuaGB4wpSGR4qMCnuiZT7O9cFV448cQc4aSLfUe5qPMy/fUyrP GpTB+KpFeXJlw== From: Michael Ellerman To: "Naveen N. Rao" , Stephen Rothwell Cc: Christophe Leroy , Linux Kernel Mailing List , Linux Next Mailing List , PowerPC Subject: Re: linux-next: changed messages in qemu boot In-Reply-To: <1653069342.3xtfot6wli.naveen@linux.ibm.com> References: <20220520233602.2738d87c@canb.auug.org.au> <1653069342.3xtfot6wli.naveen@linux.ibm.com> Date: Tue, 24 May 2022 12:22:45 +1000 Message-ID: <87czg3mzyi.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org "Naveen N. Rao" writes: > Stephen Rothwell wrote: >> Hi all, >> >> Today's linux-next bboot of the powerpc pseries_le_defconfig build >> produced these different kernel messages (diff from yesterday's tree): >> >> - ftrace: allocating 33658 entries in 13 pages >> - ftrace: allocated 13 pages with 3 groups >> + ftrace-powerpc: Address of ftrace_regs_caller out of range of kernel_toc. > > Thanks for the report. I think that is due to: > https://patchwork.ozlabs.org/project/linuxppc-dev/patch/bb6626e884acffe87b58736291df57db3deaa9b9.1652074503.git.christophe.leroy@csgroup.eu/ Yep, I bisected it there. I should really read my email before bisecting :) > The below diff fixes it for me: > > diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftrace.c > index 46c002a8388804..7418da705d43ac 100644 > --- a/arch/powerpc/kernel/trace/ftrace.c > +++ b/arch/powerpc/kernel/trace/ftrace.c > @@ -746,7 +746,7 @@ int __init ftrace_dyn_arch_init(void) > > reladdr = addr - kernel_toc_addr(); > > - if (reladdr >= SZ_2G || reladdr < -SZ_2G) { > + if (reladdr >= SZ_2G || reladdr < -_UL(SZ_2G)) { > pr_err("Address of %ps out of range of kernel_toc.\n", > (void *)addr); > return -1; I did: if (reladdr >= SZ_2G || reladdr < -(long)SZ_2G) { Which more closely matches what the old code did, and I think is more obvious? ie. we don't want to negate the unsigned value, we want a signed value, and then the negative of that. cheers