diff --git a/.github/workflows/one-line-cr-bot.yml b/.github/workflows/one-line-cr-bot.yml index c870d4d4350d..597376d62f46 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,8 +52,8 @@ 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 - BUILD_COMMAND: "make xen -B -j 2" + BASE_COMMIT: "compare/master" # 'compare' is the name of the remote to use + 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 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);