* [PULL 1/1] s390/cio: Fix how vfio-ccw checks pinned pages
[not found] <20181002153748.13503-1-cohuck@redhat.com>
@ 2018-10-02 15:37 ` Cornelia Huck
2018-10-03 13:14 ` Farhan Ali
2018-10-08 7:20 ` [PULL 0/1] vfio-ccw: another bugfix Martin Schwidefsky
1 sibling, 1 reply; 5+ messages in thread
From: Cornelia Huck @ 2018-10-02 15:37 UTC (permalink / raw)
To: Martin Schwidefsky, Heiko Carstens
Cc: Halil Pasic, linux-s390, kvm, Eric Farman, stable, Cornelia Huck
From: Eric Farman <farman@linux.ibm.com>
We have two nested loops to check the entries within the pfn_array_table
arrays. But we mistakenly use the outer array as an index in our check,
and completely ignore the indexing performed by the inner loop.
Cc: stable@vger.kernel.org
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <20181002010235.42483-1-farman@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
drivers/s390/cio/vfio_ccw_cp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c
index dbe7c7ac9ac8..fd77e46eb3b2 100644
--- a/drivers/s390/cio/vfio_ccw_cp.c
+++ b/drivers/s390/cio/vfio_ccw_cp.c
@@ -163,7 +163,7 @@ static bool pfn_array_table_iova_pinned(struct pfn_array_table *pat,
for (i = 0; i < pat->pat_nr; i++, pa++)
for (j = 0; j < pa->pa_nr; j++)
- if (pa->pa_iova_pfn[i] == iova_pfn)
+ if (pa->pa_iova_pfn[j] == iova_pfn)
return true;
return false;
--
2.14.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PULL 1/1] s390/cio: Fix how vfio-ccw checks pinned pages
2018-10-02 15:37 ` [PULL 1/1] s390/cio: Fix how vfio-ccw checks pinned pages Cornelia Huck
@ 2018-10-03 13:14 ` Farhan Ali
0 siblings, 0 replies; 5+ messages in thread
From: Farhan Ali @ 2018-10-03 13:14 UTC (permalink / raw)
To: Cornelia Huck, Martin Schwidefsky, Heiko Carstens
Cc: Halil Pasic, linux-s390, kvm, Eric Farman, stable, Jason J. Herne
On 10/02/2018 11:37 AM, Cornelia Huck wrote:
> From: Eric Farman <farman@linux.ibm.com>
>
> We have two nested loops to check the entries within the pfn_array_table
> arrays. But we mistakenly use the outer array as an index in our check,
> and completely ignore the indexing performed by the inner loop.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Eric Farman <farman@linux.ibm.com>
> Message-Id: <20181002010235.42483-1-farman@linux.ibm.com>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> drivers/s390/cio/vfio_ccw_cp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c
> index dbe7c7ac9ac8..fd77e46eb3b2 100644
> --- a/drivers/s390/cio/vfio_ccw_cp.c
> +++ b/drivers/s390/cio/vfio_ccw_cp.c
> @@ -163,7 +163,7 @@ static bool pfn_array_table_iova_pinned(struct pfn_array_table *pat,
>
> for (i = 0; i < pat->pat_nr; i++, pa++)
> for (j = 0; j < pa->pa_nr; j++)
> - if (pa->pa_iova_pfn[i] == iova_pfn)
> + if (pa->pa_iova_pfn[j] == iova_pfn)
> return true;
>
> return false;
>
Me and Jason have been looking at this code recently and we think this
is the right fix.
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PULL 0/1] vfio-ccw: another bugfix
[not found] <20181002153748.13503-1-cohuck@redhat.com>
2018-10-02 15:37 ` [PULL 1/1] s390/cio: Fix how vfio-ccw checks pinned pages Cornelia Huck
@ 2018-10-08 7:20 ` Martin Schwidefsky
1 sibling, 0 replies; 5+ messages in thread
From: Martin Schwidefsky @ 2018-10-08 7:20 UTC (permalink / raw)
To: linux-s390, kvm
On Tue, 2 Oct 2018 17:37:47 +0200
Cornelia Huck <cohuck@redhat.com> wrote:
> [Sorry about that; I don't plan to make this a daily thing...]
>
> The following changes since commit c458dda3d07c110ce1d007998f67273325ad8662:
>
> Merge tag 'vfio-ccw-20181001' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into fixes (2018-10-01 16:07:42 +0200)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw.git tags/vfio-ccw-20181002
>
> for you to fetch changes up to 24abf2901b18bf941b9f21ea2ce5791f61097ae4:
>
> s390/cio: Fix how vfio-ccw checks pinned pages (2018-10-02 09:45:05 +0200)
>
> ----------------------------------------------------------------
> Another fix for vfio-ccw: make sure it accesses the correct entries
> in the pfn_array_table arrays when checking pinned pages.
>
> ----------------------------------------------------------------
>
> Eric Farman (1):
> s390/cio: Fix how vfio-ccw checks pinned pages
>
> drivers/s390/cio/vfio_ccw_cp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Pulled and push to linux-s390:fixes. I'll wait for a couple of days
before I send a please pull to Greg with the fixes.
Thanks.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PULL 0/1] vfio-ccw: another bugfix
@ 2018-04-24 11:26 Cornelia Huck
2018-04-27 5:24 ` Martin Schwidefsky
0 siblings, 1 reply; 5+ messages in thread
From: Cornelia Huck @ 2018-04-24 11:26 UTC (permalink / raw)
To: Martin Schwidefsky, Heiko Carstens
Cc: Dong Jia Shi, Halil Pasic, linux-s390, kvm, linux-kernel,
Cornelia Huck
The following changes since commit 6cf09958f32b9667bb3ebadf74367c791112771b:
s390: correct module section names for expoline code revert (2018-04-23 07:57:17 +0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw.git tags/vfio-ccw-20180424
for you to fetch changes up to 427e522fc72395a4571b8dd7fe6d116927496bf7:
vfio: ccw: fix cleanup if cp_prefetch fails (2018-04-23 14:11:20 +0200)
----------------------------------------------------------------
Another vfio-ccw bug fix: Don't clean up things on error that were
never translated in the first place.
----------------------------------------------------------------
Halil Pasic (1):
vfio: ccw: fix cleanup if cp_prefetch fails
drivers/s390/cio/vfio_ccw_cp.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
--
2.14.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PULL 0/1] vfio-ccw: another bugfix
2018-04-24 11:26 Cornelia Huck
@ 2018-04-27 5:24 ` Martin Schwidefsky
0 siblings, 0 replies; 5+ messages in thread
From: Martin Schwidefsky @ 2018-04-27 5:24 UTC (permalink / raw)
To: Cornelia Huck
Cc: Heiko Carstens, Dong Jia Shi, Halil Pasic, linux-s390, kvm,
linux-kernel
On Tue, 24 Apr 2018 13:26:55 +0200
Cornelia Huck <cohuck@redhat.com> wrote:
> The following changes since commit 6cf09958f32b9667bb3ebadf74367c791112771b:
>
> s390: correct module section names for expoline code revert (2018-04-23 07:57:17 +0200)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw.git tags/vfio-ccw-20180424
>
> for you to fetch changes up to 427e522fc72395a4571b8dd7fe6d116927496bf7:
>
> vfio: ccw: fix cleanup if cp_prefetch fails (2018-04-23 14:11:20 +0200)
>
> ----------------------------------------------------------------
> Another vfio-ccw bug fix: Don't clean up things on error that were
> never translated in the first place.
>
> ----------------------------------------------------------------
>
> Halil Pasic (1):
> vfio: ccw: fix cleanup if cp_prefetch fails
>
> drivers/s390/cio/vfio_ccw_cp.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
Now added the s390/linux:fixes. Thanks.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-08 7:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20181002153748.13503-1-cohuck@redhat.com>
2018-10-02 15:37 ` [PULL 1/1] s390/cio: Fix how vfio-ccw checks pinned pages Cornelia Huck
2018-10-03 13:14 ` Farhan Ali
2018-10-08 7:20 ` [PULL 0/1] vfio-ccw: another bugfix Martin Schwidefsky
2018-04-24 11:26 Cornelia Huck
2018-04-27 5:24 ` Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox