From nobody Fri Sep 30 19:05:50 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MfKSZ5d1Gz4YBKv for ; Fri, 30 Sep 2022 19:05:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MfKSZ3cpSz3DCg for ; Fri, 30 Sep 2022 19:05:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MfKSZ2Yn8zGxk for ; Fri, 30 Sep 2022 19:05:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 28UJ5ofG057001 for ; Fri, 30 Sep 2022 19:05:50 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 28UJ5onl057000 for bugs@FreeBSD.org; Fri, 30 Sep 2022 19:05:50 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 266730] powerpc kernel crash on loadable modules that use copyin/copyout ifunc Date: Fri, 30 Sep 2022 19:05:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: alfredo@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664564750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=50TgzBKIT3k2Y+Usm9QmZUqEYGYOYG13/e484DRPxb4=; b=pyFGmlhEVnLqLgFzEZqnqXBEhgiOcnhX6SFMmZQoCTog0tv3wynAsPYX3cA1T0fZIjKo9T qkepelhOxjVAXbmpHXvpRWhiRagVzmmqXlbj5N9+BQYQH6J/OkYX2jqJPja7oYAv8MeKGl Jq9fPWt5g4F95mJj9CsI6guhmyA7iDFrjHONt9d2xcb0/Iap1sdSWhzndc2ZcUOTWs63xr 1d/UVcczoT7c4TQDqqjIVFbjWwnMVINpbsF60WMHAswW0jrQTx5MBNRMFA/J/B02LeCKD8 YKA9YafeJRYHQB82OZC6HonrShfBrEiTjELSBznS3WRRFFgUnz+jX4mPb5CfIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664564750; a=rsa-sha256; cv=none; b=XhB2NBOFWWLJ8sJHeANiCQ582e9uI2+kk8DhDoGReO1Nn96Uv0xGL+jgCG+mmPBJX/HoXs CgOi2PQc/VLbcbgETzoa8qn4T640dE52n8hojNLQMIMmRpAoGeiPMciLPtyspC+UdJL2Nn G+Wvr0dwJoxgLWUL9hJ4bHcJK/ENVfBisGc9UTr8pTU5vTI05bgiG+7WCqXVleltWKuuDs npg9kudS21t8tc3wD1mDHvsvEGKrpWFq/NxqobpezpoQ+dfiBJALQuMQKeK/kUTTOtSa35 fMylt1L51Bk92PDcQvK5wsFWeYRLtSsXFnY49zDfXypuG8JHdAs6b4SVjqblGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266730 Bug ID: 266730 Summary: powerpc kernel crash on loadable modules that use copyin/copyout ifunc Product: Base System Version: 13.1-STABLE Hardware: powerpc OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: alfredo@freebsd.org At least powerpc64 and powerpc64le kernels panic when copyin/copyout functi= ons are called by external kernel modules (like pfsync, zfs and linuxulator). The panic with exception 0x480 (instruction segment exception) occurs in a context where the functions are set as pointers in cpuset_copy_cb struct. It doesn't crash when functions are called directly (without the struct) or wrapped to be called through a local function wrapper. This affects FreeBSD 13.1/STABLE and 14/CURRENT. How to reproduce: 1- Boot FreeBSD 13.1/STABLE=20 2- kldload pfsync Results: fatal kernel trap: exception =3D 0x480 (instruction segment exception) virtual address =3D 0x38bf00ec7fc3f378 srr0 =3D 0x38bf00ec7fc3f378 (0x78bf00ec7fc3f378) srr1 =3D 0x8000000000009032 current msr =3D 0x8000000000009032 lr =3D 0xc008000051a143f4 (0x8000051a143f4) frame =3D 0xc00800001b5afd50 curthread =3D 0xc0080000518330e0 pid =3D 832, comm =3D ifconfig panic: instruction segment exception trap cpuid =3D 1 time =3D 1664564648 KDB: stack backtrace: 0xc00800001b5af970: at kdb_backtrace+0x60 0xc00800001b5afa80: at vpanic+0x1b8 0xc00800001b5afb30: at panic+0x44 0xc00800001b5afb60: at trap+0x324 0xc00800001b5afc90: at powerpc_interrupt+0x1cc 0xc00800001b5afd20: kernel ISE trap @ 0x38bf00ec7fc3f378 by 0x38bf00ec7fc3f= 378: srr1=3D0x8000000000009032 r1=3D0xc00800001b5affd0 cr=3D0x28020a40 xer=3D0x20040000 ctr=3D0x38bf00ec7fc3f378 r2=3D0xc008000051a348e8 frame=3D0xc00800001b5afd50 0xc00800001b5affd0: at pfsyncioctl+0x368 0xc00800001b5b00f0: at ifioctl+0xc44 0xc00800001b5b0290: at soo_ioctl+0x1b4 0xc00800001b5b0320: at kern_ioctl+0x3d4 0xc00800001b5b03f0: at sys_ioctl+0x134 0xc00800001b5b0520: at syscall+0x194 0xc00800001b5b0620: at trap+0x5e8 0xc00800001b5b0750: at powerpc_interrupt+0x1cc 0xc00800001b5b07e0: user SC trap by 0x8013c5be0: srr1=3D0x800000000280f932 r1=3D0xfffffbfffe0c0 cr=3D0x22251682 xer=3D0 ctr=3D0x8013c5bd0 r2=3D0x8014a2478 frame=3D0xc00800001b5b0810 KDB: enter: panic [ thread pid 832 tid 100073 ] Stopped at kdb_enter+0x70: ori r0, r0, 0x0 db> --=20 You are receiving this mail because: You are the assignee for the bug.=