From owner-svn-src-head@freebsd.org Fri Oct 2 01:31:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EC263F18DD; Fri, 2 Oct 2020 01:31:52 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2XXQ4zCQz3ykH; Fri, 2 Oct 2020 01:31:50 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-qt1-f180.google.com with SMTP id v54so1128236qtj.7; Thu, 01 Oct 2020 18:31:50 -0700 (PDT) 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=h72Vypx/9tkJvMS8AkgVAeAuD8i4OfhBPJojNUq7dzw=; b=lkrfQ2Z0Jgp/yi/HF39qRYAITxtx6KNhQPaKjFAkA/P7hgaRIWW/BK6nKfnJHFBo1r q/5SuZvi+RoxVKjuVn6L8xTR18XQM9lWXNufihfRNdsGUr3NYKYLp+uivR3ilbmUotG1 hd3TUFUo52QGcH0zu8zgj1HybYu5xAkLG18ZcQRm9kopPYtOWegNz7DLWJhTe5tQRchh 67VHtmNVhooy41Hb3lc+IMvpcvPy2ggqK13Q4TgeZa3492MUmkj64vQ629PiJiKhCZlC o3XpLjOUwJVQ/XHwuk+M4868IJYq4N5d3gmMKTOSAjn6yCiKMw6FzWb6gCccw915ZftW 2VXw== X-Gm-Message-State: AOAM532Wph7TGytxgASBdcLdnQNXHqzJjk5csQleGX0KiXqMOufS7xBn CZmDWpf+aFu/U1EHa0pyhUF+6Ut55Dc= X-Google-Smtp-Source: ABdhPJwTdxopPZFObXNwQZj+RfwdoDEuOK7jft75pO09S3107dkDxAMZfC4Mxb1eByWuw6oMds2I4w== X-Received: by 2002:ac8:7c8f:: with SMTP id y15mr161554qtv.288.1601602309529; Thu, 01 Oct 2020 18:31:49 -0700 (PDT) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com. [209.85.222.179]) by smtp.gmail.com with ESMTPSA id 8sm76940qkd.47.2020.10.01.18.31.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Oct 2020 18:31:49 -0700 (PDT) Received: by mail-qk1-f179.google.com with SMTP id w16so538962qkj.7; Thu, 01 Oct 2020 18:31:49 -0700 (PDT) X-Received: by 2002:a05:620a:136e:: with SMTP id d14mr10495406qkl.430.1601602308842; Thu, 01 Oct 2020 18:31:48 -0700 (PDT) MIME-Version: 1.0 References: <202010012105.091L5pAn099334@repo.freebsd.org> <202010020123.0921NnJU006207@slippy.cwsent.com> In-Reply-To: <202010020123.0921NnJU006207@slippy.cwsent.com> From: Kyle Evans Date: Thu, 1 Oct 2020 20:31:37 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r366344 - in head: lib/libmd sys/crypto/skein/amd64 To: Cy Schubert Cc: Ed Maste , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4C2XXQ4zCQz3ykH X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of byondlenox@gmail.com designates 209.85.160.180 as permitted sender) smtp.mailfrom=byondlenox@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[209.85.160.180:from]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-0.96)[-0.962]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[kyle-evans.net]; ARC_NA(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.993]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.180:from]; NEURAL_HAM_MEDIUM(-1.05)[-1.048]; FORGED_SENDER(0.30)[self@kyle-evans.net,byondlenox@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[self@kyle-evans.net,byondlenox@gmail.com]; TAGGED_FROM(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2020 01:31:52 -0000 On Thu, Oct 1, 2020 at 8:23 PM Cy Schubert wrote: > > In message om> > , Kyle Evans writes: > > On Thu, Oct 1, 2020 at 4:06 PM Ed Maste wrote: > > > > > > Author: emaste > > > Date: Thu Oct 1 21:05:50 2020 > > > New Revision: 366344 > > > URL: https://svnweb.freebsd.org/changeset/base/366344 > > > > > > Log: > > > libmd: fix assembly optimized skein implementation > > > > > > The assembly implementation incorrectly used logical AND instead of > > > bitwise AND. Fix, and re-enable in libmd. > > > > > > Submitted by: Yang Zhong > > > Reviewed by: cem (earlier) > > > Sponsored by: The FreeBSD Foundation > > > Differential Revision: https://reviews.freebsd.org/D26614 > > > > > > Modified: > > > head/lib/libmd/Makefile > > > head/sys/crypto/skein/amd64/skein_block_asm.S > > > > > > Modified: head/lib/libmd/Makefile > > > =========================================================================== > > === > > > --- head/lib/libmd/Makefile Thu Oct 1 20:08:27 2020 (r366343) > > > +++ head/lib/libmd/Makefile Thu Oct 1 21:05:50 2020 (r366344) > > > @@ -116,12 +116,12 @@ CFLAGS+= -DSHA1_ASM > > > SRCS+= rmd160.S > > > CFLAGS+= -DRMD160_ASM > > > .endif > > > -#.if exists(${MACHINE_ARCH}/skein_block_asm.S) > > > -## Fully unroll all loops in the assembly optimized version > > > -#ACFLAGS+= -DSKEIN_LOOP=0 > > > -#SRCS+= skein_block_asm.S > > > -#CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to re > > place with assembly: 256+512+1024 = 1792 > > > -#.endif > > > +.if exists(${MACHINE_ARCH}/skein_block_asm.S) > > > +# Fully unroll all loops in the assembly optimized version > > > +ACFLAGS+= -DSKEIN_LOOP=0 > > > +SRCS+= skein_block_asm.S > > > +CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to rep > > lace with assembly: 256+512+1024 = 1792 > > > +.endif > > > .if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) || e > > xists(${MACHINE_ARCH}/skein_block_asm.S) > > > ACFLAGS+= -DELF -Wa,--noexecstack > > > .endif > > > > > > > We need some kind of magic to walk across this for -DNO_CLEAN builds > > -- skein_block.c has no reason to get rebuilt, but we need it to > > because we're now defining SKEIN_USE_ASM=1792, which will strip out > > some symbols. > > > > I haven't had time to look into what kind of magic we can apply here, > > kind of needed to skip ahead to get this build finished for some other > > testing. > > I did rm -r for .../lib/libmd. > Yeah, either that or... touch skein_block.c or I guess in tools/build/depend-cleanup.sh we can basically: if [ -f ${OBJTOP}/lib/libmd/skein_block_asm.o ]; then if nm ${OBJTOP}/lib/libmd/skein_block.o | grep Skein_512_Process_Block; then rm ${OBJTOP}/lib/libmd/skein_block.* fi fi > Strangely it only failed in the amd64 build. Not in i386. > The optimization in question actually only applies to amd64, so this part is reasonable.