Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Aug 2017 10:25:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 221957] cam iosched: Add a handler for the quanta sysctl to enforce valid values
Message-ID:  <bug-221957-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221957

            Bug ID: 221957
           Summary: cam iosched: Add a handler for the quanta sysctl to
                    enforce valid values
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: fk@fabiankeil.de
             Flags: mfc-stable11?

Created attachment 185948
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D185948&action=
=3Dedit
cam iosched: Add a handler for the quanta sysctl to enforce valid values

The attached patch adds a handler for the iosched quanta sysctl
to enforce valid values

Invalid values can result in devision-by-zero panics and other
undesirable behaviour.

Example panic:

   Fatal trap 18: integer divide fault while in kernel mode
   cpuid =3D 0; apic id =3D 00
   instruction pointer     =3D 0x20:0xffffffff802998e5
   stack pointer           =3D 0x28:0xfffffe01ea3bf8d0
   frame pointer           =3D 0x28:0xfffffe01ea3bf900
   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 12 (swi4: clock (0))
   trap number             =3D 18
   panic: integer divide fault
   cpuid =3D 0
   KDB: stack backtrace:
   db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame
0xfffffe01ea3bf510
   vpanic() at vpanic+0x186/frame 0xfffffe01ea3bf590
   panic() at panic+0x43/frame 0xfffffe01ea3bf5f0
   trap_fatal() at trap_fatal+0x322/frame 0xfffffe01ea3bf640
   trap() at trap+0x5e/frame 0xfffffe01ea3bf800
   calltrap() at calltrap+0x8/frame 0xfffffe01ea3bf800
   --- trap 0x12, rip =3D 0xffffffff802998e5, rsp =3D 0xfffffe01ea3bf8d0, r=
bp =3D
0xfffffe01ea3bf900 ---
   cam_iosched_ticker() at cam_iosched_ticker+0x25/frame 0xfffffe01ea3bf900
   softclock_call_cc() at softclock_call_cc+0x13e/frame 0xfffffe01ea3bf9b0
   softclock() at softclock+0xb9/frame 0xfffffe01ea3bf9e0
   intr_event_execute_handlers() at intr_event_execute_handlers+0xec/frame
0xfffffe01ea3bfa20
   ithread_loop() at ithread_loop+0xd6/frame 0xfffffe01ea3bfa70
   fork_exit() at fork_exit+0x85/frame 0xfffffe01ea3bfab0
   fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe01ea3bfab0
   --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 ---
   Uptime: 2h29m20s
   Dumping 1165 out of 8055
MB:..2%..11%..21%..31%..42%..51%..61%..71%..81%..91%

Obtained from: ElectroBSD

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221957-8>