* arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail'.
@ 2024-10-21 7:29 Dan Carpenter
2024-10-23 12:43 ` Marc Zyngier
0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2024-10-21 7:29 UTC (permalink / raw)
To: oe-kbuild, Marc Zyngier; +Cc: lkp, oe-kbuild-all, linux-kernel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d5ad2d4eca337e80f38df77de89614aa5aaceb9
commit: be0135bde1df5e80cffacd2ed6f952e6d38d6f71 KVM: arm64: nv: Add basic emulation of AT S1E1{R,W}P
date: 7 weeks ago
config: arm64-randconfig-r071-20241015 (https://download.01.org/0day-ci/archive/20241020/202410200209.bAXXL58Q-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202410200209.bAXXL58Q-lkp@intel.com/
smatch warnings:
arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail'.
vim +/fail +71 arch/arm64/kvm/at.c
be0135bde1df5e Marc Zyngier 2024-07-14 52 static bool at_s1e1p_fast(struct kvm_vcpu *vcpu, u32 op, u64 vaddr)
be0135bde1df5e Marc Zyngier 2024-07-14 53 {
be0135bde1df5e Marc Zyngier 2024-07-14 54 u64 host_pan;
be0135bde1df5e Marc Zyngier 2024-07-14 55 bool fail;
be0135bde1df5e Marc Zyngier 2024-07-14 56
be0135bde1df5e Marc Zyngier 2024-07-14 57 host_pan = read_sysreg_s(SYS_PSTATE_PAN);
be0135bde1df5e Marc Zyngier 2024-07-14 58 write_sysreg_s(*vcpu_cpsr(vcpu) & PSTATE_PAN, SYS_PSTATE_PAN);
be0135bde1df5e Marc Zyngier 2024-07-14 59
be0135bde1df5e Marc Zyngier 2024-07-14 60 switch (op) {
be0135bde1df5e Marc Zyngier 2024-07-14 61 case OP_AT_S1E1RP:
be0135bde1df5e Marc Zyngier 2024-07-14 62 fail = __kvm_at(OP_AT_S1E1RP, vaddr);
be0135bde1df5e Marc Zyngier 2024-07-14 63 break;
be0135bde1df5e Marc Zyngier 2024-07-14 64 case OP_AT_S1E1WP:
be0135bde1df5e Marc Zyngier 2024-07-14 65 fail = __kvm_at(OP_AT_S1E1WP, vaddr);
be0135bde1df5e Marc Zyngier 2024-07-14 66 break;
default case?
be0135bde1df5e Marc Zyngier 2024-07-14 67 }
be0135bde1df5e Marc Zyngier 2024-07-14 68
be0135bde1df5e Marc Zyngier 2024-07-14 69 write_sysreg_s(host_pan, SYS_PSTATE_PAN);
be0135bde1df5e Marc Zyngier 2024-07-14 70
be0135bde1df5e Marc Zyngier 2024-07-14 @71 return fail;
be0135bde1df5e Marc Zyngier 2024-07-14 72 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail'.
2024-10-21 7:29 arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail' Dan Carpenter
@ 2024-10-23 12:43 ` Marc Zyngier
2024-10-23 13:08 ` Dan Carpenter
0 siblings, 1 reply; 5+ messages in thread
From: Marc Zyngier @ 2024-10-23 12:43 UTC (permalink / raw)
To: Dan Carpenter; +Cc: oe-kbuild, lkp, oe-kbuild-all, linux-kernel
On Mon, 21 Oct 2024 08:29:41 +0100,
Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 3d5ad2d4eca337e80f38df77de89614aa5aaceb9
> commit: be0135bde1df5e80cffacd2ed6f952e6d38d6f71 KVM: arm64: nv: Add basic emulation of AT S1E1{R,W}P
> date: 7 weeks ago
> config: arm64-randconfig-r071-20241015 (https://download.01.org/0day-ci/archive/20241020/202410200209.bAXXL58Q-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 14.1.0
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202410200209.bAXXL58Q-lkp@intel.com/
>
> smatch warnings:
> arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail'.
>
> vim +/fail +71 arch/arm64/kvm/at.c
>
> be0135bde1df5e Marc Zyngier 2024-07-14 52 static bool at_s1e1p_fast(struct kvm_vcpu *vcpu, u32 op, u64 vaddr)
> be0135bde1df5e Marc Zyngier 2024-07-14 53 {
> be0135bde1df5e Marc Zyngier 2024-07-14 54 u64 host_pan;
> be0135bde1df5e Marc Zyngier 2024-07-14 55 bool fail;
> be0135bde1df5e Marc Zyngier 2024-07-14 56
> be0135bde1df5e Marc Zyngier 2024-07-14 57 host_pan = read_sysreg_s(SYS_PSTATE_PAN);
> be0135bde1df5e Marc Zyngier 2024-07-14 58 write_sysreg_s(*vcpu_cpsr(vcpu) & PSTATE_PAN, SYS_PSTATE_PAN);
> be0135bde1df5e Marc Zyngier 2024-07-14 59
> be0135bde1df5e Marc Zyngier 2024-07-14 60 switch (op) {
> be0135bde1df5e Marc Zyngier 2024-07-14 61 case OP_AT_S1E1RP:
> be0135bde1df5e Marc Zyngier 2024-07-14 62 fail = __kvm_at(OP_AT_S1E1RP, vaddr);
> be0135bde1df5e Marc Zyngier 2024-07-14 63 break;
> be0135bde1df5e Marc Zyngier 2024-07-14 64 case OP_AT_S1E1WP:
> be0135bde1df5e Marc Zyngier 2024-07-14 65 fail = __kvm_at(OP_AT_S1E1WP, vaddr);
> be0135bde1df5e Marc Zyngier 2024-07-14 66 break;
>
> default case?
There is no bug here, as evidenced by the *only* caller of this
function (__kvm_at_s1e01_fast()):
switch (op) {
case OP_AT_S1E1RP:
case OP_AT_S1E1WP:
fail = at_s1e1p_fast(vcpu, op, vaddr);
break;
So 'op' can only be one of these two values, and at_s1e1p_fast()
always initialises 'fail'.
I guess this is a case of smatch not seeing beyond function scope.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail'.
2024-10-23 12:43 ` Marc Zyngier
@ 2024-10-23 13:08 ` Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2024-10-23 13:08 UTC (permalink / raw)
To: Marc Zyngier; +Cc: oe-kbuild, lkp, oe-kbuild-all, linux-kernel
On Wed, Oct 23, 2024 at 01:43:03PM +0100, Marc Zyngier wrote:
> On Mon, 21 Oct 2024 08:29:41 +0100,
> Dan Carpenter <dan.carpenter@linaro.org> wrote:
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 3d5ad2d4eca337e80f38df77de89614aa5aaceb9
> > commit: be0135bde1df5e80cffacd2ed6f952e6d38d6f71 KVM: arm64: nv: Add basic emulation of AT S1E1{R,W}P
> > date: 7 weeks ago
> > config: arm64-randconfig-r071-20241015 (https://download.01.org/0day-ci/archive/20241020/202410200209.bAXXL58Q-lkp@intel.com/config)
> > compiler: aarch64-linux-gcc (GCC) 14.1.0
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> > | Closes: https://lore.kernel.org/r/202410200209.bAXXL58Q-lkp@intel.com/
> >
> > smatch warnings:
> > arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail'.
> >
> > vim +/fail +71 arch/arm64/kvm/at.c
> >
> > be0135bde1df5e Marc Zyngier 2024-07-14 52 static bool at_s1e1p_fast(struct kvm_vcpu *vcpu, u32 op, u64 vaddr)
> > be0135bde1df5e Marc Zyngier 2024-07-14 53 {
> > be0135bde1df5e Marc Zyngier 2024-07-14 54 u64 host_pan;
> > be0135bde1df5e Marc Zyngier 2024-07-14 55 bool fail;
> > be0135bde1df5e Marc Zyngier 2024-07-14 56
> > be0135bde1df5e Marc Zyngier 2024-07-14 57 host_pan = read_sysreg_s(SYS_PSTATE_PAN);
> > be0135bde1df5e Marc Zyngier 2024-07-14 58 write_sysreg_s(*vcpu_cpsr(vcpu) & PSTATE_PAN, SYS_PSTATE_PAN);
> > be0135bde1df5e Marc Zyngier 2024-07-14 59
> > be0135bde1df5e Marc Zyngier 2024-07-14 60 switch (op) {
> > be0135bde1df5e Marc Zyngier 2024-07-14 61 case OP_AT_S1E1RP:
> > be0135bde1df5e Marc Zyngier 2024-07-14 62 fail = __kvm_at(OP_AT_S1E1RP, vaddr);
> > be0135bde1df5e Marc Zyngier 2024-07-14 63 break;
> > be0135bde1df5e Marc Zyngier 2024-07-14 64 case OP_AT_S1E1WP:
> > be0135bde1df5e Marc Zyngier 2024-07-14 65 fail = __kvm_at(OP_AT_S1E1WP, vaddr);
> > be0135bde1df5e Marc Zyngier 2024-07-14 66 break;
> >
> > default case?
>
> There is no bug here, as evidenced by the *only* caller of this
> function (__kvm_at_s1e01_fast()):
>
> switch (op) {
> case OP_AT_S1E1RP:
> case OP_AT_S1E1WP:
> fail = at_s1e1p_fast(vcpu, op, vaddr);
> break;
>
> So 'op' can only be one of these two values, and at_s1e1p_fast()
> always initialises 'fail'.
>
> I guess this is a case of smatch not seeing beyond function scope.
>
Yeah. I don't know why I sent this report. :/ The kbuild-bot doesn't have cross
function information, but I have a system with that right infront of me.
Sorry.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail'.
@ 2024-12-17 3:15 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2024-12-17 3:15 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Marc Zyngier <maz@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f44d154d6e3d633d4c49a5d6aed8a0e4684ae25e
commit: be0135bde1df5e80cffacd2ed6f952e6d38d6f71 KVM: arm64: nv: Add basic emulation of AT S1E1{R,W}P
date: 4 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 4 months ago
config: arm64-randconfig-r073-20241207 (https://download.01.org/0day-ci/archive/20241217/202412171131.72aDJUdO-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202412171131.72aDJUdO-lkp@intel.com/
smatch warnings:
arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail'.
vim +/fail +71 arch/arm64/kvm/at.c
477e89cabb1428d Marc Zyngier 2024-06-19 51
be0135bde1df5e8 Marc Zyngier 2024-07-14 52 static bool at_s1e1p_fast(struct kvm_vcpu *vcpu, u32 op, u64 vaddr)
be0135bde1df5e8 Marc Zyngier 2024-07-14 53 {
be0135bde1df5e8 Marc Zyngier 2024-07-14 54 u64 host_pan;
be0135bde1df5e8 Marc Zyngier 2024-07-14 55 bool fail;
be0135bde1df5e8 Marc Zyngier 2024-07-14 56
be0135bde1df5e8 Marc Zyngier 2024-07-14 57 host_pan = read_sysreg_s(SYS_PSTATE_PAN);
be0135bde1df5e8 Marc Zyngier 2024-07-14 58 write_sysreg_s(*vcpu_cpsr(vcpu) & PSTATE_PAN, SYS_PSTATE_PAN);
be0135bde1df5e8 Marc Zyngier 2024-07-14 59
be0135bde1df5e8 Marc Zyngier 2024-07-14 60 switch (op) {
be0135bde1df5e8 Marc Zyngier 2024-07-14 61 case OP_AT_S1E1RP:
be0135bde1df5e8 Marc Zyngier 2024-07-14 62 fail = __kvm_at(OP_AT_S1E1RP, vaddr);
be0135bde1df5e8 Marc Zyngier 2024-07-14 63 break;
be0135bde1df5e8 Marc Zyngier 2024-07-14 64 case OP_AT_S1E1WP:
be0135bde1df5e8 Marc Zyngier 2024-07-14 65 fail = __kvm_at(OP_AT_S1E1WP, vaddr);
be0135bde1df5e8 Marc Zyngier 2024-07-14 66 break;
be0135bde1df5e8 Marc Zyngier 2024-07-14 67 }
be0135bde1df5e8 Marc Zyngier 2024-07-14 68
be0135bde1df5e8 Marc Zyngier 2024-07-14 69 write_sysreg_s(host_pan, SYS_PSTATE_PAN);
be0135bde1df5e8 Marc Zyngier 2024-07-14 70
be0135bde1df5e8 Marc Zyngier 2024-07-14 @71 return fail;
be0135bde1df5e8 Marc Zyngier 2024-07-14 72 }
be0135bde1df5e8 Marc Zyngier 2024-07-14 73
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread* arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail'.
@ 2024-10-19 18:10 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2024-10-19 18:10 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Marc Zyngier <maz@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d5ad2d4eca337e80f38df77de89614aa5aaceb9
commit: be0135bde1df5e80cffacd2ed6f952e6d38d6f71 KVM: arm64: nv: Add basic emulation of AT S1E1{R,W}P
date: 7 weeks ago
:::::: branch date: 19 hours ago
:::::: commit date: 7 weeks ago
config: arm64-randconfig-r071-20241015 (https://download.01.org/0day-ci/archive/20241020/202410200209.bAXXL58Q-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202410200209.bAXXL58Q-lkp@intel.com/
smatch warnings:
arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail'.
vim +/fail +71 arch/arm64/kvm/at.c
477e89cabb1428 Marc Zyngier 2024-06-19 51
be0135bde1df5e Marc Zyngier 2024-07-14 52 static bool at_s1e1p_fast(struct kvm_vcpu *vcpu, u32 op, u64 vaddr)
be0135bde1df5e Marc Zyngier 2024-07-14 53 {
be0135bde1df5e Marc Zyngier 2024-07-14 54 u64 host_pan;
be0135bde1df5e Marc Zyngier 2024-07-14 55 bool fail;
be0135bde1df5e Marc Zyngier 2024-07-14 56
be0135bde1df5e Marc Zyngier 2024-07-14 57 host_pan = read_sysreg_s(SYS_PSTATE_PAN);
be0135bde1df5e Marc Zyngier 2024-07-14 58 write_sysreg_s(*vcpu_cpsr(vcpu) & PSTATE_PAN, SYS_PSTATE_PAN);
be0135bde1df5e Marc Zyngier 2024-07-14 59
be0135bde1df5e Marc Zyngier 2024-07-14 60 switch (op) {
be0135bde1df5e Marc Zyngier 2024-07-14 61 case OP_AT_S1E1RP:
be0135bde1df5e Marc Zyngier 2024-07-14 62 fail = __kvm_at(OP_AT_S1E1RP, vaddr);
be0135bde1df5e Marc Zyngier 2024-07-14 63 break;
be0135bde1df5e Marc Zyngier 2024-07-14 64 case OP_AT_S1E1WP:
be0135bde1df5e Marc Zyngier 2024-07-14 65 fail = __kvm_at(OP_AT_S1E1WP, vaddr);
be0135bde1df5e Marc Zyngier 2024-07-14 66 break;
be0135bde1df5e Marc Zyngier 2024-07-14 67 }
be0135bde1df5e Marc Zyngier 2024-07-14 68
be0135bde1df5e Marc Zyngier 2024-07-14 69 write_sysreg_s(host_pan, SYS_PSTATE_PAN);
be0135bde1df5e Marc Zyngier 2024-07-14 70
be0135bde1df5e Marc Zyngier 2024-07-14 @71 return fail;
be0135bde1df5e Marc Zyngier 2024-07-14 72 }
be0135bde1df5e Marc Zyngier 2024-07-14 73
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-17 3:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-21 7:29 arch/arm64/kvm/at.c:71 at_s1e1p_fast() error: uninitialized symbol 'fail' Dan Carpenter
2024-10-23 12:43 ` Marc Zyngier
2024-10-23 13:08 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2024-12-17 3:15 kernel test robot
2024-10-19 18:10 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.