From owner-svn-src-all@freebsd.org Fri May 4 23:03:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBD2AFBABBA for ; Fri, 4 May 2018 23:03:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (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 70FB184650 for ; Fri, 4 May 2018 23:03:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x235.google.com with SMTP id a10-v6so27433451ioc.9 for ; Fri, 04 May 2018 16:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0QtzySXEwOv+QugdOlLF+0o6/UOj9Afwc00C6+xUCOg=; b=p/fMsHtK21SOYVjtjU/IXVOKq5mntNHM7V6nU2ed8q9YLhcEdzaNTRjLu1A56b7034 /uPSh7nn3fEEFtsvE92NvFOisv+pqpGsuciQenNzIgjyjdzw+ycOkWkmHPp3smfD1jKW Ykmm7jHftGlVHzm/a5Qa8PNbJcSVj+V/fbkOozv9v2S4l1cPEwLZSFe4p4cqUyArGzrh JPLGJcsb2w622WSu++wvTkBt/amSLikt12SebhqKOpwneEeZ3+hG5uZGYMAeEIR2hKpx pKVGraX5z9euGM1bGTVbIuqD3vBDNXPXE+kB7efeoSbz+Agy7eWqvBuyy2ksO4jSKCDX mOTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0QtzySXEwOv+QugdOlLF+0o6/UOj9Afwc00C6+xUCOg=; b=DRrWdQUarNrm1YGSzAY66AYut6DmYGKIZI/WZAxXKfiFEwxB2824ffSxtJX0KkjqJl Ld3f1ZjBL86fZtTTb9i14cXLOGsTohgkqV3jG2JBShzVUvOrGZVb/HmXSsFvOaHoCZYv 2UPvuA5hm6P2DIe57ecxcWPTKDsKQzXccTFmGhaX0Kc0Zhv4Obm1snU5iuLImC5/61G9 oP40WqM/2XWCGaBVZi3t3q0bQxsLE0uRoezyPhgtlsyHxgNA0vqP4o+RBcsiO8eAzZqZ YKx/UuzEYHK4Zm4SwITsXmWS5VGBTgvdFsUGmtXpcurHFjyYq2lg0D5ubsgf+gdqVLhm RwWA== X-Gm-Message-State: ALQs6tAUEwnUlWz03YhF/qP8nnzMYD7mgBWiP2uvrDgqBD+RbFqxneHG tRiSk0q/N9BuybMcCWAfOwhQRYtcgSVhfXiSesdR+A== X-Google-Smtp-Source: AB8JxZrsqYVcvALaNEFTJyzJYhbiI7AeKNO/ovAl+fuGJIiS/go6HJzIoQ/St8ndAp2Gp5Uvd5qTBlPnFEa2YetcAek= X-Received: by 2002:a6b:5a0d:: with SMTP id o13-v6mr31021120iob.39.1525474981528; Fri, 04 May 2018 16:03:01 -0700 (PDT) MIME-Version: 1.0 References: <201805042241.w44MfC9E090893@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 04 May 2018 23:02:50 +0000 Message-ID: Subject: Re: svn commit: r333266 - head/sys/amd64/amd64 To: Steven Hartland Cc: Mateusz Guzik , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2018 23:03:03 -0000 While i wholeheartedly agree, an earlier commit explained why in this case. It allows the compiler to inline for small copies. Warner On Fri, May 4, 2018, 4:58 PM Steven Hartland < steven.hartland@multiplay.co.uk> wrote: > Can we get the why in commit messages please? > > This sort of message doesnt provide anything more that can be obtained > from reading the diff, which just leaves us wondering why? > > I=E2=80=99m sure there is a good reason, but without confirmation we=E2= =80=99re just left > guessing. The knock on to this is if some assumption that caused the why > changes, anyone looking at this will not be able to make an informed > descision that that was the case. > > On Fri, 4 May 2018 at 23:41, Mateusz Guzik wrote: > >> Author: mjg >> Date: Fri May 4 22:41:12 2018 >> New Revision: 333266 >> URL: https://svnweb.freebsd.org/changeset/base/333266 >> >> Log: >> amd64: syscall path bcopy -> memcpy >> >> Modified: >> head/sys/amd64/amd64/trap.c >> >> Modified: head/sys/amd64/amd64/trap.c >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/amd64/amd64/trap.c Fri May 4 22:33:54 2018 (r333265= ) >> +++ head/sys/amd64/amd64/trap.c Fri May 4 22:41:12 2018 (r333266= ) >> @@ -908,7 +908,7 @@ cpu_fetch_syscall_args(struct thread *td) >> error =3D 0; >> argp =3D &frame->tf_rdi; >> argp +=3D reg; >> - bcopy(argp, sa->args, sizeof(sa->args[0]) * 6); >> + memcpy(sa->args, argp, sizeof(sa->args[0]) * 6); >> if (sa->narg > regcnt) { >> KASSERT(params !=3D NULL, ("copyin args with no params!"= )); >> error =3D copyin(params, &sa->args[regcnt], >> >>