From owner-freebsd-arm@FreeBSD.ORG Mon Apr 6 15:58:59 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78F34771 for ; Mon, 6 Apr 2015 15:58:59 +0000 (UTC) Received: from mail-ig0-f172.google.com (mail-ig0-f172.google.com [209.85.213.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D11FB65 for ; Mon, 6 Apr 2015 15:58:58 +0000 (UTC) Received: by igblo3 with SMTP id lo3so24437173igb.1 for ; Mon, 06 Apr 2015 08:58:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=dRCvRIGLfzS2BQEZk/QAtfj1OulmdYLclPpXtwERAC0=; b=SUj8AxUtrEZ+YQjee6Z5t23v2sBF1U6XnsshmldNyBkRDX0nc4/EKf03FFbWT6enFq wQO9EobUZPqmFJjB1RHwQfK9uFa+9tRmCkLMktvGaHIv4b11iT7sMFxtUyY708G/UuFF Jv5xd3FKx0phpbhhVoUX0LNiqIn8rKStAMmG1PlQ5420nvm/AhUaAQmuEG3oX5CMgrpN oTsEBX6Ce+qIelMz2tJ/K9Pzo5KC5iC/0AFLJpsD5cXq9m0486W8USMXg21B4+hA6U25 bNUd70vnI6o6JfW9QFu02QXS1p/Gg452DpW2WxK+E7z7GfS3R8+Gy5FK1PgByp8WaghS L2QQ== X-Gm-Message-State: ALoCoQkD7gWGAKpKQuWgfgSYSn4RGxt6b89BNTXYqUzdLOXF0ZHCNqx4q6eFyaVqwBfaeAukUbq/ X-Received: by 10.107.160.212 with SMTP id j203mr23916389ioe.43.1428335931985; Mon, 06 Apr 2015 08:58:51 -0700 (PDT) Received: from netflix-mac-wired.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id ig15sm2967838igb.10.2015.04.06.08.58.50 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 Apr 2015 08:58:51 -0700 (PDT) Sender: Warner Losh Subject: Re: remove broken lib/libc/arm/string/memcpy_xscale.S Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1D3B8A86-5E90-43C0-A0C4-B0FC86FC3A39"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: <20150405015245.GO51048@funkthat.com> Date: Mon, 6 Apr 2015 09:58:49 -0600 Message-Id: References: <20150405015245.GO51048@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.2070.6) Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 15:58:59 -0000 --Apple-Mail=_1D3B8A86-5E90-43C0-A0C4-B0FC86FC3A39 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Apr 4, 2015, at 7:52 PM, John-Mark Gurney wrote: > > I would like to remove this file as it does not implement our defined > memcpy. Per POSIX, overlapping regions passed to memcpy is undefined > behavior. We have defined it to have the same symatics as memmove. > > Sample test program: > #include > #include > > char bufa[512] = "this is a test buffer that should be copied fine."; > int > main() > { > > memcpy(&bufa[10], &bufa[0], strlen(&bufa[10])); > printf("%s\n", bufa); > > return 0; > } > > Output on amd64 HEAD: > this is a this is a test buffer that should be co > > Output on old armv4 from 9.x: > this is a this is a thst buffethst bufhould beufh > > If you just look at the file, it is clear that the implementation does > not adjust the copy direction based upon pointers. We imported the > code from NetBSD, and NetBSD does apparently require memcpy's arguments > to be non-overlapping. > > I'll remove the file shortly unless someone can prove to me that all > uses of memcpy in our tree do not depend upon our defined behavior > per memcpy(3)'s man page. Any chance you can fix this implementation instead? Warner --Apple-Mail=_1D3B8A86-5E90-43C0-A0C4-B0FC86FC3A39 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVIq05AAoJEGwc0Sh9sBEAU54P/AlgpT9pDJxoZ5vK9JcB3Z45 1vfz0Vyr2OpfnXCU4A8W48sECy9OphGRoz0afGcEsZjAiRZk1JyBLgTjktAEoqAL VfOMffmzmMRl2tJCkWDkveXiXp26k8PYY0y0hAd1TXuG8eHX21kXlPvGOtx7NxSn 9hBfMewIGGNlRUu/SK49AsyW9+wdNKR6hjCZWqnbGrAElXOJxsZ884gEG676Q33I 12A8rRvDPYznCsUePIS3TXFvTeQUcARZ+m6KOV3DOyvaU5qoL/ovpMufMEF8IF25 zDRBFsfCJyujDfNhLdB9x95LlEIVrw1F8rRVmncHjeM1vCP+FBh+molhgCmy9Nyw k9b1NV17yYEQKOMmfXOEqieBA3fh2d96nCqnBNhzfozkHluss0DwwCzOKPeWqweY 6YAqrvWKo1X6vSZ5haESbiSkd+u+6axW0Q+sEhuElLdxBBTY1C6wwSd5zXnvtm2B qExEF1gLhiTRKMGRVam95APGMIaqO3kuU6A8YByH/bC1u62wt8fRuNuX2F+XT9lN LTyNyXCekCC631mA885trPtUVtzMmO3NcchgRDecwUi6VRyG0WoLn2nGnBXETQ7q +ZSBPwC7LjgWtDl2ejG+zOSf+v9+X/KBWcilnvWuLIkEx5V0YD7FFgKSoyjQVKQs w+CDqsANvfrZJ+GPLUI4 =GKgz -----END PGP SIGNATURE----- --Apple-Mail=_1D3B8A86-5E90-43C0-A0C4-B0FC86FC3A39--