Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp125159pxb; Tue, 10 Nov 2020 22:28:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSBz6rcrd1Udczm3AsNulk8xCbzHcxgO3hmLuItPewlbHtr5YyxB2p0phP5e7h3MaVAmPM X-Received: by 2002:a05:6402:1cb2:: with SMTP id cz18mr24185575edb.388.1605076079802; Tue, 10 Nov 2020 22:27:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605076079; cv=none; d=google.com; s=arc-20160816; b=pyzeGqSI0u/fddMfJDLfyB1U40ghgiabS+zBLHd0ZfwUAWdecNnnN4UQDtfwyp+wdw bUvcsYNXe1O+jrEBzgmaKF3SCPE3LMkLUHFjP993Srr+f+fsVEGvoxRetjMm5WsPQI3r ECVApvBEyLnRjxDHB3A9Td+24ZJlMREaYXPgcNq1OnLwUa+Pa2MRZayqcoRlG45s6tfP aGAzuyG9TpQBLjZVyz3TECEdpr3Ya7XY0H2E5dSHlzTbOJVKDxpruoCNZ7QtdXaHfXSy S5lZA6/9d9eEXkFlGq4cSYdYYFhi+l8v+s4j+m9C3b4qdGLyF1PiTvYvxR19gPucqm7r vWCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=oka4K+VdT0FCED2J+gWqYdNAE+zjvU+W0LSF6uQEnHM=; b=ajy+yu55ylGTQImdz9cUFRMg+VK+IR0J119acZY2LL3IaJZqng1D9S1ASoGl9Es9Fr da5ffMMrc4bG6SSQCIhIDeuFk49V0cjlZ2Nh4UjEWyDY9Dss7sgL6Z6EEsa4Hn2qTZmk URIL0zWhiovRip6s9r+RmCpgs1KoQMABrz5510cFlUEelA9u9sQbA9qjrp3jFGK2JjOO wK1Mt+qMLg87xitp7INBQBcSWv/DgZsCWyixiiFsnm5eiswOvtUf86n34ztMdDiyPjVR UpH09XkstzeX/7EHd/yV3gOo8yySWxyMeZRoliUffw0/ySBOy8unNPgAW/ajhKq7gpxt gF1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UZFz3mzF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si683510ejs.498.2020.11.10.22.27.36; Tue, 10 Nov 2020 22:27:59 -0800 (PST) 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=@linaro.org header.s=google header.b=UZFz3mzF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726003AbgKKG0D (ORCPT + 99 others); Wed, 11 Nov 2020 01:26:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbgKKG0A (ORCPT ); Wed, 11 Nov 2020 01:26:00 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95BD7C0613D4 for ; Tue, 10 Nov 2020 22:25:59 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id v4so1111013edi.0 for ; Tue, 10 Nov 2020 22:25:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=oka4K+VdT0FCED2J+gWqYdNAE+zjvU+W0LSF6uQEnHM=; b=UZFz3mzFqP/l4HDvWK+EJQHw1gtS2mUdF9PXrezhPBrM+yg3qHXMvTL4cHz5p7LL/A 63HNiixMl3ohQHpT3l6sSyLPrrXCv1lpfZrmKGDkkM52ygiMgG4qOQe++OXRl8UgF0tg c44AOtJUAKG/PihB+idAraKDTZQpUeSyCul+KclKSqx2ajYGaRk4jzRvjFGfhw5bIf1b 6UUduFWcAdX32WOR0vCKkOHFGx+4XybSLztX2di8ALNHJhZAe/Jtjmoq8+Pwm+w7DXtR U22oCcE+Fg97ywgvWgCLRx9SUmI2TtHDy/IKBRZfvJvMUJ0BuhtL8xCONCGDlEjqQn4/ 6Dmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=oka4K+VdT0FCED2J+gWqYdNAE+zjvU+W0LSF6uQEnHM=; b=Mf7fpnZv8bTK3gvarLjsMW1f20G34qLdy8TU+m/aHKJHv9OhoZXHN4DbSSFiWqQEUa Z0gHYHUFwpWm7qpqjpBjakMvhcMgnQOSlmeZON1EXVSuPHJXG29/MsVY/xgd416ozj5d 6QbOMXDnzIlkB4j8Izem06zCG21IfY0q7r8/CJxBGtMH8PbpbUqZnUgPJwzt5+5XiQcY oAIjSyNWAGY0+902/WPyovWZsnex/drsZCDrO9mxNkn7/lqLzFzuKCRyboa/RmPcQvmq FBHNTgQePVThFKzr0nrC11keN821f/LuqcF8YOCTo5f5m5CLQGZMPAg5tFpsFK5a+fgd oOSw== X-Gm-Message-State: AOAM530hSWTKuSTWEGrPdmMa/CJg2E55IDXD/hRDq5UN9ZoWMQ/VQmH2 T9Hx4MbCu2fC8mlhgqdI7v3KDbkSUaeVaG05ebGcfg== X-Received: by 2002:aa7:df81:: with SMTP id b1mr3276236edy.365.1605075957882; Tue, 10 Nov 2020 22:25:57 -0800 (PST) MIME-Version: 1.0 From: Naresh Kamboju Date: Wed, 11 Nov 2020 11:55:46 +0530 Message-ID: Subject: BUG: KASAN: global-out-of-bounds in soc_device_match on arm To: Linux ARM , Linux-Next Mailing List , open list , linux-mm , lkft-triage@lists.linaro.org Cc: Linus Walleij , Arnd Bergmann , Andrew Morton , Ard Biesheuvel , Masami Hiramatsu , Stephen Rothwell , Steven Rostedt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following kernel warning noticed on arm KASAN enabled config while booting on TI beagleboard x15 device. [ 32.127451] BUG: KASAN: global-out-of-bounds in soc_device_match+0x64/0xe4 [ 32.127485] Read of size 4 at addr c21701f8 by task swapper/0/1 [ 32.127508] [ 32.127549] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 5.10.0-rc3-next-20201110 #2 [ 32.127577] Hardware name: Generic DRA74X (Flattened Device Tree) [ 32.127604] Backtrace: [ 32.127670] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [ 32.127717] r9:00000080 r8:c4208000 r7:c3023060 r6:40000093 r5:00000000 r4:c3023060 [ 32.127766] [] (show_stack) from [] (dump_stack+0xe8/0x10c) [ 32.127824] [] (dump_stack) from [] (print_address_description.constprop.0+0x3c/0x4b0) [ 32.127871] r10:00000030 r9:c5da4010 r8:c5da4000 r7:00000000 r6:c0fd5c20 r5:eebf33c0 [ 32.127903] r4:c21701f8 r3:eebf33c4 [ 32.127958] [] (print_address_description.constprop.0) from [] (kasan_report+0x160/0x17c) [ 32.128000] r8:c5da4000 r7:00000000 r6:c0fd5c20 r5:00000001 r4:c21701f8 [ 32.128053] [] (kasan_report) from [] (__asan_load4+0x6c/0x9c) [ 32.128093] r7:c3c3ede0 r6:c354dea0 r5:c0fd5b88 r4:c21701f8 [ 32.128144] [] (__asan_load4) from [] (soc_device_match+0x64/0xe4) [ 32.128197] [] (soc_device_match) from [] (omap8250_probe+0x628/0x75c) [ 32.128236] r7:b7841730 r6:c6db2c4e r5:00000001 r4:c6db2c40 [ 32.128290] [] (omap8250_probe) from [] (platform_drv_probe+0x70/0xc8) [ 32.128335] r10:c5da4044 r9:c5da4048 r8:c34ff834 r7:c3c3e240 r6:c34ff834 r5:00000000 [ 32.128363] r4:c5da4010 [ 32.128413] [] (platform_drv_probe) from [] (really_probe+0x184/0x72c) [ 32.128452] r7:c3c3e240 r6:00000000 r5:c3c3e1c0 r4:c5da4010 [ 32.128499] [] (really_probe) from [] (driver_probe_device+0xa4/0x270) [ 32.128544] r10:c34ff834 r9:c416fa58 r8:c379e840 r7:c5d75a00 r6:c5da4034 r5:c37c01c0 [ 32.128572] r4:c5da4010 [ 32.128620] [] (driver_probe_device) from [] (device_driver_attach+0x94/0x9c) [ 32.128665] r10:00000000 r9:c416fa58 r8:c0f956b4 r7:c5d75a00 r6:c5da4034 r5:c34ff834 [ 32.128693] r4:c5da4010 [ 32.128741] [] (device_driver_attach) from [] (__driver_attach+0xe4/0x19c) [ 32.128780] r7:c34ff834 r6:c5da4010 r5:c34ff834 r4:00000000 [ 32.128826] [] (__driver_attach) from [] (bus_for_each_dev+0x100/0x154) [ 32.128865] r7:c34ff834 r6:b78417a4 r5:c420bd40 r4:c5d75a34 [ 32.128910] [] (bus_for_each_dev) from [] (driver_attach+0x38/0x3c) [ 32.128955] r9:c34ff87c r8:c416fa00 r7:c3541a70 r6:c3541a20 r5:c6db4f00 r4:c34ff834 [ 32.129001] [] (driver_attach) from [] (bus_add_driver+0x21c/0x2dc) [ 32.129034] r5:c6db4f00 r4:c34ff834 [ 32.129080] [] (bus_add_driver) from [] (driver_register+0xdc/0x1b0) [ 32.129125] r10:00000000 r9:c2b00468 r8:c378a0c0 r7:c2170360 r6:c34ff838 r5:c3541a20 [ 32.129153] r4:c34ff834 [ 32.129202] [] (driver_register) from [] (__platform_driver_register+0x7c/0x84) [ 32.129241] r7:ffffc000 r6:c2bc509c r5:00000000 r4:c34ff820 [ 32.129300] [] (__platform_driver_register) from [] (omap8250_platform_driver_init+0x24/0x28) [ 32.129333] r5:c420bf20 r4:b78417d0 [ 32.129387] [] (omap8250_platform_driver_init) from [] (do_one_initcall+0xc4/0x400) [ 32.129437] [] (do_one_initcall) from [] (kernel_init_freeable+0x214/0x268) [ 32.129482] r10:c2d128a8 r9:c2b00468 r8:c2c50834 r7:c2c50854 r6:c2a55ac8 r5:00000007 [ 32.129511] r4:c425a700 [ 32.129563] [] (kernel_init_freeable) from [] (kernel_init+0x18/0x140) [ 32.129607] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c19bfd04 [ 32.129635] r4:00000000 [ 32.129684] [] (kernel_init) from [] (ret_from_fork+0x14/0x38) [ 32.129715] Exception stack(0xc420bfb0 to 0xc420bff8) [ 32.129753] bfa0: 00000000 00000000 00000000 00000000 [ 32.129798] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 32.129839] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 32.129872] r5:c19bfd04 r4:00000000 [ 32.129894] [ 32.129917] The buggy address belongs to the variable: [ 32.129957] k3_soc_devices+0x38/0x1e0 [ 32.129981] The buggy address belongs to the page: [ 32.130018] page:(ptrval) refcount:1 mapcount:0 mapping:00000000 index:0x0 pfn:0x82170 [ 32.130051] flags: 0x1000(reserved) [ 32.130104] raw: 00001000 eebf33c4 eebf33c4 00000000 00000000 00000000 ffffffff 00000001 [ 32.130133] raw: 00000000 [ 32.130159] page dumped because: kasan: bad access detected [ 32.130182] [ 32.130205] Memory state around the buggy address: [ 32.130239] c2170080: 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00 00 05 f9 f9 [ 32.130272] c2170100: f9 f9 f9 f9 00 00 00 00 00 01 f9 f9 f9 f9 f9 f9 [ 32.130306] >c2170180: 00 02 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 f9 [ 32.130331] ^ [ 32.130364] c2170200: f9 f9 f9 f9 00 00 00 06 f9 f9 f9 f9 00 00 00 02 [ 32.130397] c2170280: f9 f9 f9 f9 00 00 00 00 02 f9 f9 f9 f9 f9 f9 f9 [ 32.130422] ================================================================== [ 32.130446] Disabling lock debugging due to kernel taint metadata: git branch: master git repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next git describe: next-20201110 make_kernelversion: 5.10.0-rc3 build : https://builds.tuxbuild.com/1k5bYasxkHF7omMh7mjtxjRtkMe/ Full log: https://lkft.validation.linaro.org/scheduler/job/1927838#L2190 -- Linaro LKFT https://lkft.linaro.org