1. 30 Oct, 2025 9 commits
  2. 29 Oct, 2025 2 commits
  3. 28 Oct, 2025 5 commits
    • Robert Schmidt's avatar
      dump_mac_stats(): avoid overflow · 48faffc1
      Robert Schmidt authored
      The call to snprintf() as was used is wrong: we use the return value to
      advance output, but the man page says
      
      > The functions snprintf() and vsnprintf() do not write more than size
      > bytes (including the terminating null byte ('\0')).  If the output was
      > truncated due  to this  limit,  then  the return value is the number of
      > characters (excluding the terminating null byte) which would have been
      > written to  the  final  string  if enough  space  had  been available.
      > Thus, a return value of size or more means that the output was
      > truncated.
      
      Thus, output could go beyond end, and we get a stack overflow. Instead,
      encapsulate the call to snprintf() checking this condition, and only
      advancing output as intended, limiting to 0 if we are at the end of the
      buffer.  This avoids this error:
      
          ==964825==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7be799f51988 at pc 0x7fe7d66b0d39 bp 0x7be79b825ef0 sp 0x7be79b8256c0
          WRITE of size 3 at 0x7be799f51988 thread T24
              #0 0x7fe7d66b0d38 in vsnprintf (/lib64/libasan.so.8+0xb0d38) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
              #1 0x7fe7d66b2d44 in snprintf (/lib64/libasan.so.8+0xb2d44) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
              #2 0x0000008fe7c6 in dump_mac_stats /home/richie/w/refactor-dlsch/openair2/LAYER2/NR_MAC_gNB/main.c:183
              #3 0x00000092071a in gNB_dlsch_ulsch_scheduler /home/richie/w/refactor-dlsch/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c:200
              #4 0x0000008f8f78 in run_scheduler_monolithic /home/richie/w/refactor-dlsch/openair2/NR_PHY_INTERFACE/NR_IF_Module.c:399
      48faffc1
    • Robert Schmidt's avatar
      Remove NR MAC's UE-specific lock · 7df8243a
      Robert Schmidt authored
      There is the (global) sched_lock that prevents concurrent access. A
      dedicated UE lock does not make sense in that case. Worse, this lock
      does not prevent all concurrent UE accesses (e.g., there are many loops
      over UEs that are not protected), so it's also wrong.
      7df8243a
    • Robert Schmidt's avatar
      nrMAC_stats.log: handle file errors, add truncate to reset file · 07f06f8c
      Robert Schmidt authored
      truncate resets the file size to 0. Without this, e.g., when
      disconnecting a UE, the old UE remains at the end and is not
      overwritten, which is confusing.
      07f06f8c
    • Robert Schmidt's avatar
    • Robert Schmidt's avatar
      Measure tx_func()/rx_func() job duration · 9b97fd9b
      Robert Schmidt authored
      9b97fd9b
  4. 16 Oct, 2025 10 commits
  5. 15 Oct, 2025 14 commits