Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp105276lqp; Wed, 20 Mar 2024 15:18:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWSJLaoCgoA0T28vQf0a1iqIUsTlAVUrDF9A4c/AMexCnMTB2UbKy/ue+L6jEC9jIl/p5s6k6ZRSG7oDSZauYqjDhmVEfYXh5ioprnL6Q== X-Google-Smtp-Source: AGHT+IEuU2a/nCha2dE/P/MLlIjE2zJ143L+4wV5OEgkwTnn7Dnb1fVgi8u3q32RwkA8Si6hRS45 X-Received: by 2002:a50:aad2:0:b0:566:624a:9e3f with SMTP id r18-20020a50aad2000000b00566624a9e3fmr807431edc.3.1710973124293; Wed, 20 Mar 2024 15:18:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710973124; cv=pass; d=google.com; s=arc-20160816; b=H917IqqCfj+xxZez/nKRgx1DzD7NEOa/fGfkwySTSpmq01La7VozNpqcgvNybvdE1K z3Kgsk3AYdjazul4ToFGZ24WErvIuM/yjDKnpOoTKfbbWeI9M45bL4j7tjGlzFd+Rdbs JCT7ukTLHl0WrV/ON6abIhNW0PsFSgm9iJoAJ4bvBZMTeK43ks6kdp0yYXirwCv1Ii9V zBOkCUrlGrAvxzXaFJ/NNiFkVNfUBuIDucm1Tui/9s4c3obxqQPkTlZW4DZyF/gE+bD5 wKmuYc4Qj1ssX46Tr+eEGqK6f61/kyE6BcGXvg2gI7elblE7H47wK+ctcloR7dPBDkG8 3Z7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=KeocE86M7cxnIG2egIo+ph/Sy8YD4j7ADzzQLHu2U8M=; fh=j2rJteRASkXJwYV9pvSK/hc6+98aV0kkaD5RwcoWBlM=; b=LP1oFF3RUZJ+cQ0J1vnbTGVsUfOa07lte5ACLgHzFyGkr47voGBw8Xt5GFaWx9zbr7 yANkAj8ogR4WTmHY+mLjTqlmBDmG+2Ldg8JraJu3WWo3cjDjCM4cpwzuE41y1apRHONp It39bVo6HMz0VXZBbcp0e12q2iR/4lxO6keXQgG/P5fHBT2jx4vqvTmtlQpOtlCA32qR aAxdoShKOP4ax2sNt4kFjBZY7tXN62jT35Bk5RTuWyu+I4bnm2Jm0etUl+f1P+myCVwv tJnQWwBUCvqXeVnybDAC6xf1ke0QEpFQJSSXycgogRjflXf1ShGIys8nPozhblLdSMCY Az9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=pnJUoYR4; arc=pass (i=1 spf=pass spfdomain=amazon.co.jp dkim=pass dkdomain=amazon.com dmarc=pass fromdomain=amazon.com); spf=pass (google.com: domain of linux-kernel+bounces-109453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109453-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fe12-20020a056402390c00b00568b5ce1579si5402422edb.120.2024.03.20.15.18.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 15:18:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=pnJUoYR4; arc=pass (i=1 spf=pass spfdomain=amazon.co.jp dkim=pass dkdomain=amazon.com dmarc=pass fromdomain=amazon.com); spf=pass (google.com: domain of linux-kernel+bounces-109453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109453-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 066341F22847 for ; Wed, 20 Mar 2024 22:18:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3ADCC86122; Wed, 20 Mar 2024 22:18:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="pnJUoYR4" Received: from smtp-fw-80006.amazon.com (smtp-fw-80006.amazon.com [99.78.197.217]) (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 CD68F52F78; Wed, 20 Mar 2024 22:18:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=99.78.197.217 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710973113; cv=none; b=Vf3uXsGSylCUxN9vUSmwHlGGkaMwCR6qezRlxEIZ9V2p1IzfSR0FBV/5OlQ/0M0po++w4K+AgERnTsEIaOgGqBA4f7AchJuylNgsysMmh9uxEjD/mPEKQovmwecXgfPI6tUXDshm/KPsejvRHekdF6OFzUeqBYY1uj3l6ziOiY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710973113; c=relaxed/simple; bh=6RCHskeT2RU1mpvpXM4MlikboPygYC9zP58QNF0vw+o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TKU3nUO5MA3W+oCjAyLdFC5oz/yaSNyy2VRKCEE6tzKV8GStOybmaGzS/d+YfGnUOc8r+190CFFoPqfv0vEqfmKETzI7PQ1K65ffxvqbHD5nqbdkUhV7sjb1Ndg3jLvoG4gzbcYBBX9rnhxrhabJJ2P0WO249DBfUFtJqJ0dyBM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.co.jp; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b=pnJUoYR4; arc=none smtp.client-ip=99.78.197.217 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.co.jp DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1710973112; x=1742509112; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KeocE86M7cxnIG2egIo+ph/Sy8YD4j7ADzzQLHu2U8M=; b=pnJUoYR4/ZlGLU8VhaNNZ90uaaR5JVQfKspAaOG7LgnxeyDDLULqx0kZ pIX6CDWU4hDw7RT6npfY3aHw/DjZ9Gl+430Pc9TzUtnlWyj2pkQ1kOKbr xZvw015XT2NBXQhcr31IuirdDP6R1gZCJCl28QUyhF5oQFeWe7Jka+H0O 8=; X-IronPort-AV: E=Sophos;i="6.07,141,1708387200"; d="scan'208";a="281588042" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.25.36.214]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 22:18:29 +0000 Received: from EX19MTAUWC002.ant.amazon.com [10.0.38.20:55675] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.9.15:2525] with esmtp (Farcaster) id 5d501bbe-28c3-4f65-9498-0173a723cae1; Wed, 20 Mar 2024 22:18:28 +0000 (UTC) X-Farcaster-Flow-ID: 5d501bbe-28c3-4f65-9498-0173a723cae1 Received: from EX19D004ANA001.ant.amazon.com (10.37.240.138) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 20 Mar 2024 22:18:28 +0000 Received: from 88665a182662.ant.amazon.com.com (10.88.162.81) by EX19D004ANA001.ant.amazon.com (10.37.240.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 20 Mar 2024 22:18:26 +0000 From: Kuniyuki Iwashima To: CC: , , , , , , , Kuniyuki Iwashima Subject: Re: [PATCH] ipv6: delay procfs initialization after the ipv6 structs are ready Date: Wed, 20 Mar 2024 15:18:13 -0700 Message-ID: <20240320221813.11611-1-kuniyu@amazon.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240320171858.2671-1-nicolas.cavallari@green-communications.fr> References: <20240320171858.2671-1-nicolas.cavallari@green-communications.fr> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EX19D038UWC002.ant.amazon.com (10.13.139.238) To EX19D004ANA001.ant.amazon.com (10.37.240.138) From: Nicolas Cavallari Date: Wed, 20 Mar 2024 18:17:36 +0100 > procfs files are created before the structure they reference are > initialized. For example, if6_proc_init() creates procfs files that > access structures initialized by addrconf_init(). > > If ipv6 is compiled as a module and a program manages to open an ipv6 > procfs file during the loading of the module, it can oops the kernel. > > It appears that we were unlucky enough to reproduce this problem > multiple times already, out of maybe 100 boots: > > NET: Registered PF_INET6 protocol family > 8<--- cut here --- > pwm-backlight backlight: supply power not found, using dummy regulator > Segment Routing with IPv6 > In-situ OAM (IOAM) with IPv6 > Unable to handle kernel NULL pointer dereference at virtual address > 00000000 > mt7915e 0000:03:00.0 wlp3s0: renamed from wlan0 > [00000000] *pgd=00000000 > Internal error: Oops: 5 [#1] SMP ARM > Modules linked in: ipv6 mt7915e mt76_connac_lib mt76 dw_hdmi_imx > mac80211 dw_hdmi drm_display_helper imxdrm drm_dma_helper > drm_kms_helper snd_soc_imx_sgtl5000 syscopyarea sysfillrect sysimgblt > fb_sys_fops imx_ipu_v3 snd_soc_fsl_asoc_card cfg80211 snd_soc_sgtl5000 > drm libarc4 snd_soc_fsl_ssi snd_soc_simple_card_utils imx_pcm_dma > snd_soc_core rfkill snd_pcm_dmaengine snd_pcm > drm_panel_orientation_quirks cfbfillrect cfbimgblt cfbcopyarea > snd_timer snd egalax_ts snd_soc_imx_audmux soundcore flexcan mux_mmio > imx2_wdt mux_core can_dev pwm_bl > CPU: 2 PID: 850 Comm: snmpd Not tainted 6.1.14 #1 > Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) > PC is at if6_seq_start+0x2c/0x98 [ipv6] > LR is at init_net+0x0/0xc00 > [...] > if6_seq_start [ipv6] from seq_read_iter+0xb4/0x510 > seq_read_iter from seq_read+0x80/0xac > seq_read from proc_reg_read+0xac/0x100 > proc_reg_read from vfs_read+0xb0/0x284 > vfs_read from ksys_read+0x64/0xec > ksys_read from ret_fast_syscall+0x0/0x54 > Exception stack(0xf0e31fa8 to 0xf0e31ff0) > 1fa0: b67fd0b0 be8a666b 0000000a b67fd148 00000400 > 00000000 > 1fc0: b67fd0b0 be8a666b 00000001 00000003 be8a67ec 00000000 b6d7e000 > b6c9954a > 1fe0: b6d7eb30 be8a6638 b6ef11b4 b6ef0ddc > Code: e5931004 e35100ff ca000014 e59e25dc (e7920101) > ---[ end trace 0000000000000000 ]--- > > Signed-off-by: Nicolas Cavallari Reviewed-by: Kuniyuki Iwashima