From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2C534D81195 for ; Thu, 10 Oct 2024 07:02:18 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=EEXo3I19K1ZR1QD4KCiMjcUcesiNQ2GGRBYbKadUgno=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:To:Cc:From:Subject:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240830; t=1728543738; v=1; x=1728802937; b=L/DCwzSkEcHCoy3RLc+xqt5WxxbEfA1A4s8zNlfTHe4d45xUN3f2L83d/YhJJAyX23oJEDc1 TmCIjXKogiYxETn5x+af3DuHibWzGvXm4px2KAFIf2ybNh1itEeqWadV7jDuh14jjaFUfffvyhM Bc8SIEk+/ma97xrY/en9N+miMtP5nxPgWX/2/oGB2rZGmMzlLlMzcE4lLFKTrdmCwY++azhYr23 7lMnMYYGOE3zAaxgHIy/sebmopKuZVHvq13F4P5Y6jdihaoDSlYvGKoXEi1hfQV0jNlglHPsn+A J3EcAxD4RhE7P13Bsh3rsmfipjajXuu2Lp3ErUk84PTjw== X-Received: by 127.0.0.2 with SMTP id kGnSYY7687511xakIAXtAHnz; Thu, 10 Oct 2024 00:02:17 -0700 X-Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by mx.groups.io with SMTP id smtpd.web10.19799.1728487786827028857 for ; Wed, 09 Oct 2024 08:29:47 -0700 X-Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5c46c2bf490so3983830a12.3 for ; Wed, 09 Oct 2024 08:29:46 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUsIXUq7eVLFBLNgsodj4GbHfd4CXj0QrKK5fExm2/uz052vwxWYHSxYVX3gYHX2f1a1Mg/JA==@edk2.groups.io X-Gm-Message-State: Xg8zj34nQeguUdfJyZjHpAyLx7686176AA= X-Google-Smtp-Source: AGHT+IGyQgt2jTtrAqGbCO4hFzkgwlKKqoxUk2fEUsykuESdSEgYPpjl212JJJ/+9IounoHx59SLSg== X-Received: by 2002:a05:6402:c43:b0:5c8:8290:47bf with SMTP id 4fb4d7f45d1cf-5c91d5b3771mr2861298a12.21.1728487784764; Wed, 09 Oct 2024 08:29:44 -0700 (PDT) X-Received: from ?IPV6:2a03:83e0:1126:4:eb:d0d0:c7fd:c82c? ([2620:10d:c092:500::7:10fe]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c914d785b8sm1543634a12.30.2024.10.09.08.29.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2024 08:29:44 -0700 (PDT) Message-ID: Date: Wed, 9 Oct 2024 16:29:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: linux-integrity@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, devel@edk2.groups.io, linux-efi@vger.kernel.org Cc: Breno Leitao , noodles@earth.li, Gregory Price , peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca, arnd@arndb.de, Ard Biesheuvel , tweek@google.com, leendert@watson.ibm.com, kjhall@us.ibm.com From: Usama Arif Subject: [edk2-devel] Possible overflow of TPM log Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 10 Oct 2024 00:02:17 -0700 Resent-From: usamaarif642@gmail.com Reply-To: devel@edk2.groups.io,usamaarif642@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b="L/DCwzSk"; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) Hi, We (meta) are seeing the below warning in production machines for all kerne= ls from 5.12 to 6.11 during boot which results in tpm probe failing: [ 6.388599] ------------[ cut here ]------------ = = = = =20 [ 6.397804] memremap attempted on mixed range 0x000000005f54e018 size: 0= x23ba3cfb = = = =20 [ 6.412733] WARNING: CPU: 2 PID: 1 at kernel/iomem.c:82 memremap+0x58/0x= 1b0 = = = =20 [ 6.426621] Modules linked in: = = = = =20 [ 6.432705] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 6.4.3-0_fbk12_2624= _g7d95a0297d81 #1 = = = =20 [ 6.449020] Hardware name: Quanta Twin Lakes MP/Twin Lakes Passive MP, B= IOS F09_3A23 12/08/2020 = = = =20 [ 6.466377] RIP: 0010:memremap+0x58/0x1b0 = = = = =20 [ 6.474369] Code: 41 89 c4 83 f8 02 75 26 80 3d fc 33 66 01 00 75 57 c6 = 05 f3 33 66 01 01 48 89 e6 48 c7 c7 3b 98 34 82 4c 89 f2 e8 38 96 bc ff <0f= > 0b eb 3a 41 f6 c7 01 75 04 31 db eb 13 45 85 e4 74 69 48 89 ef = = =20 [ 6.511837] RSP: 0000:ffffc900000378f8 EFLAGS: 00010286 = = = = =20 [ 6.522258] RAX: 0000000000000045 RBX: 0000000000000000 RCX: ffffffff82c= 5fdb8 = = = =20 [ 6.536490] RDX: 0000000000000000 RSI: c0000000fffeffff RDI: 00000000000= 0ffff = = = =20 [ 6.550723] RBP: 000000005f54e018 R08: ffffffff82de0190 R09: 00000000000= 00000 = = = =20 [ 6.564956] R10: ffffffff82c5fde0 R11: 3fffffffffffffff R12: 00000000000= 00002 = = = =20 [ 6.579187] R13: 0000000000000000 R14: 0000000023ba3cfb R15: 00000000000= 00001 = = = =20 [ 6.593421] FS: 0000000000000000(0000) GS:ffff88903f880000(0000) knlGS:= 0000000000000000 = = = =20 [ 6.609559] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 = = = = =20 [ 6.621026] CR2: 0000000000000000 CR3: 0000000062c0a001 CR4: 00000000007= 706e0 = = = =20 [ 6.635257] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 00000000000= 00000 = = = =20 [ 6.649489] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 00000000000= 00400 = = = =20 [ 6.663724] PKRU: 55555554 = = = = =20 [ 6.669115] Call Trace: = =20 [ 6.673986] = =20 [ 6.678162] ? __warn+0x9f/0x130 = =20 [ 6.684595] ? memremap+0x58/0x1b0 = =20 [ 6.691371] ? report_bug+0xcc/0x150 = =20 [ 6.698499] ? handle_bug+0x3d/0x70 = =20 [ 6.705449] ? exc_invalid_op+0x16/0x40 = =20 [ 6.713093] ? asm_exc_invalid_op+0x16/0x20 = =20 [ 6.721433] ? memremap+0x58/0x1b0 = =20 [ 6.728211] ? memremap+0x58/0x1b0 = =20 [ 6.732866] Freeing initrd memory: 51140K = =20 [ 6.734986] tpm_read_log_efi+0x7d/0x1e0 = =20 [ 6.750795] tpm_bios_log_setup+0x51/0x170 = =20 [ 6.758959] tpm_chip_register+0x36/0x220 = =20 [ 6.766948] tpm_tis_core_init+0x438/0x630 = =20 [ 6.775112] tpm_tis_init+0x103/0x190 = =20 [ 6.782410] tpm_tis_plat_probe+0x87/0x90 = =20 [ 6.790401] platform_probe+0x2f/0x60 = =20 [ 6.797705] really_probe+0x1ec/0x340 = =20 [ 6.805002] driver_probe_device+0x1e/0x80 = =20 [ 6.813184] __driver_attach+0x10e/0x1a0 = =20 [ 6.821018] ? driver_attach+0x20/0x20 = =20 [ 6.828491] bus_for_each_dev+0x64/0xa0 = =20 [ 6.836136] bus_add_driver+0x196/0x210 = =20 [ 6.843781] ? __initstub__kmod_tpm__370_527_tpm_init4+0x100/0x100 = = =20 [ 6.856109] driver_register+0x5e/0xf0 = =20 [ 6.863580] __initstub__kmod_tpm_tis__319_478_init_tis6+0x7f/0xc0 = = =20 [ 6.875908] ? add_device_randomness+0x62/0x70 = =20 [ 6.884768] do_one_initcall+0xad/0x1f0 = =20 [ 6.892414] ? alloc_pages+0x120/0x2c0 = =20 [ 6.899885] ? security_kernfs_init_security+0x2a/0x40 = =20 [ 6.910132] ? idr_alloc_cyclic+0xaa/0x110 = =20 [ 6.918295] ? idr_alloc_cyclic+0xaa/0x110 = =20 [ 6.926458] ? alloc_pages+0x15c/0x2c0 = =20 [ 6.933928] ? number+0x1da/0x400 = =20 [ 6.940531] ? ida_alloc_range+0x193/0x410 = =20 [ 6.948696] ? parse_args+0x14b/0x380 = =20 [ 6.955996] kernel_init_freeable+0x1b1/0x2a0 = =20 [ 6.964682] ? rest_init+0xb0/0xb0 = =20 [ 6.971461] kernel_init+0x16/0x1a0 = =20 [ 6.978410] ret_from_fork+0x1f/0x30 = =20 [ 6.985536] = =20 [ 6.989885] ---[ end trace 0000000000000000 ]--- = =20 [ 6.999089] Could not map UEFI TPM log table payload! =20 The memremap being attempted is from 0x5f54e018 to 0x830f1d13, which lookin= g at /proc/iomem, is overlapping all the below regions. cat /proc/iomem ... 61000000-61ffffff : Kernel code 62000000-62bf4fff : Kernel rodata 62c00000-634e28bf : Kernel data 63b8e000-641fffff : Kernel bss 64dbb000-64dbbfff : Reserved 64dbc000-69c89fff : System RAM 69c8a000-6bd89fff : Reserved 6ad6d018-6ad6d027 : APEI EINJ 6ad6d048-6ad6d067 : APEI EINJ 6ad6d078-6ad6d07f : APEI EINJ 6ad6e018-6ad6e018 : APEI ERST 6ad6e01c-6ad6e021 : APEI ERST 6ad6e028-6ad6e039 : APEI ERST 6ad6e040-6ad6e04c : APEI ERST 6ad6e050-6ad7004f : APEI ERST 6bd8a000-6be44fff : ACPI Tables 6be45000-6c99efff : ACPI Non-volatile Storage 6c99f000-6ebedfff : Reserved 6ebee000-6fffffff : System RAM 70000000-7fffffff : Reserved 80000000-8fffffff : PCI MMCONFIG 0000 [bus 00-ff] ... The kernel is being booted using kexec. 0x23ba3cfb is 571MB which looks too= big. Could it be that the log size grew too big in the previous kernel? Or= is it a memory corruption similar to the issue we encountered in [1] and s= olved in [2]? [1] https://lore.kernel.org/all/20240910-juicy-festive-sambar-9ad23a@devvm3= 2600/ [2] https://lore.kernel.org/all/20240912155159.1951792-2-ardb+git@google.co= m/ Thanks! Usama -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120613): https://edk2.groups.io/g/devel/message/120613 Mute This Topic: https://groups.io/mt/108924723/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-