From: kernel test robot <lkp@intel.com>
To: Elena Petrova <lenaptr@google.com>, kvmarm@lists.cs.columbia.edu
Cc: kbuild-all@lists.01.org, Elena Petrova <lenaptr@google.com>,
linux-arm-kernel@lists.infradead.org,
open list <linux-kernel@vger.kernel.org>,
Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>,
Julien Thierry <julien.thierry.kdev@gmail.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
George Popescu <george.apopescu97@gmail.com>,
George-Aurelian Popescu <georgepope@google.com>
Subject: Re: [PATCH v2 9/9] KVM: arm64: Add UBSan tests for PKVM.
Date: Fri, 15 Jan 2021 22:30:14 +0800 [thread overview]
Message-ID: <202101152224.gofOfDHo-lkp@intel.com> (raw)
In-Reply-To: <20210114172338.2798389-10-lenaptr@google.com>
[-- Attachment #1: Type: text/plain, Size: 8410 bytes --]
Hi Elena,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on arm64/for-next/core]
[cannot apply to kvmarm/next soc/for-next arm/for-next xlnx/master v5.11-rc3 next-20210115]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Elena-Petrova/UBSan-Enablement-for-hyp-nVHE-code/20210115-112509
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/cd5e5083db55d9959f564a72bc348d83425a2838
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Elena-Petrova/UBSan-Enablement-for-hyp-nVHE-code/20210115-112509
git checkout cd5e5083db55d9959f564a72bc348d83425a2838
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm64/kvm/kvm_ubsan_buffer.c:12:
include/kvm/arm_pmu.h:52:15: warning: 'struct kvm_device_attr' declared inside parameter list will not be visible outside of this definition or declaration
52 | struct kvm_device_attr *attr);
| ^~~~~~~~~~~~~~~
include/kvm/arm_pmu.h:54:15: warning: 'struct kvm_device_attr' declared inside parameter list will not be visible outside of this definition or declaration
54 | struct kvm_device_attr *attr);
| ^~~~~~~~~~~~~~~
include/kvm/arm_pmu.h:56:15: warning: 'struct kvm_device_attr' declared inside parameter list will not be visible outside of this definition or declaration
56 | struct kvm_device_attr *attr);
| ^~~~~~~~~~~~~~~
arch/arm64/kvm/kvm_ubsan_buffer.c:19:6: warning: no previous prototype for '__kvm_check_ubsan_data' [-Wmissing-prototypes]
19 | void __kvm_check_ubsan_data(struct kvm_ubsan_info *slot)
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/kvm_ubsan_buffer.c: In function '__kvm_check_ubsan_data':
>> arch/arm64/kvm/kvm_ubsan_buffer.c:21:2: warning: enumeration value 'UBSAN_NONE' not handled in switch [-Wswitch]
21 | switch (slot->type) {
| ^~~~~~
arch/arm64/kvm/kvm_ubsan_buffer.c: At top level:
arch/arm64/kvm/kvm_ubsan_buffer.c:62:6: warning: no previous prototype for 'iterate_kvm_ubsan_buffer' [-Wmissing-prototypes]
62 | void iterate_kvm_ubsan_buffer(unsigned long left, unsigned long right)
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/kvm_ubsan_buffer.c:75:6: warning: no previous prototype for '__kvm_check_ubsan_buffer' [-Wmissing-prototypes]
75 | void __kvm_check_ubsan_buffer(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:16:
arch/arm64/kvm/hyp/include/hyp/test_ubsan.h: In function 'test_ubsan_out_of_bounds':
>> arch/arm64/kvm/hyp/include/hyp/test_ubsan.h:55:15: warning: variable 'arr' set but not used [-Wunused-but-set-variable]
55 | volatile int arr[4];
| ^~~
arch/arm64/kvm/hyp/include/hyp/test_ubsan.h: In function 'test_ubsan_load_invalid_value':
>> arch/arm64/kvm/hyp/include/hyp/test_ubsan.h:63:19: warning: variable 'ptr' set but not used [-Wunused-but-set-variable]
63 | bool val, val2, *ptr;
| ^~~
arch/arm64/kvm/hyp/include/hyp/test_ubsan.h: In function 'test_ubsan_object_size_mismatch':
>> arch/arm64/kvm/hyp/include/hyp/test_ubsan.h:87:27: warning: variable 'val2' set but not used [-Wunused-but-set-variable]
87 | volatile long long *ptr, val2;
| ^~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c: At top level:
arch/arm64/kvm/hyp/nvhe/hyp-main.c:183:6: warning: no previous prototype for 'handle_trap' [-Wmissing-prototypes]
183 | void handle_trap(struct kvm_cpu_context *host_ctxt)
| ^~~~~~~~~~~
vim +/UBSAN_NONE +21 arch/arm64/kvm/kvm_ubsan_buffer.c
aba3219bbab3bb5c George Popescu 2021-01-14 15
aba3219bbab3bb5c George Popescu 2021-01-14 16 DECLARE_KVM_DEBUG_BUFFER(struct kvm_ubsan_info, kvm_ubsan_buffer,
aba3219bbab3bb5c George Popescu 2021-01-14 17 kvm_ubsan_buff_wr_ind, KVM_UBSAN_BUFFER_SIZE);
aba3219bbab3bb5c George Popescu 2021-01-14 18
c8a90dc1d55ba5e3 George Popescu 2021-01-14 19 void __kvm_check_ubsan_data(struct kvm_ubsan_info *slot)
c8a90dc1d55ba5e3 George Popescu 2021-01-14 20 {
c8a90dc1d55ba5e3 George Popescu 2021-01-14 @21 switch (slot->type) {
c8a90dc1d55ba5e3 George Popescu 2021-01-14 22 case UBSAN_OUT_OF_BOUNDS:
c8a90dc1d55ba5e3 George Popescu 2021-01-14 23 __ubsan_handle_out_of_bounds(&slot->out_of_bounds_data,
c8a90dc1d55ba5e3 George Popescu 2021-01-14 24 slot->u_val.lval);
c8a90dc1d55ba5e3 George Popescu 2021-01-14 25 break;
125f434abd282604 George Popescu 2021-01-14 26 case UBSAN_UNREACHABLE_DATA:
125f434abd282604 George Popescu 2021-01-14 27 __ubsan_handle_builtin_unreachable(&slot->unreachable_data);
125f434abd282604 George Popescu 2021-01-14 28 break;
3bd940afa9486b82 George Popescu 2021-01-14 29 case UBSAN_SHIFT_OUT_OF_BOUNDS:
3bd940afa9486b82 George Popescu 2021-01-14 30 __ubsan_handle_shift_out_of_bounds(&slot->shift_out_of_bounds_data,
3bd940afa9486b82 George Popescu 2021-01-14 31 slot->u_val.lval, slot->u_val.rval);
3bd940afa9486b82 George Popescu 2021-01-14 32 break;
3b42f0d25b7dd280 George Popescu 2021-01-14 33 case UBSAN_INVALID_DATA:
3b42f0d25b7dd280 George Popescu 2021-01-14 34 __ubsan_handle_load_invalid_value(&slot->invalid_value_data,
3b42f0d25b7dd280 George Popescu 2021-01-14 35 slot->u_val.lval);
3b42f0d25b7dd280 George Popescu 2021-01-14 36 break;
e7832e63ca596782 George Popescu 2021-01-14 37 case UBSAN_TYPE_MISMATCH:
e7832e63ca596782 George Popescu 2021-01-14 38 __ubsan_handle_type_mismatch(&slot->type_mismatch_data,
e7832e63ca596782 George Popescu 2021-01-14 39 slot->u_val.lval);
e7832e63ca596782 George Popescu 2021-01-14 40 break;
aaa9326468ea971e George Popescu 2021-01-14 41 case UBSAN_OVERFLOW_DATA:
aaa9326468ea971e George Popescu 2021-01-14 42 if (slot->u_val.op == '/') {
aaa9326468ea971e George Popescu 2021-01-14 43 __ubsan_handle_divrem_overflow(&slot->overflow_data,
aaa9326468ea971e George Popescu 2021-01-14 44 slot->u_val.lval, slot->u_val.rval);
aaa9326468ea971e George Popescu 2021-01-14 45 } else if (slot->u_val.op == '!') {
aaa9326468ea971e George Popescu 2021-01-14 46 __ubsan_handle_negate_overflow(&slot->overflow_data,
aaa9326468ea971e George Popescu 2021-01-14 47 slot->u_val.lval);
aaa9326468ea971e George Popescu 2021-01-14 48 } else if (slot->u_val.op == '+') {
aaa9326468ea971e George Popescu 2021-01-14 49 __ubsan_handle_add_overflow(&slot->overflow_data,
aaa9326468ea971e George Popescu 2021-01-14 50 slot->u_val.lval, slot->u_val.rval);
aaa9326468ea971e George Popescu 2021-01-14 51 } else if (slot->u_val.op == '-') {
aaa9326468ea971e George Popescu 2021-01-14 52 __ubsan_handle_sub_overflow(&slot->overflow_data,
aaa9326468ea971e George Popescu 2021-01-14 53 slot->u_val.lval, slot->u_val.rval);
aaa9326468ea971e George Popescu 2021-01-14 54 } else if (slot->u_val.op == '*') {
aaa9326468ea971e George Popescu 2021-01-14 55 __ubsan_handle_mul_overflow(&slot->overflow_data,
aaa9326468ea971e George Popescu 2021-01-14 56 slot->u_val.lval, slot->u_val.rval);
aaa9326468ea971e George Popescu 2021-01-14 57 }
aaa9326468ea971e George Popescu 2021-01-14 58 break;
c8a90dc1d55ba5e3 George Popescu 2021-01-14 59 }
c8a90dc1d55ba5e3 George Popescu 2021-01-14 60 }
aba3219bbab3bb5c George Popescu 2021-01-14 61
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 76484 bytes --]
prev parent reply other threads:[~2021-01-15 14:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 17:23 [PATCH v2 0/9] UBSan Enablement for hyp/nVHE code Elena Petrova
2021-01-14 17:23 ` [PATCH v2 1/9] KVM: arm64: Enable UBSan instrumentation in nVHE hyp code Elena Petrova
2021-01-15 8:53 ` kernel test robot
2021-01-14 17:23 ` [PATCH v2 2/9] KVM: arm64: Add a buffer that can pass UBSan data from hyp/nVHE to kernel Elena Petrova
2021-01-15 9:54 ` kernel test robot
2021-01-15 12:35 ` kernel test robot
2021-01-14 17:23 ` [PATCH v2 3/9] KVM: arm64: Enable UBSAN_BOUNDS for the both the kernel and hyp/nVHE Elena Petrova
2021-01-15 13:37 ` kernel test robot
2021-01-14 17:23 ` [PATCH v2 4/9] KVM: arm64: Enable UBsan check for unreachable code inside hyp/nVHE code Elena Petrova
2021-01-14 17:23 ` [PATCH v2 5/9] KVM: arm64: Enable shift out of bounds undefined behaviour check for hyp/nVHE Elena Petrova
2021-01-14 17:23 ` [PATCH v2 6/9] KVM: arm64: __ubsan_handle_load_invalid_value EL2 implementation Elena Petrova
2021-01-14 17:23 ` [PATCH v2 7/9] KVM: arm64: Detect type mismatch undefined behaviour from hyp/nVHE code Elena Petrova
2021-01-14 17:23 ` [PATCH v2 8/9] KVM: arm64: Detect arithmetic overflow is inside hyp/nVHE Elena Petrova
2021-01-14 17:23 ` [PATCH v2 9/9] KVM: arm64: Add UBSan tests for PKVM Elena Petrova
2021-01-15 14:30 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202101152224.gofOfDHo-lkp@intel.com \
--to=lkp@intel.com \
--cc=george.apopescu97@gmail.com \
--cc=georgepope@google.com \
--cc=james.morse@arm.com \
--cc=julien.thierry.kdev@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=lenaptr@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox