From owner-cvs-src@FreeBSD.ORG Tue Sep 23 17:25:07 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B85521065672; Tue, 23 Sep 2008 17:25:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 6418E8FC1A; Tue, 23 Sep 2008 17:25:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id E745441C64A; Tue, 23 Sep 2008 19:25:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id wqSKB9Psw3kC; Tue, 23 Sep 2008 19:25:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 7D22541C6B4; Tue, 23 Sep 2008 19:25:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 1EC7744487F; Tue, 23 Sep 2008 17:21:04 +0000 (UTC) Date: Tue, 23 Sep 2008 17:21:04 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: "David E. O'Brien" In-Reply-To: <200809231446.m8NEkQev007507@repoman.freebsd.org> Message-ID: <20080923171859.S65801@maildrop.int.zabbadoz.net> References: <200809231446.m8NEkQev007507@repoman.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/conf files src/sys/fs/tmpfs tmpfs.h tmpfs_subr.c tmpfs_vnops.c src/sys/i386/i386 bios.c src/sys/ia64/ia64 efi.c sal.c src/sys/libkern memcmp.c src/sys/mips/mips support.S src/sys/sys libkern.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2008 17:25:07 -0000 On Tue, 23 Sep 2008, David E. O'Brien wrote: Hi, > obrien 2008-09-23 14:45:10 UTC > > FreeBSD src repository > > Modified files: > sys/conf files > sys/fs/tmpfs tmpfs.h tmpfs_subr.c tmpfs_vnops.c > sys/i386/i386 bios.c > sys/ia64/ia64 efi.c sal.c > sys/mips/mips support.S > sys/sys libkern.h > Added files: > sys/libkern memcmp.c > Log: > SVN rev 183299 on 2008-09-23 14:45:10Z by obrien > > The kernel implemented 'memcmp' is an alias for 'bcmp'. However, memcmp > and bcmp are not the same thing. 'man bcmp' states that the return is > "non-zero" if the two byte strings are not identical. Where as, > 'man memcmp' states that the return is the "difference between the > first two differing bytes (treated as unsigned char values" if the > two byte strings are not identical. > > So provide a proper memcmp(9), but it is a C implementation not a tuned > assembly implementation. Therefore bcmp(9) should be preferred over memcmp(9). Below you have changed a few places back to actually use bcmp instead of memcmp. I see lots of or more places in our kernel using memcmp. Are you saying that they all need to be memcmp instead of bcmp and had been unproper results so far or is the files down just a random collection of memcmp->bcmp changes introduced with the same commit? > Revision Changes Path > 1.1334 +1 -0 src/sys/conf/files > 1.15 +1 -1 src/sys/fs/tmpfs/tmpfs.h > 1.19 +1 -1 src/sys/fs/tmpfs/tmpfs_subr.c > 1.24 +1 -1 src/sys/fs/tmpfs/tmpfs_vnops.c > 1.75 +1 -1 src/sys/i386/i386/bios.c > 1.6 +1 -1 src/sys/ia64/ia64/efi.c > 1.16 +1 -1 src/sys/ia64/ia64/sal.c > 1.1 +53 -0 src/sys/libkern/memcmp.c (new) > 1.2 +0 -2 src/sys/mips/mips/support.S > 1.59 +1 -6 src/sys/sys/libkern.h > -- Bjoern A. Zeeb Stop bit received. Insert coin for new game.