From owner-cvs-all@FreeBSD.ORG Mon Sep 11 22:08:59 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14C5716A494; Mon, 11 Sep 2006 22:08:59 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9600343D46; Mon, 11 Sep 2006 22:08:58 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (0wjkbkyimmacgy9q@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k8BM8w5p024136; Mon, 11 Sep 2006 15:08:58 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k8BM8vCP024135; Mon, 11 Sep 2006 15:08:57 -0700 (PDT) (envelope-from jmg) Date: Mon, 11 Sep 2006 15:08:57 -0700 From: John-Mark Gurney To: John Baldwin Message-ID: <20060911220857.GN9421@funkthat.com> References: <200609112052.k8BKqgFd002566@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200609112052.k8BKqgFd002566@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html 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 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 22:08:59 -0000 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."