cvs commit: src/sys/dev/bktr bktr_i2c.c src/sys/dev/ichsmb ichsmb.c src/sys/dev/iicbus iicsmb.c src/sys/dev/smbus smb.c smb.h smbconf.c smbconf.h smbus.c smbus.h smbus_if.m src/sys/pci alpm.c amdpm.c amdsmb.c intpm.c nfsmb.c viapm.c

John Baldwin jhb at freebsd.org
Mon Sep 11 15:27:21 PDT 2006


On Monday 11 September 2006 18:08, John-Mark Gurney wrote:
> John Baldwin wrote this message on Mon, Sep 11, 2006 at 20:52 +0000:
> 
> [...]
> 
> >   - Change the SMB_BREAD ioctl to write out the updated struct smbcmd 
which
> >     will contain the actual number of bytes read in the 'count' field.  To
> >     preserve the previous ABI, the old ioctl value is mapped to 
SMB_OLD_BREAD
> >     which doesn't copy the updated smbcmd back out to userland.  I doubt 
anyone
> >     actually used the old BREAD anyway as it was rediculous to do a 
bulk-read
> >     but not tell the using program how much data was actually read.
> 
> [...]
> 
> >   - Fix buffer overflows in the bread() methods of ichsmb(4), alpm(4),
> >     amdpm(4), amdsmb(4), intpm(4), and nfsmb(4).
> 
> The old SMB_BREAD w/o the other change would overflow the buffer w/
> the real amount of data which you had no way to know exactly how much
> was overwritten (at least you knew it'd be no more than 32 bytes due to
> smbus limitations)...
> 
> I'd vote for removing _OLD_BREAD, and adding it back when merged into
> 6.x...  7.0 is as good of a time to change the API...

Well, for now I hope to MFC this stuff as the IPMI stuff I'm working on 
depends on this to handle IPMI over SMBus (SSIF).  Once it is MFC'd, then we 
can remove the old one in 7.

-- 
John Baldwin


More information about the cvs-all mailing list