From owner-svn-ports-all@freebsd.org Mon Jul 23 03:19:28 2018 Return-Path: Delivered-To: svn-ports-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 7E9F1103BF13; Mon, 23 Jul 2018 03:19:28 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A5D290BF9; Mon, 23 Jul 2018 03:19:28 +0000 (UTC) (envelope-from yuri@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0842317051; Mon, 23 Jul 2018 03:19:28 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6N3JRpe075404; Mon, 23 Jul 2018 03:19:27 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6N3JQ8R075376; Mon, 23 Jul 2018 03:19:26 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <201807230319.w6N3JQ8R075376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Mon, 23 Jul 2018 03:19:26 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r475144 - in head/security: . klee klee/files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/security: . klee klee/files X-SVN-Commit-Revision: 475144 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2018 03:19:28 -0000 Author: yuri Date: Mon Jul 23 03:19:26 2018 New Revision: 475144 URL: https://svnweb.freebsd.org/changeset/ports/475144 Log: New port: security/klee: Symbolic virtual machine built on top of the LLVM PR: 219150 Submitted by: larca Added: head/security/klee/ head/security/klee/Makefile (contents, props changed) head/security/klee/distinfo (contents, props changed) head/security/klee/files/ head/security/klee/files/patch-CMakeLists.txt (contents, props changed) head/security/klee/files/patch-cmake_find__stp.cmake (contents, props changed) head/security/klee/files/patch-lib_Core_Executor.cpp (contents, props changed) head/security/klee/pkg-descr (contents, props changed) head/security/klee/pkg-plist (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Mon Jul 23 03:19:25 2018 (r475143) +++ head/security/Makefile Mon Jul 23 03:19:26 2018 (r475144) @@ -309,6 +309,7 @@ SUBDIR += kgpg SUBDIR += kgpg-kde4 SUBDIR += kickpass + SUBDIR += klee SUBDIR += kleopatra SUBDIR += knock SUBDIR += knocker Added: head/security/klee/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/klee/Makefile Mon Jul 23 03:19:26 2018 (r475144) @@ -0,0 +1,49 @@ +# $FreeBSD$ + +PORTNAME= klee +DISTVERSIONPREFIX= v +DISTVERSION= 1.4.0-191 +DISTVERSIONSUFFIX= -g79ac709 +CATEGORIES= security devel + +MAINTAINER= itbot@bk.ru +COMMENT= Symbolic virtual machine built on top of the LLVM + +LICENSE= NCSA +LICENSE_FILE= ${WRKSRC}/LICENSE.TXT + +BUILD_DEPENDS= llvm-config${LLVM_VERSION}:devel/llvm${LLVM_VERSION} \ + gmake:devel/gmake + +LLVM_VERSION= 38 # the latest llvm version that the master branch (79ac709) currently supports + +USES= cmake:outsource localbase pkgconfig python:run shebangfix +USE_GITHUB= yes +SHEBANG_FILES= tools/klee-stats/klee-stats tools/ktest-tool/ktest-tool +USE_LDCONFIG= yes + +CMAKE_OFF= ENABLE_POSIX_RUNTIME ENABLE_UNIT_TESTS ENABLE_SYSTEM_TESTS +CMAKE_ARGS= -DLLVM_CONFIG_BINARY=${LOCALBASE}/bin/llvm-config${LLVM_VERSION} \ + -DMAKE_BINARY=${LOCALBASE}/bin/gmake \ + -DFREEBSD_STP_STATIC_LIBRARY:STRING=${LOCALBASE}/lib/libstp.a + +OPTIONS_DEFINE= TCMALLOC +OPTIONS_SINGLE= SOLVER +OPTIONS_SINGLE_SOLVER= Z3 STP # TODO METASMT +OPTIONS_DEFAULT= TCMALLOC Z3 +SOLVER_DESC= Solver: Use the + +TCMALLOC_DESC= Use tcmalloc library for memory management +TCMALLOC_CMAKE_BOOL= ENABLE_TCMALLOC +TCMALLOC_LIB_DEPENDS= libtcmalloc.so:devel/google-perftools + +Z3_DESC= Z3 SMT solver +Z3_CMAKE_BOOL= ENABLE_SOLVER_Z3 +Z3_BUILD_DEPENDS= z3:math/z3 +Z3_RUN_DEPENDS= z3:math/z3 + +STP_DESC= STP SMT solver +STP_CMAKE_BOOL= ENABLE_SOLVER_STP +STP_BUILD_DEPENDS= stp>0:math/stp + +.include Added: head/security/klee/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/klee/distinfo Mon Jul 23 03:19:26 2018 (r475144) @@ -0,0 +1,3 @@ +TIMESTAMP = 1532277676 +SHA256 (klee-klee-v1.4.0-191-g79ac709_GH0.tar.gz) = 92d57d88967e5615d5c806e52a427180b3ccd95a5b018c0bfab3e895b8b13111 +SIZE (klee-klee-v1.4.0-191-g79ac709_GH0.tar.gz) = 969253 Added: head/security/klee/files/patch-CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/klee/files/patch-CMakeLists.txt Mon Jul 23 03:19:26 2018 (r475144) @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2018-07-12 22:25:49 UTC ++++ CMakeLists.txt +@@ -412,7 +412,7 @@ endif() + ################################################################################ + # Detect libcap + ################################################################################ +-check_include_file("sys/capability.h" HAVE_SYS_CAPABILITY_H) ++#check_include_file("sys/capability.h" HAVE_SYS_CAPABILITY_H) + if (HAVE_SYS_CAPABILITY_H) + find_library(LIBCAP_LIBRARIES + NAMES cap Added: head/security/klee/files/patch-cmake_find__stp.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/klee/files/patch-cmake_find__stp.cmake Mon Jul 23 03:19:26 2018 (r475144) @@ -0,0 +1,11 @@ +--- cmake/find_stp.cmake.orig 2018-07-12 22:25:49 UTC ++++ cmake/find_stp.cmake +@@ -13,6 +13,8 @@ + # is displayed in `ccmake` and `cmake-gui`. + set(STP_DIR "" CACHE PATH "Path to directory containing STPConfig.cmake") + find_package(STP CONFIG) ++SET(STP_STATIC_LIBRARY ${FREEBSD_STP_STATIC_LIBRARY}) ++MESSAGE("YURI STP_STATIC_LIBRARY=${STP_STATIC_LIBRARY}") + + # Set the default so that if the following is true: + # * STP was found Added: head/security/klee/files/patch-lib_Core_Executor.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/klee/files/patch-lib_Core_Executor.cpp Mon Jul 23 03:19:26 2018 (r475144) @@ -0,0 +1,11 @@ +--- lib/Core/Executor.cpp.orig 2018-07-22 16:43:34 UTC ++++ lib/Core/Executor.cpp +@@ -3885,7 +3885,7 @@ void Executor::prepareForEarlyExit() { + + /// Returns the errno location in memory + int *Executor::getErrnoLocation(const ExecutionState &state) const { +-#ifndef __APPLE__ ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + /* From /usr/include/errno.h: it [errno] is a per-thread variable. */ + return __errno_location(); + #else Added: head/security/klee/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/klee/pkg-descr Mon Jul 23 03:19:26 2018 (r475144) @@ -0,0 +1,19 @@ +KLEE is a symbolic virtual machine built on top of the LLVM compiler +infrastructure. + +Currently, there are two primary components: +* The core symbolic virtual machine engine; this is responsible for executing + LLVM bitcode modules with support for symbolic values. This is comprised of + the code in lib/. +* A POSIX/Linux emulation layer oriented towards supporting uClibc, with + additional support for making parts of the operating system environment + symbolic. + +Additionally, there is a simple library for replaying computed inputs on native +code (for closed programs). There is also a more complicated infrastructure for +replaying the inputs generated for the POSIX/Linux emulation layer, which +handles running native programs in an environment that matches a computed test +input, including setting up files, pipes, environment variables, and passing +command line arguments. + +WWW: https://klee.github.io/ Added: head/security/klee/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/klee/pkg-plist Mon Jul 23 03:19:26 2018 (r475144) @@ -0,0 +1,11 @@ +bin/gen-random-bout +bin/kleaver +bin/klee +bin/klee-stats +bin/ktest-tool +include/klee/klee.h +lib/klee/runtime/libklee-libc.bca +lib/klee/runtime/libkleeRuntimeFreeStanding.bca +lib/klee/runtime/libkleeRuntimeIntrinsic.bca +lib/libkleeRuntest.so +lib/libkleeRuntest.so.1.0