Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2006 15:08:57 -0700
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: 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
Message-ID:  <20060911220857.GN9421@funkthat.com>
In-Reply-To: <200609112052.k8BKqgFd002566@repoman.freebsd.org>
References:  <200609112052.k8BKqgFd002566@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



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