Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp744882ybj; Thu, 7 May 2020 06:44:58 -0700 (PDT) X-Google-Smtp-Source: APiQypJAFLFdsB9UkocedcyVMMUjvrA6mpXmHrEIvpKBZVHT2aELAwiCU1SL/f0yuhTW5iwty4Cc X-Received: by 2002:a50:8e01:: with SMTP id 1mr11655892edw.26.1588859098526; Thu, 07 May 2020 06:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588859098; cv=none; d=google.com; s=arc-20160816; b=lZmMYbjUhb9MVqm71AF8vZ0sY2hdHKsR6RkpB9ndQj+dN+VCI3y/G8iu+b70mNZJos p9Kg/G3sJDeFyC2xUFq6S1Y1XFrDPkiIbjTkf1BLfa1uTb1aP9zdM4v4mhxSIT7jP8vd LyJGf6bd45051fPNS4LvpRUHE3LHYA4SXV7zPZu4wDsiKYPLb8VnnBg1zFTc0rffbIP3 joPPMIiB1ZLVyKin/1gUAYIj0g7WqQdmeAYy94yEtb/Qq3+aN7P6pJr456NMYI3DO/9I CojC7Dv22JOrsTy7W/Rwfb/BGcH3MhKV2tYd1lWy6oIUOoqiWb+pUmOzSa+yaC9LvNvJ 3Hbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:cc:date:message-id:subject :mime-version:content-transfer-encoding:from:dkim-signature; bh=y7Cf25gWADp36Aj0ysti+9OMz9XuWPo8dtl90hKQjyg=; b=vsXlbOfvW5j9y9la+fT7GZYCHBzItWHP+lQPRg0xJAFuUHSarVXQg6yR+LGKuaGA35 hS/DZ/FVK7SK5COSCkh+S9M/iygoRIiRlpkJLll6cTtK5WYZh16U3bethQqkSN4G4TAr zy3ZT7xNK3jA5hbVxPkCASRcBJ96f9EQQZLnwzwbk4g/68oN9sz/nRbddQm1nwy+4eLk ovJJT5UEwrJGVXRUSsRGIW7RhGspxW4bqug2qNfSUoQS33JNy0i9eclIyFIYF+1QWfA6 C5+9tGt8g+hIwVO/3Dr9eyuzec88R/fxY9l9RvGuA9nTkb3QlxQ9zqnkVFq47qjnkEd0 HEww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=WP0dPhEP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si3273884edq.88.2020.05.07.06.44.29; Thu, 07 May 2020 06:44:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=WP0dPhEP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726514AbgEGNmz (ORCPT + 99 others); Thu, 7 May 2020 09:42:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726074AbgEGNmy (ORCPT ); Thu, 7 May 2020 09:42:54 -0400 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04D55C05BD43 for ; Thu, 7 May 2020 06:42:53 -0700 (PDT) Received: by mail-qt1-x841.google.com with SMTP id q13so145095qtp.7 for ; Thu, 07 May 2020 06:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:content-transfer-encoding:mime-version:subject:message-id:date :cc:to; bh=y7Cf25gWADp36Aj0ysti+9OMz9XuWPo8dtl90hKQjyg=; b=WP0dPhEPHMMAgEtmb6cahW1DKdy/ZWQcV5kMmadnr2VdhlMX0ojcM6gKPbR8V6kZ/N XAXm3CMgD7B2rSk7l0fr8zqoXl9G+W/bHk6iyxJfkA3QV6HkJn/0UQZ98BsfZpCxCec2 PhfL8uBddQNzjCW/GgVQC7Ab6PIbxygZLzbpDkupUVeAMQGqWCFOihHpDJ8mWjwX6Sti WUwhwsidCKjRXAL/6Z5K8XKGM00C7uUKmBZ1z7qyjm/3NkLxeMCaxFfhg9Cphyd4S6nv ANzVi51SPdCHaj9+jVFBj+ltPKXDCpAqykWXunNAi4dFN0+CmWFHlhGq3eLQHTDhMU02 LudA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:cc:to; bh=y7Cf25gWADp36Aj0ysti+9OMz9XuWPo8dtl90hKQjyg=; b=ELslJscrowXGqyEYO+hWQpaNS1GiH2YP+b0/uowx2m6T+Ls/OFG4FZcgzAeUmfbpaE kEm6k0uOwOBxBrzuILHN5KBnwxiC+K4xJEp2ImRoIAcwYpt0T7ilygwMp7ZOdwbw1z+5 /CWrwd2p1m/zkOUDilsTSqYubsfMIXQorEp1fVwF78gj0ACXyoMKI69hpAfuvy6zdDax xJZn4wP9Uj94KxFsH48i+vlgZs9v3lsO7+eb4Jp0qlGfkWxecAk0eyg5DiPTagOiSxw3 aqM648VeGGzkNet5ydcW81qCW0pXV6J8s3RvwNfkuHS1j/6GaX61S0mEng/OIEd4Y7Np B5Bw== X-Gm-Message-State: AGi0PuaV9WKwbwOL93APCgxSBMcRXEbk40OOlK/3hDqo8NuHW9g4xATd /LxIcCcrNyMlfvtMSqLsZTNi3Q== X-Received: by 2002:aed:2bc1:: with SMTP id e59mr13896944qtd.313.1588858972273; Thu, 07 May 2020 06:42:52 -0700 (PDT) Received: from [192.168.1.153] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id d6sm2908851qkj.72.2020.05.07.06.42.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2020 06:42:51 -0700 (PDT) From: Qian Cai Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Clang and UBSAN: member access within null pointer of type Message-Id: Date: Thu, 7 May 2020 09:42:50 -0400 Cc: clang-built-linux@googlegroups.com, LKML To: Nick Desaulniers , Nathan Chancellor X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Running a Clang (9.0.1) build kernel with UBSAN generated a few warnings = during boot, [ 0.000000] UBSAN: null-ptr-deref in = drivers/acpi/acpica/tbfadt.c:459:37 [ 0.000000] member access within null pointer of type 'struct = acpi_table_fadt' [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted = 5.7.0-rc4-next-20200507 #2 [ 0.000000] Call trace: [ 0.000000] dump_backtrace+0x0/0x22c [ 0.000000] show_stack+0x28/0x34 [ 0.000000] dump_stack+0x104/0x194 [ 0.000000] handle_null_ptr_deref+0xdc/0x10c [ 0.000000] __ubsan_handle_type_mismatch_v1+0x64/0x78 [ 0.000000] acpi_tb_create_local_fadt+0x104/0x6ec [ 0.000000] acpi_tb_parse_fadt+0xa0/0x1a0 [ 0.000000] acpi_tb_parse_root_table+0x284/0x2ac [ 0.000000] acpi_initialize_tables+0xb4/0xd0 [ 0.000000] acpi_table_init+0x68/0x88 [ 0.000000] acpi_boot_table_init+0x108/0x1a0 [ 0.000000] setup_arch+0xec/0x1f4 [ 0.000000] start_kernel+0x94/0x56c [ 0.000000] UBSAN: null-ptr-deref in arch/arm64/kernel/smp.c:596:6 [ 0.000000] member access within null pointer of type 'struct = acpi_madt_generic_interrupt' [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted = 5.7.0-rc4-next-20200507 #2 [ 0.000000] Call trace: [ 0.000000] dump_backtrace+0x0/0x22c [ 0.000000] show_stack+0x28/0x34 [ 0.000000] dump_stack+0x104/0x194 [ 0.000000] handle_null_ptr_deref+0xdc/0x10c [ 0.000000] __ubsan_handle_type_mismatch_v1+0x64/0x78 [ 0.000000] acpi_parse_gic_cpu_interface+0x40/0xa8 [ 0.000000] acpi_parse_entries_array+0x1d4/0x2e8 [ 0.000000] acpi_table_parse_entries_array+0x11c/0x138 [ 0.000000] acpi_table_parse_madt+0x84/0xb0 [ 0.000000] acpi_parse_and_init_cpus+0x24/0x80 [ 0.000000] smp_init_cpus+0x38/0x17c [ 0.000000] setup_arch+0x140/0x1f4 [ 0.000000] start_kernel+0x94/0x56c [ 255.388250] UBSAN: null-ptr-deref in ./fs/xfs/xfs_sysfs.h:37:23 [ 255.394898] member access within null pointer of type 'struct = xfs_kobj' [ 255.402346] CPU: 230 PID: 2364 Comm: modprobe Tainted: G = L 5.7.0-rc4-next-20200507 #2 [ 255.412191] Hardware name: HPE Apollo 70 /C01_APACHE_MB = , BIOS L50_5.13_1.11 06/18/2019 [ 255.422641] Call trace: [ 255.425811] dump_backtrace+0x0/0x22c [ 255.430188] show_stack+0x28/0x34 [ 255.434225] dump_stack+0x104/0x194 [ 255.438441] handle_null_ptr_deref+0xdc/0x10c [ 255.443511] __ubsan_handle_type_mismatch_v1+0x64/0x78 [ 255.450016] init_module+0x130/0x1d4 [xfs] [ 255.454831] do_one_initcall+0x6c/0x144 [ 255.459383] do_init_module+0x100/0x388 [ 255.463931] load_module+0x2518/0x2b9c [ 255.468404] __se_sys_finit_module+0x144/0x150 [ 255.473560] __arm64_sys_finit_module+0x54/0x88 [ 255.478804] do_el0_svc+0x128/0x1dc [ 255.483010] el0_sync_handler+0xd0/0x268 [ 255.487655] el0_sync+0x164/0x180 [ 255.491782] = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D [ 255.769799] = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D [ 255.779164] UBSAN: null-ptr-deref in ./fs/xfs/xfs_sysfs.h:37:23 [ 255.785816] member access within null pointer of type 'struct = xfs_kobj' [ 255.793268] CPU: 132 PID: 2363 Comm: mount Tainted: G L = 5.7.0-rc4-next-20200507 #2 [ 255.802854] Hardware name: HPE Apollo 70 /C01_APACHE_MB = , BIOS L50_5.13_1.11 06/18/2019 [ 255.813306] Call trace: [ 255.816471] dump_backtrace+0x0/0x22c [ 255.820849] show_stack+0x28/0x34 [ 255.824882] dump_stack+0x104/0x194 [ 255.829090] handle_null_ptr_deref+0xdc/0x10c [ 255.834163] __ubsan_handle_type_mismatch_v1+0x64/0x78 [ 255.840665] xfs_mountfs+0x310/0xc64 [xfs] [ 255.846071] xfs_fc_fill_super+0x5cc/0x75c [xfs] [ 255.851411] get_tree_bdev+0x24c/0x328 [ 255.856463] xfs_fc_get_tree+0x24/0x30 [xfs] [ 255.861453] vfs_get_tree+0x54/0x158 [ 255.865754] do_mount+0x80c/0xaf0 [ 255.869786] __arm64_sys_mount+0xe0/0x18c [ 255.874510] do_el0_svc+0x128/0x1dc [ 255.878720] el0_sync_handler+0xd0/0x268 [ 255.883357] el0_sync+0x164/0x180=