diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75ecbb33..bbd69a96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,11 +10,11 @@ on: - 'master' tags: - - '*' + - "*" pull_request: branches: - - '*' + - "*" jobs: build_linux: @@ -22,10 +22,10 @@ jobs: fail-fast: false matrix: image: - - { name: 'ubuntu', tag: '20.04' } + - { name: 'ubuntu', tag: '22.04' } llvm: ['15'] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: image: ghcr.io/lifting-bits/cxx-common/vcpkg-builder-${{ matrix.image.name }}:${{ matrix.image.tag }} credentials: @@ -165,7 +165,7 @@ jobs: release_packages: # Do not run the release procedure if any of the builds has failed needs: [ build_linux, build_mac ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') steps: @@ -200,13 +200,13 @@ jobs: - name: Group the packages by platform run: | - zip -r9 remill_ubuntu-20.04_packages.zip \ - ubuntu-20.04* + zip -r9 remill_ubuntu-22.04_packages.zip \ + ubuntu-22.04* zip -r9 remill_macos-11_packages.zip \ macos-11* - - name: Upload the Ubuntu 20.04 packages + - name: Upload the Ubuntu 22.04 packages uses: actions/upload-release-asset@v1 env: @@ -214,8 +214,8 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: remill_ubuntu-20.04_packages.zip - asset_name: remill_ubuntu-20.04_packages.zip + asset_path: remill_ubuntu-22.04_packages.zip + asset_name: remill_ubuntu-22.04_packages.zip asset_content_type: application/gzip - name: Upload the macOS 11 packages @@ -236,7 +236,7 @@ jobs: strategy: matrix: llvm: ["15"] - ubuntu: ["20.04"] + ubuntu: ["22.04"] steps: - uses: actions/checkout@v2 - name: Build LLVM ${{ matrix.llvm }} on ${{ matrix.ubuntu }} diff --git a/Dockerfile b/Dockerfile index 5dc90585..da863f7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Choose your LLVM version ARG LLVM_VERSION=15 ARG ARCH=amd64 -ARG UBUNTU_VERSION=20.04 +ARG UBUNTU_VERSION=22.04 ARG DISTRO_BASE=ubuntu${UBUNTU_VERSION} ARG BUILD_BASE=ubuntu:${UBUNTU_VERSION} ARG LIBRARIES=/opt/trailofbits diff --git a/README.md b/README.md index 8ad498df..a2052b97 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ If you are experiencing undocumented problems with Remill then ask for help in t ## Supported Platforms -Remill is supported on Linux platforms and has been tested on Ubuntu 20.04. Remill also works on macOS, and has experimental support for Windows. +Remill is supported on Linux platforms and has been tested on Ubuntu 22.04. Remill also works on macOS, and has experimental support for Windows. Remill's Linux version can also be built via Docker for quicker testing. @@ -55,7 +55,7 @@ Remill now comes with a Dockerfile for easier testing. This Dockerfile reference The Dockerfile allows for quick builds of multiple supported LLVM, architecture, and Linux configurations. -Quickstart (builds Remill against LLVM 15 on Ubuntu 20.04 for AMD64): +Quickstart (builds Remill against LLVM 15 on Ubuntu 22.04 for AMD64): Clone Remill: ```shell @@ -69,7 +69,7 @@ Build Remill Docker container: # do the build docker build . -t remill \ -f Dockerfile \ - --build-arg UBUNTU_VERSION=20.04 \ + --build-arg UBUNTU_VERSION=22.04 \ --build-arg ARCH=amd64 \ --build-arg LLVM_VERSION=15 ``` diff --git a/lib/BC/TraceLifter.cpp b/lib/BC/TraceLifter.cpp index 3e29709a..c53c5a2f 100644 --- a/lib/BC/TraceLifter.cpp +++ b/lib/BC/TraceLifter.cpp @@ -240,14 +240,7 @@ bool TraceLifter::Lift( // Lift one or more traces starting from `addr`. bool TraceLifter::Impl::Lift( - uint64_t addr_, std::function callback) { - auto addr = addr_ & addr_mask; - if (addr < addr_) { // Address is out of range. - LOG(ERROR) << "Trace address " << std::hex << addr_ << " is too big" - << std::dec; - return false; - } - + uint64_t addr, std::function callback) { // Reset the lifting state. trace_work_list.clear(); inst_work_list.clear(); diff --git a/scripts/build.sh b/scripts/build.sh index 6736233c..2b72a262 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -37,17 +37,22 @@ function GetUbuntuOSVersion source /etc/lsb-release case "${DISTRIB_CODENAME}" in - groovy) - echo "[!] Ubuntu 20.10 is not supported; using libraries for Ubuntu 20.04 instead" - OS_VERSION=ubuntu-20.04 + lunar) + echo "[!] Ubuntu 23.04 is not supported; using libraries for Ubuntu 22.04 instead" + OS_VERSION=ubuntu-22.04 return 0 ;; - focal) - OS_VERSION=ubuntu-20.04 + kinetic) + echo "[!] Ubuntu 22.10 is not supported; using libraries for Ubuntu 22.04 instead" + OS_VERSION=ubuntu-22.04 + return 0 + ;; + jammy) + OS_VERSION=ubuntu-22.04 return 0 ;; *) - echo "[x] Ubuntu ${DISTRIB_CODENAME} is not supported. Only xenial (16.04) and trusty (14.04) are supported." + echo "[x] Ubuntu ${DISTRIB_CODENAME} is not supported. Only jammy (22.04) is supported." return 1 ;; esac @@ -122,17 +127,17 @@ function GetOSVersion ;; *debian*) - OS_VERSION=ubuntu-20.04 + OS_VERSION=ubuntu-22.04 return 0 ;; *arch*) - OS_VERSION=ubuntu-20.04 + OS_VERSION=ubuntu-22.04 return 0 ;; [Kk]ali) - OS_VERSION=ubuntu-20.04 + OS_VERSION=ubuntu-22.04 return 0; ;;