From owner-svn-ports-head@freebsd.org Sun Aug 13 22:35:20 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 554C3DDF8A1; Sun, 13 Aug 2017 22:35:20 +0000 (UTC) (envelope-from ultima@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F9C4217E; Sun, 13 Aug 2017 22:35:20 +0000 (UTC) (envelope-from ultima@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7DMZJL0005847; Sun, 13 Aug 2017 22:35:19 GMT (envelope-from ultima@FreeBSD.org) Received: (from ultima@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7DMZIr1005839; Sun, 13 Aug 2017 22:35:18 GMT (envelope-from ultima@FreeBSD.org) Message-Id: <201708132235.v7DMZIr1005839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ultima set sender to ultima@FreeBSD.org using -f From: Richard Gallamore Date: Sun, 13 Aug 2017 22:35:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r447922 - in head/security: . highwayhash highwayhash/files X-SVN-Group: ports-head X-SVN-Commit-Author: ultima X-SVN-Commit-Paths: in head/security: . highwayhash highwayhash/files X-SVN-Commit-Revision: 447922 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Aug 2017 22:35:20 -0000 Author: ultima Date: Sun Aug 13 22:35:18 2017 New Revision: 447922 URL: https://svnweb.freebsd.org/changeset/ports/447922 Log: Strong (well-distributed and unpredictable) hashes: * Portable implementation of SipHash * HighwayHash, a 5x faster SIMD hash with security claims WWW: https://github.com/google/highwayhash PR: 219232 Submitted by: Yuri Victorovich (maintainer) Reviewed by: matthew (mentor) Approved by: matthew (mentor) Differential Revision: https://reviews.freebsd.org/D12002 Added: head/security/highwayhash/ head/security/highwayhash/Makefile (contents, props changed) head/security/highwayhash/distinfo (contents, props changed) head/security/highwayhash/files/ head/security/highwayhash/files/patch-highwayhash_os__specific.cc (contents, props changed) head/security/highwayhash/pkg-descr (contents, props changed) head/security/highwayhash/pkg-plist (contents, props changed) head/security/highwayhash/tags (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Sun Aug 13 22:34:00 2017 (r447921) +++ head/security/Makefile Sun Aug 13 22:35:18 2017 (r447922) @@ -209,6 +209,7 @@ SUBDIR += hashcat SUBDIR += hashcat-legacy SUBDIR += heimdal + SUBDIR += highwayhash SUBDIR += hitch SUBDIR += hlfl SUBDIR += hmap Added: head/security/highwayhash/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/highwayhash/Makefile Sun Aug 13 22:35:18 2017 (r447922) @@ -0,0 +1,37 @@ +# Created by: Yuri Victorovich +# $FreeBSD$ + +PORTNAME= highwayhash +PORTVERSION= g20170512 +CATEGORIES= security + +MAINTAINER= yuri@rawbw.com +COMMENT= Fast strong hash functions: SipHash/HighwayHash + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +ONLY_FOR_ARCHS= amd64 arm64 powerpc powerpc64 +ONLY_FOR_ARCHS_REASON= Assembly is implemented only for specific architectures in highwayhash/tsc_timer.h + +USES= gmake +USE_GITHUB= yes +GH_ACCOUNT= google +GH_TAGNAME= 2b666ae +USE_LDCONFIG= yes + +post-patch: + # Install flags upstream issue: https://github.com/google/highwayhash/issues/58 + @${REINPLACE_CMD} -e '\ + s|LIBDIR|XLIBDIR|; \ + s| -O3||; \ + s|install -m0755 high|${INSTALL_DATA} high|; \ + s|install -m0755 lib|${INSTALL_LIB} lib|' \ + ${WRKSRC}/Makefile + +post-install: + # Symlink upstream issue: https://github.com/google/highwayhash/issues/57 + ${RM} ${STAGEDIR}${PREFIX}/lib/libhighwayhash.so + ${LN} -s libhighwayhash.so.0 ${STAGEDIR}${PREFIX}/lib/libhighwayhash.so + +.include Added: head/security/highwayhash/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/highwayhash/distinfo Sun Aug 13 22:35:18 2017 (r447922) @@ -0,0 +1,3 @@ +TIMESTAMP = 1502493406 +SHA256 (google-highwayhash-g20170512-2b666ae_GH0.tar.gz) = 294320a52169a3365818b98c7ee8438583d9f627ec84e4b61f2cb94f86796a73 +SIZE (google-highwayhash-g20170512-2b666ae_GH0.tar.gz) = 139398 Added: head/security/highwayhash/files/patch-highwayhash_os__specific.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/highwayhash/files/patch-highwayhash_os__specific.cc Sun Aug 13 22:35:18 2017 (r447922) @@ -0,0 +1,64 @@ +--- highwayhash/os_specific.cc.orig 2017-05-08 14:09:02 UTC ++++ highwayhash/os_specific.cc +@@ -40,6 +40,16 @@ + #define OS_LINUX 0 + #endif + ++#ifdef __FreeBSD__ ++#define OS_FREEBSD 1 ++#include ++#include ++#include ++#include ++#else ++#define OS_FREEBSD 0 ++#endif ++ + #ifdef __MACH__ + #define OS_MAC 1 + #include +@@ -134,6 +144,10 @@ ThreadAffinity* GetThreadAffinity() { + const int err = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, pid, + sizeof(cpuset_t), &affinity->set); + CHECK(err == 0); ++#elif OS_FREEBSD ++ const pid_t pid = 0; // current thread ++ const int err = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, pid, sizeof(cpuset_t), &affinity->set); ++ CHECK(err == 0); + #endif + return affinity; + } +@@ -165,6 +179,10 @@ void SetThreadAffinity(ThreadAffinity* a + const int err = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, pid, + sizeof(cpuset_t), &affinity->set); + CHECK(err == 0); ++#elif OS_FREEBSD ++ const pid_t pid = 0; // current thread ++ const int err = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, pid, sizeof(cpuset_t), &affinity->set); ++ CHECK(err == 0); + #else + #error "port" + #endif +@@ -192,6 +210,12 @@ std::vector AvailableCPUs() { + cpus.push_back(cpu); + } + } ++#elif OS_FREEBSD ++ for (size_t cpu = 0; cpu < sizeof(cpuset_t) * 8; ++cpu) { ++ if (CPU_ISSET(cpu, &affinity->set)) { ++ cpus.push_back(cpu); ++ } ++ } + #else + #error "port" + #endif +@@ -208,6 +232,9 @@ void PinThreadToCPU(const int cpu) { + #elif OS_FREEBSD + CPU_ZERO(&affinity.set); + CPU_SET(cpu, &affinity.set); ++#elif OS_FREEBSD ++ CPU_ZERO(&affinity.set); ++ CPU_SET(cpu, &affinity.set); + #else + #error "port" + #endif Added: head/security/highwayhash/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/highwayhash/pkg-descr Sun Aug 13 22:35:18 2017 (r447922) @@ -0,0 +1,5 @@ +Strong (well-distributed and unpredictable) hashes: +* Portable implementation of SipHash +* HighwayHash, a 5x faster SIMD hash with security claims + +WWW: https://github.com/google/highwayhash Added: head/security/highwayhash/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/highwayhash/pkg-plist Sun Aug 13 22:35:18 2017 (r447922) @@ -0,0 +1,32 @@ +include/highwayhash/arch_specific.h +include/highwayhash/c_bindings.h +include/highwayhash/compiler_specific.h +include/highwayhash/data_parallel.h +include/highwayhash/endianess.h +include/highwayhash/hh_avx2.h +include/highwayhash/hh_buffer.h +include/highwayhash/hh_portable.h +include/highwayhash/hh_sse41.h +include/highwayhash/hh_types.h +include/highwayhash/highwayhash.h +include/highwayhash/highwayhash_target.h +include/highwayhash/highwayhash_test_target.h +include/highwayhash/iaca.h +include/highwayhash/instruction_sets.h +include/highwayhash/load3.h +include/highwayhash/nanobenchmark.h +include/highwayhash/os_specific.h +include/highwayhash/profiler.h +include/highwayhash/robust_statistics.h +include/highwayhash/scalar.h +include/highwayhash/scalar_sip_tree_hash.h +include/highwayhash/sip_hash.h +include/highwayhash/sip_tree_hash.h +include/highwayhash/state_helpers.h +include/highwayhash/tsc_timer.h +include/highwayhash/vector128.h +include/highwayhash/vector256.h +include/highwayhash/vector_test_target.h +lib/libhighwayhash.a +lib/libhighwayhash.so +lib/libhighwayhash.so.0 Added: head/security/highwayhash/tags ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/highwayhash/tags Sun Aug 13 22:35:18 2017 (r447922) @@ -0,0 +1,15 @@ +!_TAG_FILE_SORTED 2 /0=unsorted, 1=sorted, 2=foldcase/ +CATEGORIES /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^CATEGORIES= security$/;" m language:Make +COMMENT /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^COMMENT= Fast strong hash functions: SipHash\/HighwayHash$/;" m language:Make +GH_ACCOUNT /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^GH_ACCOUNT= google$/;" m language:Make +GH_TAGNAME /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^GH_TAGNAME= 2b666ae$/;" m language:Make +LICENSE /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^LICENSE= APACHE20$/;" m language:Make +LICENSE_FILE /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^LICENSE_FILE= ${WRKSRC}\/LICENSE$/;" m language:Make +MAINTAINER /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^MAINTAINER= yuri@rawbw.com$/;" m language:Make +ONLY_FOR_ARCHS /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^ONLY_FOR_ARCHS= amd64 arm64 powerpc powerpc64$/;" m language:Make +ONLY_FOR_ARCHS_REASON /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^ONLY_FOR_ARCHS_REASON= Assembly is implemented only for specific architectures in highwayhash\/tsc_timer.h$/;" m language:Make +PORTNAME /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^PORTNAME= highwayhash$/;" m language:Make +PORTVERSION /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^PORTVERSION= g20170512$/;" m language:Make +USES /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^USES= gmake$/;" m language:Make +USE_GITHUB /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^USE_GITHUB= yes$/;" m language:Make +USE_LDCONFIG /usr/home/ricky/FreeBSD/ports/security/highwayhash/Makefile /^USE_LDCONFIG= yes$/;" m language:Make