Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#5505 kernel memtrace: Add submodule libipt & Initialize submodules all the time #5518

Merged
merged 8 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci-aarchxx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:

dolanzhao marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down Expand Up @@ -121,6 +123,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down Expand Up @@ -186,6 +190,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down Expand Up @@ -250,6 +256,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Fetch Sources
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ci-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true
dolanzhao marked this conversation as resolved.
Show resolved Hide resolved

- name: Fetch Sources
run: |
Expand Down Expand Up @@ -160,6 +162,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Fetch Sources
run: |
Expand Down Expand Up @@ -246,6 +250,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Fetch Sources
run: |
Expand Down Expand Up @@ -332,6 +338,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Fetch Sources
run: |
Expand Down Expand Up @@ -419,6 +427,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Fetch Sources
run: |
Expand Down Expand Up @@ -516,6 +526,8 @@ jobs:
steps:
# We need a checkout to run git log for the version.
- uses: actions/checkout@v2
with:
submodules: true

- name: Get Version
id: version
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down Expand Up @@ -122,6 +124,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down Expand Up @@ -187,6 +191,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:
# https://github.com/actions/checkout
steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down Expand Up @@ -138,6 +140,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "third_party/libipt"]
path = third_party/libipt
url = https://github.com/intel/libipt.git
dolanzhao marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion api/docs/building.dox
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To build DynamoRIO on Linux, use the following commands as a guide. This builds
# other distributions (in particular, use "cmake3" for Ubuntu Trusty).
$ sudo apt-get install cmake g++ g++-multilib doxygen git zlib1g-dev libunwind-dev libsnappy-dev liblz4-dev
# Get sources.
$ git clone https://github.com/DynamoRIO/dynamorio.git
$ git clone --recursive https://github.com/DynamoRIO/dynamorio.git
dolanzhao marked this conversation as resolved.
Show resolved Hide resolved
# Make a separate build directory. Building in the source directory is not
# supported.
$ cd dynamorio && mkdir build && cd build
Expand Down
3 changes: 3 additions & 0 deletions make/git/devsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
# Developers should run this script once in each repository
# immediately after cloning.

# Set up submodules
git submodule update --init --recursive

# Convert CRLF to LF on commit but not checkout:
git config core.autocrlf input

Expand Down
6 changes: 5 additions & 1 deletion make/git/git_pullall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ has_remote=$(git ls-remote origin ${branch})
if test -z "${has_remote}"; then
echo "No remote: updating with rebase from master."
git pull --rebase --prune
echo -e "\nNow, updating submodules."
git submodule update --init --recursive
else
dolanzhao marked this conversation as resolved.
Show resolved Hide resolved
echo "First, updating with rebase from remote ${branch}."
git pull --rebase origin ${branch}
echo -e "\nNow, merging changes from master."
echo -e "\nSecond, merging changes from master."
git pull --no-rebase --prune
echo -e "\nNow, updating submodules."
git submodule update --init --recursive
fi
29 changes: 29 additions & 0 deletions make/git/hook-pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,33 @@ if [ -z "${existing}" ]; then
printf "Please double-check that it is configured properly.\n"
fi

# XXX: L63-L87 are a verbatim copy from drmemory/make/git/hook-pre-commit.sh.
dolanzhao marked this conversation as resolved.
Show resolved Hide resolved
# In the future, we may need to create a separate dedicated repository,
# a submodule in both that provides shared config files.
# Prevent mistaken submodule commits by checking whether committing
# submodule + other stuff and if so bail if the submodule version is older.
# We want to allow a submodule-only rollback.
# XXX: this relies on several unix utilities which we assume are available
# on Windows.
dolanzhao marked this conversation as resolved.
Show resolved Hide resolved
libipt_diff=`git diff --cached third_party/libipt`
if ! test -z "$libipt_diff" ; then
# third_party/libipt submodule is changed in the diff
others=`git diff --cached --name-only | grep -v third_party/libipt`
if ! test -z "$libipt_diff" ; then
# There's at least one other change. Let's run git log on
# oldhash..newhash to see which is newer.
range=`git diff --cached third_party/libipt | grep Subproject | awk '{print $NF}' | xargs | sed 's/ /../'`
between=`cd third_party/libipt && git log --pretty=oneline $range`
if test -z "$between" ; then
exec 1>&2
cat <<\EOF
Error: the third_party/libipt submodule is being rolled back.
This is likely a mistake: did you pull but not run git submodule update?
Aborting commit.
EOF
exit 1
fi
fi
fi

# XXX: move code style checks here from runsuite.cmake?
1 change: 1 addition & 0 deletions third_party/libipt
Submodule libipt added at c848a8