Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5744206rwp; Mon, 17 Jul 2023 08:50:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlGZ+Yrpm0l2r6GRvEmMJcLdweefbCBvhrIXmcMpCFYIsnT+bnK1hIAubLXDHJlMn2/q5iUp X-Received: by 2002:a05:6402:1b0e:b0:51e:57e7:3f0c with SMTP id by14-20020a0564021b0e00b0051e57e73f0cmr13049301edb.13.1689609036794; Mon, 17 Jul 2023 08:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689609036; cv=none; d=google.com; s=arc-20160816; b=TK1O9+sSfHq0Dj1hvV91jMRArj5B1G8UWLae0YZNm7+4wn4ksJJ1sqxQdE80MdD5xB enea+bHY56Ar4ujpiIWh6XRPhHS6S93NmXb+92oB2lK2o5Ewm/2VB45KhUlMHtzC0e4C MXIWGxdCwRU8xE6n5W7HBww9HMSUGHgJFo2J+DyxAWUH6phr7MTbgWcY+g8v7C3wcXov Q1AkydRC9AokYm8PGu9ZQmzvy1NwNSr0EJuwejTas85vzHZdzwM86aVD2aMbDEweq4i4 2XcdPxAJEfGL7ukL7LED4DZMOPUv8eD/ddwb4gdSrW84ixAwt/5+6DXyDxTYIgaJJ7N0 QKpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=GEoHakGirE52hZaRg2jEOdizb7f5m4jLZm/9/42+4sc=; fh=QBaw3OmnTRHp1nlSMF10+OgC+CPrgZr4bnD2osFX91c=; b=Ujzwd2q8rJufFRArDpZtN4Cw6dtvR2qru9Cu91Pzw0cxSZcVH90eo4BSxpZv3UtLqY na0XX+hmbQAM3HCHlm8tNzOyIxxg1rZMhb56hpBGzZrSfxerMqcALDPKQiAKqTaalyON 9qb7R3l8m1eOkXQq+TVqRKHgVFl2p9CzeN8PvnBy7+ds7OG2yQfzLfqpgGZwQvDilgUE dpTHNrHzg5QjN1TUbyM+i4iSC+Z8pV6BER4nHcg2oCLXElK4ji1rW8PR2hLOFs0FQFxM NvzibC/adNrYPaE+rptqMdmLhqmv/GOXHc7XJuMevH619VvvmYk40gDOELB7TqdGhSYK e6hg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay1-20020a056402202100b0051e067727b7si13770516edb.135.2023.07.17.08.50.11; Mon, 17 Jul 2023 08:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229525AbjGQPgg (ORCPT + 99 others); Mon, 17 Jul 2023 11:36:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbjGQPgc (ORCPT ); Mon, 17 Jul 2023 11:36:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 841878F for ; Mon, 17 Jul 2023 08:36:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1874D61134 for ; Mon, 17 Jul 2023 15:36:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28395C433C8; Mon, 17 Jul 2023 15:36:25 +0000 (UTC) Date: Mon, 17 Jul 2023 11:36:23 -0400 From: Steven Rostedt To: Cc: regressions@lists.linux.dev, bagasdotme@gmail.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org Subject: Re: radeon.ko/i586: BUG: kernel NULL pointer dereference, address:00000004 Message-ID: <20230717113623.41878887@gandalf.local.home> In-Reply-To: <230714143404.M0123570@vega.pgw.jp> References: <55a3bbb1-5b3c-f454-b529-8ee9944cc67c@leemhuis.info> <230714143404.M0123570@vega.pgw.jp> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 14 Jul 2023 14:34:04 +0900 wrote: > Patch in > https://bugzilla.kernel.org/show_bug.cgi?id=217669#c4 > fixed the problem in freedesktop.org kernel 5.18.0-rc2 . > This may explain that in kernel.org tree, the said commit is in kernel-5.19. You mean the patch that adds: #if defined(FTRACE_MCOUNT_MAX_OFFSET) && (FTRACE_MCOUNT_MAX_OFFSET) ? Nothing should be setting FTRACE_MCOUNT_MAX_OFFSET to anything but non zero. But doing a grep, I now see: # define FTRACE_MCOUNT_MAX_OFFSET ENDBR_INSN_SIZE Where it breaks that assumption if ENDBR_INSN_SIZE == 0 :-p (and that's my code!) OK, does this fix it? (I haven't tested nor compiled this) -- Steve diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h index 897cf02c20b1..801f4414da3e 100644 --- a/arch/x86/include/asm/ftrace.h +++ b/arch/x86/include/asm/ftrace.h @@ -13,7 +13,7 @@ #ifdef CONFIG_HAVE_FENTRY # include /* Add offset for endbr64 if IBT enabled */ -# define FTRACE_MCOUNT_MAX_OFFSET ENDBR_INSN_SIZE +# define FTRACE_MCOUNT_MAX_OFFSET (ENDBR_INSN_SIZE + MCOUNT_INSN_SIZE) #endif #ifdef CONFIG_DYNAMIC_FTRACE