From owner-freebsd-bugs@freebsd.org Sat Dec 2 13:35:20 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DD04DFF89E for ; Sat, 2 Dec 2017 13:35:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B9E87064B for ; Sat, 2 Dec 2017 13:35:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id vB2DZK3A098916 for ; Sat, 2 Dec 2017 13:35:20 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 224037] Kernel crashes when trying to mount certain USB keys reported as WriteProtected Date: Sat, 02 Dec 2017 13:35:20 +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: 11.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: petr@leszkow.eu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-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 MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2017 13:35:20 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D224037 Bug ID: 224037 Summary: Kernel crashes when trying to mount certain USB keys reported as WriteProtected Product: Base System Version: 11.1-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: petr@leszkow.eu I am not sure if this is a "KERNEL" bug, but every time when I just plug the write protected USB key ( for example genuine Windows 10 installation key -= I am trying to install Windows 10 into VirtualBos ) my systems crashes and reboots itself. FreeBSD m4700 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:0= 8:28 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 Mate Desktop with Polkit settings to auto-mount usb keys. The only way how to avoid the immediate system crash/reboot is to force mou= nt usb key with ReadOnly option plus auto-mount Polkit policy disabled. Theref= ore is there any kernel-level-method, to detect correctly write protected keys = and mount them read-only automatically?=20 Thank you for your help. PetrL System log: ugen2.4: at usbus2 umass1 on uhub4 umass1: on usbus2 umass1: SCSI over Bulk-Only; quirks =3D 0x8100 umass1:4:1: Attached to scbus4 da1 at umass-sim1 bus 1 scbus4 target 0 lun 0 da1: Removable Direct Access SPC-4 SCSI device da1: Serial Number 001A92053F4DB0B0B27403F8 da1: 40.000MB/s transfers da1: 14784MB (30277632 512 byte sectors) da1: quirks=3D0x2 (da1:umass-sim1:1:0:0): WRITE(10). CDB: 2a 00 00 00 14 a0 00 00 08 00 (da1:umass-sim1:1:0:0): CAM status: SCSI Status Error (da1:umass-sim1:1:0:0): SCSI status: Check Condition (da1:umass-sim1:1:0:0): SCSI sense: DATA PROTECT asc:27,0 (Write protected) (da1:umass-sim1:1:0:0): Error 13, Unretryable error g_vfs_done():da1s1[WRITE(offset=3D1654784, length=3D4096)]error =3D 13 (da1:umass-sim1:1:0:0): WRITE(10). CDB: 2a 00 00 00 14 a0 00 00 08 00 (da1:umass-sim1:1:0:0): CAM status: SCSI Status Error (da1:umass-sim1:1:0:0): SCSI status: Check Condition (da1:umass-sim1:1:0:0): SCSI sense: DATA PROTECT asc:27,0 (Write protected) (da1:umass-sim1:1:0:0): Error 13, Unretryable error g_vfs_done():da1s1[WRITE(offset=3D1654784, length=3D4096)]error =3D 13 (da1:umass-sim1:1:0:0): WRITE(10). CDB: 2a 00 00 00 14 a0 00 00 08 00 (da1:umass-sim1:1:0:0): CAM status: SCSI Status Error (da1:umass-sim1:1:0:0): SCSI status: Check Condition (da1:umass-sim1:1:0:0): SCSI sense: DATA PROTECT asc:27,0 (Write protected) (da1:umass-sim1:1:0:0): Error 13, Unretryable error g_vfs_done():da1s1[WRITE(offset=3D1654784, length=3D4096)]error =3D 13 fsync: giving up on dirty 0xfffff8005152fb10: tag devfs, type VCHR usecount 1, writecount 0, refcount 1850 mountedhere 0xfffff8005170ae00 flags (VI_ACTIVE) v_object 0xfffff8000d03a2d0 ref 0 pages 1848 cleanbuf 1847 dirtybuf 1 lock type devfs: UNLOCKED dev da1s1 Fatal trap 9: general protection fault while in kernel mode cpuid =3D 0; apic id =3D 00 instruction pointer =3D 0x20:0xffffffff809c0c2b stack pointer =3D 0x28:0xfffffe04648448e0 frame pointer =3D 0x28:0xfffffe0464844910 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 27 (syncer) trap number =3D 9 panic: general protection fault cpuid =3D 0 KDB: stack backtrace: #0 0xffffffff80aada97 at kdb_backtrace+0x67 #1 0xffffffff80a6bb76 at vpanic+0x186 #2 0xffffffff80a6b9e3 at panic+0x43 #3 0xffffffff80edf832 at trap_fatal+0x322 #4 0xffffffff80edee9e at trap+0x5e #5 0xffffffff80ec3641 at calltrap+0x8 #6 0xffffffff80b07086 at bufwrite+0x256 #7 0xffffffff80b1889e at vop_stdfsync+0x19e #8 0xffffffff8104cc59 at VOP_FSYNC_APV+0x89 #9 0xffffffff80b2e28a at sched_sync+0x4fa #10 0xffffffff80a2f815 at fork_exit+0x85 #11 0xffffffff80ec3b7e at fork_trampoline+0xe --=20 You are receiving this mail because: You are the assignee for the bug.=