diff --git a/infra/ci/check_base_os.py b/infra/ci/check_base_os.py index 90f2ccfb2e28..37becdd8772a 100644 --- a/infra/ci/check_base_os.py +++ b/infra/ci/check_base_os.py @@ -28,7 +28,7 @@ SUPPORTED_VERSIONS = [ 'legacy', # 'ubuntu-20-04', - # 'ubuntu-24-04', + 'ubuntu-24-04', ] # A map from the base_os_version in project.yaml to the expected Dockerfile diff --git a/infra/presubmit.py b/infra/presubmit.py index 25a2d6ab2a6a..9b46c43c57eb 100755 --- a/infra/presubmit.py +++ b/infra/presubmit.py @@ -104,6 +104,7 @@ class ProjectYamlChecker: 'view_restrictions', 'file_github_issue', 'indexer', # Flags specific to infra/indexer. + 'base_os_version', ] REQUIRED_SECTIONS = ['main_repo'] diff --git a/projects/bios-bmc-smm-error-logger/Dockerfile b/projects/bios-bmc-smm-error-logger/Dockerfile new file mode 100644 index 000000000000..976be9762ae4 --- /dev/null +++ b/projects/bios-bmc-smm-error-logger/Dockerfile @@ -0,0 +1,27 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +FROM gcr.io/oss-fuzz-base/base-builder:ubuntu-24-04 + +RUN apt-get update && apt-get install --reinstall -y patchelf libboost-all-dev git python3-pip python3-venv libmount-dev libcap-dev gperf vim clang-18 libc++-18-dev lsb-release wget software-properties-common gnupg systemd make pkg-config libsystemd-dev libfmt-dev cmake ninja-build +RUN python3 -m venv /env && . /env/bin/activate && pip install meson mako inflection pyyaml jinja2 jsonschema + +ENV CC=clang-18 +ENV CXX=clang++-18 + +RUN git clone --branch fuzzing https://github.com/javanlacerda/bios-bmc-smm-error-logger +COPY build.sh $SRC/ +WORKDIR $SRC/bios-bmc-smm-error-logger diff --git a/projects/bios-bmc-smm-error-logger/build.sh b/projects/bios-bmc-smm-error-logger/build.sh new file mode 100755 index 000000000000..77ed3d2f7747 --- /dev/null +++ b/projects/bios-bmc-smm-error-logger/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash -eu +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +unset CFLAGS +unset CXXFLAGS +unset RUSTFLAGS + +rm -rf $OUT/* + +source /env/bin/activate +meson setup build -Ddefault_library=static -Dtests=disabled -Dcpp_std=c++23 -Dread-interval-ms=10000 -Dmemory-region-size=1048576 -Dmemory-region-offset=3220176896 -Dbmc-interface-version=3 -Dqueue-region-size=16384 -Due-region-size=768 -Dmagic-number-byte1=2319403398 -Dmagic-number-byte2=1343703436 -Dmagic-number-byte3=2173375339 -Dmagic-number-byte4=3360702380 --buildtype=debug -Dfuzzing=true -Dcpp_args="-stdlib=libstdc++" +ninja -C build + +cp build/src/bios-bmc-smm-error-logger_fuzzer $OUT diff --git a/projects/bios-bmc-smm-error-logger/project.yaml b/projects/bios-bmc-smm-error-logger/project.yaml new file mode 100644 index 000000000000..83d07473cb91 --- /dev/null +++ b/projects/bios-bmc-smm-error-logger/project.yaml @@ -0,0 +1,13 @@ +homepage: "https://github.com/openbmc/docs/blob/master/designs/bios-bmc-smm-error-logging.md" +language: c++ +primary_contact: "javanlacerda@google.com" +auto_ccs: + - pedroysb@google.com + +main_repo: "https://github.com/javanlacerda/bios-bmc-smm-error-logger" +fuzzing_engines: + - libfuzzer +sanitizers: + - address + +base_os_version: ubuntu-24-04