lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aV9N5UxymrzJ9jSP@gpd4>
Date: Thu, 8 Jan 2026 07:25:41 +0100
From: Andrea Righi <arighi@...dia.com>
To: George Guo <dongtai.guo@...ux.dev>
Cc: etsal@...a.com, changwoo@...lia.com, guodongtai@...inos.cn,
	linux-kernel@...r.kernel.org, sched-ext@...ts.linux.dev,
	tj@...nel.org, void@...ifault.com
Subject: Re: [PATCH 1/1] sched_ext: Add error logging for dsq creation
 failures

Hi George,

On Thu, Jan 08, 2026 at 11:23:28AM +0800, George Guo wrote:
> Hi Etsal,
> Thanks for reviewing!
> 
> > While the change looks correct, is there any benefit to it?
> Yes, definitely. I found this issue while adding sched_ext support for
> LoongArch. When scx_bpf_create_dsq() failed during my development, there
> were no error messages at all, which made debugging difficult.
> 
> Specifically:
> 1. The failure was silent - no log, no error message in dmesg

Which kernel is that?

In theory you should get a clear message in dmesg. For example, if I try to
create an invalid DSQ in scx_simple I get this in dmesg:

  [690301.673313] sched_ext: BPF scheduler "simple" disabled (runtime error)
  [690301.673324] sched_ext: simple: ops.init() failed (-22)
  [690301.673327]    scx_enable.isra.0+0xc8b/0x11f0
  [690301.673343]    bpf_struct_ops_link_create+0x141/0x1b0
  [690301.673352]    __sys_bpf+0x1c0c/0x2de0
  [690301.673357]    __x64_sys_bpf+0x21/0x30
  [690301.673359]    do_syscall_64+0x81/0x820
  [690301.673368]    entry_SYSCALL_64_after_hwframe+0x76/0x7e

And in stdout:

DEBUG DUMP
================================================================================

scx_simple[364999] triggered exit kind 1024:
  runtime error (ops.init() failed (-22))

Backtrace:
  scx_enable.isra.0+0xc8b/0x11f0
  bpf_struct_ops_link_create+0x141/0x1b0
  __sys_bpf+0x1c0c/0x2de0
  __x64_sys_bpf+0x21/0x30
  do_syscall_64+0x81/0x820
  entry_SYSCALL_64_after_hwframe+0x76/0x7e

CPU states
----------

CPU 2   : nr_run=0 flags=0x1 cpu_rel=0 ops_qseq=87907495 pnt_seq=66861592
          curr=scx_simple[364999] class=fair_sched_class

CPU 3   : nr_run=0 flags=0x1 cpu_rel=0 ops_qseq=85461608 pnt_seq=64229201
          curr=pacman[364201] class=fair_sched_class

Event counters
--------------
              SCX_EV_SELECT_CPU_FALLBACK:                0
       SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE:                0
               SCX_EV_DISPATCH_KEEP_LAST:                0
                 SCX_EV_ENQ_SKIP_EXITING:                0
      SCX_EV_ENQ_SKIP_MIGRATION_DISABLED:                0
                 SCX_EV_REFILL_SLICE_DFL:                0
                  SCX_EV_BYPASS_DURATION:                0
                  SCX_EV_BYPASS_DISPATCH:                0
                  SCX_EV_BYPASS_ACTIVATE:                0

================================================================================

EXIT: runtime error (ops.init() failed (-22))

> 2. I had to add bpf_printk() temporarily to confirm it was dsq creation failing
> 
> So the benefit is improved debuggability and faster issue diagnosis.
> 
> Thanks!
> 

Thanks,
-Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ