Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2399658rdg; Mon, 16 Oct 2023 03:22:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHx1DdC4sv8P/4IEkN6w/S4AkSdCUl5RDlzxgedpAKOlM4gzZpJOk8+wF1w8qkaE2O9SrN4 X-Received: by 2002:a05:6a20:729c:b0:15e:bcd:57f5 with SMTP id o28-20020a056a20729c00b0015e0bcd57f5mr32834210pzk.3.1697451760277; Mon, 16 Oct 2023 03:22:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697451760; cv=none; d=google.com; s=arc-20160816; b=q90DTKdtHer4IYfQbClztjsnVWJ0jv1Q/xwWqoJnX62IYKhGQs11O2bxu9prm+C0A8 OC5oj2byt3Iz7g2YMKteyBt//P7kjbLob9CyGrowq5hBH8KPXkGeh97oaeWZpLjPEJh8 CDJZn7z258rBBb1EfPqVN/bY4IdY+XZwuEhAvdVUH7lO1rDxkvF9FFhQQ0tNf6NVIK3u XnVG+5EYS1CPXfqCKF5zmknP0UZDthdqeHE6aum49ELRGXxlBcLiL7j7fudh1pBih4TH /5gbmWs5aG1wQQx3kOuJQ692alrHscJOSXHGlqz15PhME/7g9dhb2gXlMA71uiByzZ1R e17g== 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=urvghqCQ914cVQFQkt+KKjUgox1ewzOXZ5Rj9OJC01U=; fh=NS1Q8diGZOZHX5jICQCE6BbbqDSkwhNR7ZEmRCfYds4=; b=nPw3hQQnreW6hkI3HKlF9/EaTDK3NMPDIAoYf+1HWkaRF2PiajzihorvAb1woB0Aom Uo7zLojgVhFmC3BZ78yU+cCA+Ti6iwQAGffVF5gxKq2rhcmQDOpq9vskiH3T8/5tko5e c5wenZk/sREsjL30bFMunQMUgJus48CZ9NKticlrAxKo3LMOX4TfmhXRoo+aiPIhHL9B aSxZqiZuY5JWlI2UgrpQ2+sWsTy3yyBF1RZOIAz1g+Or1WJQrvsSsCfBjy0oQLbiUCqV tLYDqjXPdhYgUZaQI08Oy7zbLffpbX/SCqdeBTs0eZKu1XobgyFbKawrQL60Kj/YLUkI FjxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s9MSovaf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id lb18-20020a17090b4a5200b002768ab837bfsi6382631pjb.48.2023.10.16.03.22.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 03:22:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s9MSovaf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 21EBA807C856; Mon, 16 Oct 2023 03:22:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232266AbjJPKW0 (ORCPT + 99 others); Mon, 16 Oct 2023 06:22:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230152AbjJPKWY (ORCPT ); Mon, 16 Oct 2023 06:22:24 -0400 Received: from mail-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA342B4 for ; Mon, 16 Oct 2023 03:22:19 -0700 (PDT) Received: by mail-ua1-x936.google.com with SMTP id a1e0cc1a2514c-7ae19da7b79so1610464241.2 for ; Mon, 16 Oct 2023 03:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697451738; x=1698056538; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=urvghqCQ914cVQFQkt+KKjUgox1ewzOXZ5Rj9OJC01U=; b=s9MSovafxCBcbIkynFKw6Pwt4DlzYDKF87HfYqV0YmF9wLntls9Irpra0GdEvIjT8X Jl5bS3tN6vJYwNcJJMrquiZQ6ILIa8NriXOBTbEbMrvVXFHYlrW3o3j/mZHCPLVthCfZ Op4RCcaIHHRoImhRtgiH/n9+4ywrIenjBL230arD5+SxBl5DNM6E4bavifEXTbO3JTrl 4txmVcUp/dIQGnhfruwRi901i0Pwhub65iKf3lz206hDkXsD6P1ZHnmd8UEwKJLVdQtA 6DAnXrCuztq9vdC5g42ZsnynfUR9AN40ymIX2CHNGX6ENtZjiOdIrN2h31uxzGzR3hUS ANuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697451738; x=1698056538; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=urvghqCQ914cVQFQkt+KKjUgox1ewzOXZ5Rj9OJC01U=; b=dh/3Hy1r9itF0jZ0J3JtOeFTceyXeTRas+OBMI9w4gTwOaqsFip2Qm+bMAGDENxGOR HEPuYxzD4SZh/pwbdqc7McSRHFGvaYXVPIJU4b9znrYyk5C7/DLwcUmIMaKVvkcwuzgo 3yqouC7MHca24rwzN+WtOylJ/6NgrjXPyG1L7rFWzZ/zQyR6ihNW7yUuUGRWsF1GdUiA mHL59aVdyWKSsNXmcYmlcM2P1Ck6xqML5ERqnSj6vmjBq2ce4SMuKtsAxCfZi3K539th nWJrliXSDGFBZPaogk+vvu71Y8s1wo7bBlyOyi/nFysZhzSVK1jjeGonhCd90NLsAEc+ pzzQ== X-Gm-Message-State: AOJu0Yy/+I4WUVaoxmLWq1Zj3/DOSXMzWs1UaeIOZYjkLVsKsQzyKWVt FRC2cGO824RYNVeZeQBwERk9EC5mHyDERvg5kSamuDVSx+GKJv4Gyt04mw== X-Received: by 2002:a05:6102:204e:b0:457:dfe0:ee6e with SMTP id q14-20020a056102204e00b00457dfe0ee6emr2306436vsr.22.1697451738489; Mon, 16 Oct 2023 03:22:18 -0700 (PDT) MIME-Version: 1.0 From: Naresh Kamboju Date: Mon, 16 Oct 2023 15:52:07 +0530 Message-ID: Subject: mm: Unable to handle kernel NULL pointer dereference at virtual address - mmap_region (include/linux/fs.h:580 mm/mmap.c:2946) To: open list , linux-mm , lkft-triage@lists.linaro.org Cc: Lorenzo Stoakes , "Reviewed-by: Jan Kara" , Alexander Viro , Andy Lutomirski , Christian Brauner , Hugh Dickins , willy@infradead.org, Mike Kravetz , Muchun Song , Andrew Morton , Dan Carpenter , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 16 Oct 2023 03:22:37 -0700 (PDT) Following kernel crash noticed while running LTP hugetlb and selftests on qemu-x86_64 and qemu-arm64 running with Linux next 6.6.0-rc6-next-20231016. Reported-by: Linux Kernel Functional Testing Reported-by: Naresh Kamboju Test Logs: ----- <1>[ 97.466617] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000d8 <1>[ 97.469156] Mem abort info: <1>[ 97.469619] ESR = 0x0000000097c08005 <1>[ 97.470362] EC = 0x25: DABT (current EL), IL = 32 bits <1>[ 97.471288] SET = 0, FnV = 0 <1>[ 97.472061] EA = 0, S1PTW = 0 <1>[ 97.473341] FSC = 0x05: level 1 translation fault <1>[ 97.473935] Data abort info: <1>[ 97.474630] Access size = 8 byte(s) <1>[ 97.475400] SSE = 0, SRT = 0 <1>[ 97.476583] SF = 1, AR = 0 <1>[ 97.477038] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 <1>[ 97.477975] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 <1>[ 97.478939] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000101c17000 <1>[ 97.479949] [00000000000000d8] pgd=0800000101d5c003, p4d=0800000101d5c003, pud=0000000000000000 <0>[ 97.482922] Internal error: Oops: 0000000097c08005 [#1] PREEMPT SMP <4>[ 97.484136] Modules linked in: fuse drm backlight dm_mod ip_tables x_tables <4>[ 97.486054] CPU: 0 PID: 342 Comm: hugemmap13 Not tainted 6.6.0-rc6-next-20231016 #1 <4>[ 97.487075] Hardware name: linux,dummy-virt (DT) <4>[ 97.487955] pstate: 03400009 (nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) <4>[ 97.488901] pc : mmap_region (include/linux/fs.h:580 mm/mmap.c:2946) <4>[ 97.490228] lr : mmap_region (mm/mmap.c:2945) <4>[ 97.490733] sp : ffff80008069bba0 <4>[ 97.491176] x29: ffff80008069bbb0 x28: ffff0000c5d5e4d0 x27: fffffffffffffff4 <4>[ 97.492062] x26: 0000000000000000 x25: 0000000000000002 x24: 0000000000000001 <4>[ 97.492989] x23: 0000000000000001 x22: 0000000000000000 x21: ffff0000c20fcf00 <4>[ 97.493771] x20: 00000002000000fb x19: 00000000fffff000 x18: ffff80008069bc38 <4>[ 97.494568] x17: 0000aaaae6247fff x16: 0000aaaade59cfff x15: 0000aaaade580fff <4>[ 97.495367] x14: 0000aaaade57ffff x13: 0000000000000000 x12: 00000000fffff000 <4>[ 97.496172] x11: 0000000100000000 x10: 00000000000fffff x9 : 0000000000000000 <4>[ 97.497004] x8 : 0000000000000001 x7 : 00000002000000fb x6 : ffff0000c20fcf00 <4>[ 97.497810] x5 : ffff0000c5d5e4d0 x4 : 00000000000001c4 x3 : ffffb50d82f264f8 <4>[ 97.498577] x2 : 0000000000000000 x1 : 00000000ffe00000 x0 : 0000000000000000 <4>[ 97.499871] Call trace: <4>[ 97.500288] mmap_region (include/linux/fs.h:580 mm/mmap.c:2946) <4>[ 97.500814] do_mmap (mm/mmap.c:1379) <4>[ 97.501243] vm_mmap_pgoff (mm/util.c:546) <4>[ 97.501711] ksys_mmap_pgoff (mm/mmap.c:1425) <4>[ 97.502166] __arm64_sys_mmap (arch/arm64/kernel/sys.c:21) <4>[ 97.502634] invoke_syscall (arch/arm64/include/asm/current.h:19 arch/arm64/kernel/syscall.c:56) <4>[ 97.503175] el0_svc_common.constprop.0 (include/linux/thread_info.h:127 (discriminator 2) arch/arm64/kernel/syscall.c:144 (discriminator 2)) <4>[ 97.503763] do_el0_svc (arch/arm64/kernel/syscall.c:156) <4>[ 97.504191] el0_svc (arch/arm64/include/asm/daifflags.h:28 arch/arm64/kernel/entry-common.c:133 arch/arm64/kernel/entry-common.c:144 arch/arm64/kernel/entry-common.c:679) <4>[ 97.504640] el0t_64_sync_handler (arch/arm64/kernel/entry-common.c:697) <4>[ 97.505159] el0t_64_sync (arch/arm64/kernel/entry.S:595) <0>[ 97.505635] Code: 52800037 17fffe9f 93407c1b 17fffed1 (f9406ec0) All code ======== 0: 52800037 mov w23, #0x1 // #1 4: 17fffe9f b 0xfffffffffffffa80 8: 93407c1b sxtw x27, w0 c: 17fffed1 b 0xfffffffffffffb50 10:* f9406ec0 ldr x0, [x22, #216] <-- trapping instruction Code starting with the faulting instruction =========================================== 0: f9406ec0 ldr x0, [x22, #216] <4>[ 97.506697] ---[ end trace 0000000000000000 ]--- Links: - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20231016/testrun/20616666/suite/log-parser-test/test/check-kernel-oops/log - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20231016/testrun/20616666/suite/log-parser-test/tests/ Build: - https://storage.tuxsuite.com/public/linaro/lkft/builds/2Wpo3Fqa5DhxsWQjZYBnbqMmD8X/vmlinux.xz - https://storage.tuxsuite.com/public/linaro/lkft/builds/2Wpo3Fqa5DhxsWQjZYBnbqMmD8X/System.map - https://storage.tuxsuite.com/public/linaro/lkft/builds/2Wpo3Fqa5DhxsWQjZYBnbqMmD8X/ Step to reproduce: - https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/2Wpo5DC7b6y3ZyDnxzj6rn5ZNlX/reproducer # To install tuxrun to your home directory at ~/.local/bin: # pip3 install -U --user tuxrun==0.49.2 # # Or install a deb/rpm depending on the running distribution # See https://tuxmake.org/install-deb/ or # https://tuxmake.org/install-rpm/ # # See https://tuxrun.org/ for complete documentation. tuxrun --runtime podman --device qemu-arm64 --boot-args rw --kernel https://storage.tuxsuite.com/public/linaro/lkft/builds/2Wpo3Fqa5DhxsWQjZYBnbqMmD8X/Image.gz --modules https://storage.tuxsuite.com/public/linaro/lkft/builds/2Wpo3Fqa5DhxsWQjZYBnbqMmD8X/modules.tar.xz --rootfs https://storage.tuxboot.com/debian/bookworm/arm64/rootfs.ext4.xz --parameters SKIPFILE=skipfile-lkft.yaml --image docker.io/linaro/tuxrun-dispatcher:v0.49.2 --tests ltp-hugetlb --timeouts boot=30 ltp-hugetlb=20 --overlay https://storage.tuxboot.com/overlays/debian/bookworm/arm64/ltp/20230516/ltp.tar.xz -- Linaro LKFT https://lkft.linaro.org