6769 bop_printf internal buffer is too small

Review Request #179 — Created March 20, 2016 and submitted

tsoome
illumos-gate
6769
general
6769 bop_printf internal buffer is too small

note the actual command line length may be limited by boot loader. However, sample line as printed when kbm_debug is enabled:

*** Entered Solaris in _start() cmdline is: /platform/i86pc/kernel/amd64/unix -B plat-dr-options=0x3,prom_debug=true,kbm_debug=true,map_debug=true -B zfs-bootfs=rpool/283,bootpath="/pci@0,0/pci15ad,1976@10/sd@0,0:b",diskdevid="id1,sd@n6000c
29ce75d9f97b499ab2b552dba13/b" -B console=ttya,ttya-mode="9600,8,n,1,-"

Line wraps are inserted by RB;) the size of this sample is 315 chars, however.

hans
  1. Ship It!
  2. 
      
yuripv
  1. So, how 512 was chosen? If there's even longer command line, we'll need to bump it again? :-)

    1. Just by "gut feeling", as for having static buffer, you need to have limit on it; for command line length the practical limit is what boot loader will allow to use. From usage point of view, 512 does allow to have additionally few disable-XXXXX=true constructs in addition to the ones listed in test. Eventually there should be better way to pass properties to kernel and I have pretty good ideas how to achieve it (create virtual module with property lists), but I want to get grub safely out of the way before going to that path. And afterall, this is debug output and no real harm is coming from output being cut short. Those thoughts are the basis for the value of 512.

  2. 
      
yuripv
  1. Ship It!
  2. 
      
jeffpc
  1. Ship It!
  2. 
      
tsoome
tsoome
Review request changed

Status: Closed (submitted)

Loading...