From owner-svn-src-head@freebsd.org Fri Oct 2 01:18:24 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 6E5293F1429; Fri, 2 Oct 2020 01:18:24 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (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 4C2XDw057Jz3xwF; Fri, 2 Oct 2020 01:18:23 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-qv1-f47.google.com with SMTP id h1so574041qvo.9; Thu, 01 Oct 2020 18:18:23 -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=cE6iu62sJxzfEwMjKi66gsfH/tjsLUY/LrvKpIBoLOw=; b=BArDW+wqThduFuHGG4c+XcfHSYKed6r4Y9EoRdTSOT7G7RmjRkQJZSg3OVuNl0ttvD DnLW8kAT1Hq/+4tuD1Hds/nSHb0oAl+BOU8tAFAP6YIQE2qnGwXIqyF6kR1q/q01yKiM wxT0b9fLPWTNEmneZqocwD3DKcI038jZclFIdbRpTtzU2dHoZvengOyvhH+0WXOBCim9 4tRPz3sg3R1+eXoBVfi/TWFN1jmhyi9Fha1jIUelTe4CqWagQPuthbIwxyRnRiKczBap 9jm51k14jLopueTidph+DfTnjZiCufufXVz2ym1hnqXHR56678rl+b9U6uw+SpnbEido JKKw== X-Gm-Message-State: AOAM5317Irm6l7eTOqBCmzSHafeMgAQtTBnc6N/Pc3LyYG0nAhfSNxDd OiHHeVmS/UYqFnzboRWCSfS5l37vsSM= X-Google-Smtp-Source: ABdhPJwyKeqNoaCRLz4p2KKcKI9+pJhTvGN2vXb66FlqwO8H7LSmofxMsRKfJUbVXd7Z1OhWC7oRqg== X-Received: by 2002:a0c:a162:: with SMTP id d89mr10874128qva.28.1601601502724; Thu, 01 Oct 2020 18:18:22 -0700 (PDT) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com. [209.85.160.179]) by smtp.gmail.com with ESMTPSA id 7sm46638qkh.60.2020.10.01.18.18.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Oct 2020 18:18:22 -0700 (PDT) Received: by mail-qt1-f179.google.com with SMTP id d1so1104461qtr.6; Thu, 01 Oct 2020 18:18:22 -0700 (PDT) X-Received: by 2002:ac8:3f3d:: with SMTP id c58mr101107qtk.53.1601601502031; Thu, 01 Oct 2020 18:18:22 -0700 (PDT) MIME-Version: 1.0 References: <202010012105.091L5pAn099334@repo.freebsd.org> In-Reply-To: <202010012105.091L5pAn099334@repo.freebsd.org> From: Kyle Evans Date: Thu, 1 Oct 2020 20:18:11 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r366344 - in head: lib/libmd sys/crypto/skein/amd64 To: Ed Maste Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4C2XDw057Jz3xwF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] 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:18:24 -0000 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 replace 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 replace with assembly: 256+512+1024 = 1792 > +.endif > .if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) || exists(${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. Thanks, Kyle Evans