Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1250592rdb; Tue, 30 Jan 2024 12:27:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2efUcdj8BA+W+jLMrt+5Z6CQ1OCM/Gj5HXV4saqZgzjazfWTTeKozJ5Cq75DsFujDzj3m X-Received: by 2002:a05:6214:518b:b0:68c:5c7a:a014 with SMTP id kl11-20020a056214518b00b0068c5c7aa014mr3189262qvb.19.1706646473782; Tue, 30 Jan 2024 12:27:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706646473; cv=pass; d=google.com; s=arc-20160816; b=PBHr5qvYejRx4MI946iReKWd8KRB6mOgiZVJrzRgnhKMwsNEQmRwAG94snEd4m2oNE Ml8EYW9aTEpiNMtFiO42cl7YQyNUqs0dL0bNTrI/gSJPRginCkmcaGHq9WwN9N7fbYcB u+crzdwPMCQQHqVqvYplAt4r6F6j/cDBU3Lvf55kuklIw7VMgUq4ozOO/3Q6xXK++A9d C4WNV/Q4mW2m1m3pt65WCgMyfETARp7rGGOVCLX2vn+YfJRHoIfPUDuJVBXCLEVG6JPM mfZbOkn6uYsgnAYMHOp9wRLMAcOXytEXrB5vMFNWsJWwk5YAFvH1sBZltrfn58lmXe2Z s5sA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KF0eA11IhH1RKliosU16MNbkjO0cWVDLOUxDSxK6czs=; fh=a5e2IXf+nIjyDT7wDEnF+HIeWpKhMoDILCMpyNeM2r8=; b=Duv/Xq102/5VqkChiRw3Sb1wsJNz6yubq8MJ8NNR63G4WzzHbv80A3lJzEz4ObKU6y e71ZwQcMDAbFxMOurNLpVWFpen/bhFaTLJO1VaZUeG2wbd841FWXFDbmQ+Ma/DlTXWt3 fLTEFJquNG42Cj88idrpTC03bG5C3MTYop5FBBL002NOtzq4J/LcB82PgH7tiSpBpX5V GzVrtft0blYn8r51BzVgcRzH6mHhqsLfF6izo77Bft92NX4hf8gWkw9tbka8T1gImwO4 WuUrIbaGxPo82gJ8E1RQzBuRSLo4jqj38vno59OZqBPIqmODNnchkvFjvjibxTxCb3sb 4nrA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=BoHLiJty; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-45258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45258-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s22-20020a05622a1a9600b0042be31d6060si618068qtc.290.2024.01.30.12.27.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 12:27:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45258-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=@infradead.org header.s=bombadil.20210309 header.b=BoHLiJty; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-45258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45258-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 86A931C2446D for ; Tue, 30 Jan 2024 20:27:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F85224214; Tue, 30 Jan 2024 20:27:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="BoHLiJty" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DC2069E14; Tue, 30 Jan 2024 20:27:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706646465; cv=none; b=S8daBNY54S5iGyEsO9oAYRW5JmHIXaXkARr78zS6Tj48OyDVTf4lSHSnksWKKia+hpYWUrJjmMhFZGoCqCsZpUXtdD8omO3n9I/hB2pLObiF5NFu9pvNU7sC9BahV78iIqcp18Py9//nway3nBm0MpMMqmh9Fq89m05IBgiDYzo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706646465; c=relaxed/simple; bh=v83Ebp421YVrZ0ZYFAm4D7pXG8a0FdzvdpMpaihmQHg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KI9ZtxHTFVCC97LnLy/OlckBmpdUto9Nosoupqduofyn4No9kC2yAkOyn6WG/mip+aPamtlBqVf2Bj30xdakwn3qBl0RLALIMzOq+e+P0UGmEHwjI2IiiR4s0Dg71W/wUL7VRtdXHMdFvNT45vyYs3v7UPlRPiCswk5korYbHOI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=BoHLiJty; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description; bh=KF0eA11IhH1RKliosU16MNbkjO0cWVDLOUxDSxK6czs=; b=BoHLiJtytJma/rBq+XUDY19xyn +zF+XyExGa3ZC59LtZpu1AOY7JeLTUHTfaoFtNTpKyPQM8LZWN3aj0E4drJCn1rcgP5TJY9Dp3bbV E7BNaIT+n7KVtYzDm/rajfb48s1+yLIHsSG//4oEPyjOytYA1w25hMLzgWHAjGcH9oiyWFLo47hkU jyFj4D2GZFEU295kPldN+c6bQmq0B8lgWIzPYKa68D/cGSkjsZhVYRZ91vw/jTqO5mlBF6NxPB4Y1 sGYhSVCseNdKyh9IcN0/guh5Dxl0WxX0F+x+bnrwKGD9/5dHVyx19xESEUjhDtzSbZR86cO4c+M5Y EcBFtR7A==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUuhk-00000000Sqp-25pi; Tue, 30 Jan 2024 20:27:36 +0000 Date: Tue, 30 Jan 2024 12:27:36 -0800 From: Luis Chamberlain To: Marek Szyprowski Cc: Christophe Leroy , Chen-Yu Tsai , Michael Ellerman , Nicholas Piggin , Arnd Bergmann , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-modules@vger.kernel.org" Subject: Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time Message-ID: References: <7b5df1782e94a755b4a18733af44d17d8dd8b37b.1703149011.git.christophe.leroy@csgroup.eu> <20240130091626.GA3684878@google.com> <9e298fa7-a953-462a-96a4-56a1b4316a17@csgroup.eu> <30ddedc9-0829-4a99-9cb1-39190937981c@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <30ddedc9-0829-4a99-9cb1-39190937981c@samsung.com> Sender: Luis Chamberlain On Tue, Jan 30, 2024 at 06:48:11PM +0100, Marek Szyprowski wrote: > Dear All, > > On 30.01.2024 12:03, Christophe Leroy wrote: > > Le 30/01/2024 ? 10:16, Chen-Yu Tsai a ?crit?: > >> [Vous ne recevez pas souvent de courriers de wenst@chromium.org. D?couvrez pourquoi ceci est important ? https://aka.ms/LearnAboutSenderIdentification ] > >> > >> On Mon, Jan 29, 2024 at 12:09:50PM -0800, Luis Chamberlain wrote: > >>> On Thu, Dec 21, 2023 at 10:02:46AM +0100, Christophe Leroy wrote: > >>>> Declaring rodata_enabled and mark_rodata_ro() at all time > >>>> helps removing related #ifdefery in C files. > >>>> > >>>> Signed-off-by: Christophe Leroy > >>> Very nice cleanup, thanks!, applied and pushed > >>> > >>> Luis > >> On next-20240130, which has your modules-next branch, and thus this > >> series and the other "module: Use set_memory_rox()" series applied, > >> my kernel crashes in some very weird way. Reverting your branch > >> makes the crash go away. > >> > >> I thought I'd report it right away. Maybe you folks would know what's > >> happening here? This is on arm64. > > That's strange, it seems to bug in module_bug_finalize() which is > > _before_ calls to module_enable_ro() and such. > > > > Can you try to revert the 6 patches one by one to see which one > > introduces the problem ? > > > > In reality, only patch 677bfb9db8a3 really change things. Other ones are > > more on less only cleanup. > > I've also run into this issue with today's (20240130) linux-next on my > test farm. The issue is not fully reproducible, so it was a bit hard to > bisect it automatically. I've spent some time on manual testing and it > looks that reverting the following 2 commits on top of linux-next fixes > the problem: > > 65929884f868 ("modules: Remove #ifdef CONFIG_STRICT_MODULE_RWX around > rodata_enabled") > 677bfb9db8a3 ("module: Don't ignore errors from set_memory_XX()") > > This in fact means that commit 677bfb9db8a3 is responsible for this > regression, as 65929884f868 has to be reverted only because the latter > depends on it. Let me know what I can do to help debugging this issue. Thanks for the bisect, I've reset my tree to commit 3559ad395bf02 ("module: Change module_enable_{nx/x/ro}() to more explicit names") for now then, so to remove those commits. Luis