From owner-cvs-all@FreeBSD.ORG Tue May 22 10:28:47 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54CCC16A421; Tue, 22 May 2007 10:28:47 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id E3AB713C469; Tue, 22 May 2007 10:28:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 9A6A2474C2; Tue, 22 May 2007 06:28:46 -0400 (EDT) Date: Tue, 22 May 2007 11:28:46 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alfred Perlstein In-Reply-To: <20070522003856.GX21795@elvis.mu.org> Message-ID: <20070522112825.U50138@fledge.watson.org> References: <200705192051.l4JKp0rF074703@repoman.freebsd.org> <20070522003856.GX21795@elvis.mu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_syscalls.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 10:28:47 -0000 On Mon, 21 May 2007, Alfred Perlstein wrote: > Is this the same bug that used to be in sendfile but got corrected some > years back? Dunno, but it sounds like we really need a comprehensive set of edge-case tests for sendfile. Robert N M Watson Computer Laboratory University of Cambridge > > * Andre Oppermann [070519 13:52] wrote: >> andre 2007-05-19 20:50:59 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/kern uipc_syscalls.c >> Log: >> In kern_sendfile() adjust byte accounting of the file sending loop to >> ignore the size of any headers that were passed with the sendfile(2) >> system call. Otherwise the file sent will be truncated by the header >> size if the nbytes parameter was provided. The bug doesn't show up >> when either nbytes is zero, meaning send the whole file, or no header >> iovec is provided. >> >> Resolve a potential error aliasing of errors from the VM and sf_buf >> parts and the protocol send parts where an error of the latter over- >> writes one of the former. >> >> Update comments. >> >> The byte accounting bug wasn't seen in earlier because none of the popular >> sendfile(2) consumers, Apache, lighttpd and our ftpd(8) use it in modes >> that trigger it. The varnish HTTP proxy makes full use of it and exposed >> the problem. >> >> Bug found by: phk >> Tested by: phk >> >> Revision Changes Path >> 1.256 +37 -13 src/sys/kern/uipc_syscalls.c > > -- > - Alfred Perlstein >