Re: [PATCH] x86/hyper-v: guard against cpu mask changes in hyperv_flush_tlb_others()

2021-01-08 Thread Sasha Levin
On Tue, Jan 05, 2021 at 04:59:10PM +, Michael Kelley wrote: From: Wei Liu Sent: Monday, October 5, 2020 7:59 AM On Sat, Oct 03, 2020 at 05:40:15PM +, Michael Kelley wrote: > From: Sasha Levin Sent: Thursday, October 1, 2020 6:04 AM > > > > On Thu, Oct 01, 2020 at 11:53:59AM +,

Re: [PATCH] x86/hyper-v: guard against cpu mask changes in hyperv_flush_tlb_others()

2021-01-05 Thread Wei Liu
On Tue, Jan 05, 2021 at 04:59:10PM +, Michael Kelley wrote: > From: Wei Liu Sent: Monday, October 5, 2020 7:59 AM > > > > On Sat, Oct 03, 2020 at 05:40:15PM +, Michael Kelley wrote: > > > From: Sasha Levin Sent: Thursday, October 1, 2020 > > > 6:04 AM > > > > > > > > On Thu, Oct 01,

RE: [PATCH] x86/hyper-v: guard against cpu mask changes in hyperv_flush_tlb_others()

2021-01-05 Thread Michael Kelley
From: Wei Liu Sent: Monday, October 5, 2020 7:59 AM > > On Sat, Oct 03, 2020 at 05:40:15PM +, Michael Kelley wrote: > > From: Sasha Levin Sent: Thursday, October 1, 2020 6:04 > > AM > > > > > > On Thu, Oct 01, 2020 at 11:53:59AM +, Wei Liu wrote: > > > >On Thu, Oct 01, 2020 at

Re: [PATCH] x86/hyper-v: guard against cpu mask changes in hyperv_flush_tlb_others()

2020-10-05 Thread Wei Liu
On Sat, Oct 03, 2020 at 05:40:15PM +, Michael Kelley wrote: > From: Sasha Levin Sent: Thursday, October 1, 2020 6:04 AM > > > > On Thu, Oct 01, 2020 at 11:53:59AM +, Wei Liu wrote: > > >On Thu, Oct 01, 2020 at 11:40:04AM +0200, Vitaly Kuznetsov wrote: > > >> Sasha Levin writes: > > >>

RE: [PATCH] x86/hyper-v: guard against cpu mask changes in hyperv_flush_tlb_others()

2020-10-03 Thread Michael Kelley
From: Sasha Levin Sent: Thursday, October 1, 2020 6:04 AM > > On Thu, Oct 01, 2020 at 11:53:59AM +, Wei Liu wrote: > >On Thu, Oct 01, 2020 at 11:40:04AM +0200, Vitaly Kuznetsov wrote: > >> Sasha Levin writes: > >> > >> > cpumask can change underneath us, which is generally safe except when

Re: [PATCH] x86/hyper-v: guard against cpu mask changes in hyperv_flush_tlb_others()

2020-10-01 Thread Vitaly Kuznetsov
Wei Liu writes: > On Thu, Oct 01, 2020 at 11:40:04AM +0200, Vitaly Kuznetsov wrote: >> Sasha Levin writes: >> >> > cpumask can change underneath us, which is generally safe except when we >> > call into hv_cpu_number_to_vp_number(): if cpumask ends up empty we pass >> > num_cpu_possible() into

Re: [PATCH] x86/hyper-v: guard against cpu mask changes in hyperv_flush_tlb_others()

2020-10-01 Thread Sasha Levin
On Thu, Oct 01, 2020 at 11:53:59AM +, Wei Liu wrote: On Thu, Oct 01, 2020 at 11:40:04AM +0200, Vitaly Kuznetsov wrote: Sasha Levin writes: > cpumask can change underneath us, which is generally safe except when we > call into hv_cpu_number_to_vp_number(): if cpumask ends up empty we pass

Re: [PATCH] x86/hyper-v: guard against cpu mask changes in hyperv_flush_tlb_others()

2020-10-01 Thread Wei Liu
On Thu, Oct 01, 2020 at 11:40:04AM +0200, Vitaly Kuznetsov wrote: > Sasha Levin writes: > > > cpumask can change underneath us, which is generally safe except when we > > call into hv_cpu_number_to_vp_number(): if cpumask ends up empty we pass > > num_cpu_possible() into

Re: [PATCH] x86/hyper-v: guard against cpu mask changes in hyperv_flush_tlb_others()

2020-10-01 Thread Vitaly Kuznetsov
Sasha Levin writes: > cpumask can change underneath us, which is generally safe except when we > call into hv_cpu_number_to_vp_number(): if cpumask ends up empty we pass > num_cpu_possible() into hv_cpu_number_to_vp_number(), causing it to read > garbage. As reported by KASAN: > > [ 83.504763]

[PATCH] x86/hyper-v: guard against cpu mask changes in hyperv_flush_tlb_others()

2020-09-30 Thread Sasha Levin
cpumask can change underneath us, which is generally safe except when we call into hv_cpu_number_to_vp_number(): if cpumask ends up empty we pass num_cpu_possible() into hv_cpu_number_to_vp_number(), causing it to read garbage. As reported by KASAN: [ 83.504763] BUG: KASAN: slab-out-of-bounds