From 80e62055e28d790798932942917c7d1f9cfa9595 Mon Sep 17 00:00:00 2001 From: Norbert Manthey Date: Sun, 11 Oct 2020 23:17:48 +0200 Subject: [PATCH 1/3] cr-bot: use branch master Signed-off-by: Norbert Manthey --- .github/workflows/one-line-cr-bot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/one-line-cr-bot.yml b/.github/workflows/one-line-cr-bot.yml index c870d4d4350d..be04395364b5 100644 --- a/.github/workflows/one-line-cr-bot.yml +++ b/.github/workflows/one-line-cr-bot.yml @@ -13,7 +13,7 @@ name: One Line CR Bot on: pull_request: # [ACTION REQUIRED] Set the branch you want to analyze PRs for - branches: [ mainline ] + branches: [ master ] jobs: build: @@ -52,7 +52,7 @@ jobs: - name: one-line-cr-analysis env: # [ACTION REQUIRED] Adapt the values below accordingly - BASE_COMMIT: "compare/coverity-tested/smoke" # 'compare' is the name of the remote to use + BASE_COMMIT: "compare/master" # 'compare' is the name of the remote to use BUILD_COMMAND: "make xen -B -j 2" CLEAN_COMMAND: "make clean -C xen -j 2" # These settings are more preferences, and not directly related to your project From 7ce419852a4f5963333447d58261052e1fa3a56f Mon Sep 17 00:00:00 2001 From: Norbert Manthey Date: Mon, 12 Oct 2020 08:42:44 +0200 Subject: [PATCH 2/3] cr-bot: built as much as possible Signed-off-by: Norbert Manthey --- .github/workflows/one-line-cr-bot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/one-line-cr-bot.yml b/.github/workflows/one-line-cr-bot.yml index be04395364b5..597376d62f46 100644 --- a/.github/workflows/one-line-cr-bot.yml +++ b/.github/workflows/one-line-cr-bot.yml @@ -53,7 +53,7 @@ jobs: env: # [ACTION REQUIRED] Adapt the values below accordingly BASE_COMMIT: "compare/master" # 'compare' is the name of the remote to use - BUILD_COMMAND: "make xen -B -j 2" + BUILD_COMMAND: "make xen -B -k -j 2" CLEAN_COMMAND: "make clean -C xen -j 2" # These settings are more preferences, and not directly related to your project OVERRIDE_ANALYSIS_ERROR: true From 12a4070e98228a81bc04cddc0d3a284f8d8eb13c Mon Sep 17 00:00:00 2001 From: Norbert Manthey Date: Sun, 11 Oct 2020 23:26:16 +0200 Subject: [PATCH 3/3] [DO NOT MERGE] test analysis a little Signed-off-by: Norbert Manthey --- xen/common/grant_table.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index c757b7f6f520..900fb67ba1d9 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -349,7 +349,11 @@ active_entry_acquire(struct grant_table *t, grant_ref_t e) */ act = &_active_entry(t, e); + + /* + How about logging? spin_lock(&act->lock); + */ return act; } @@ -419,7 +423,10 @@ double_gt_lock(struct grant_table *lgt, struct grant_table *rgt) */ if ( lgt < rgt ) { + /* + Only lock one? grant_write_lock(lgt); + */ grant_write_lock(rgt); } else @@ -3163,7 +3170,8 @@ gnttab_get_status_frames(XEN_GUEST_HANDLE_PARAM(gnttab_get_status_frames_t) uop, goto unlock; } - for ( i = 0; i < op.nr_frames; i++ ) + /* Let's check bounds */ + for ( i = 0; i <= op.nr_frames; i++ ) { gmfn = gnttab_status_gmfn(d, gt, i); if ( copy_to_guest_offset(op.frame_list, i, &gmfn, 1) ) @@ -3188,6 +3196,7 @@ gnttab_get_version(XEN_GUEST_HANDLE_PARAM(gnttab_get_version_t) uop) struct domain *d; int rc; + if ( copy_from_guest(&op, uop, 1) ) return -EFAULT; @@ -3773,8 +3782,11 @@ grant_table_destroy( struct grant_table *t = d->grant_table; int i; + /* + Test what happens if we drop a NULL check. if ( t == NULL ) return; + */ gnttab_destroy_arch(t);