[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen stable-4.16] common: map_vcpu_info() wants to unshare the underlying page
commit 426a8346c01075ec5eba4aadefab03a96b6ece6a Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Mon Oct 31 13:26:33 2022 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Oct 31 13:26:33 2022 +0100 common: map_vcpu_info() wants to unshare the underlying page Not passing P2M_UNSHARE to get_page_from_gfn() means there won't even be an attempt to unshare the referenced page, without any indication to the caller (e.g. -EAGAIN). Note that guests have no direct control over which of their pages are shared (or paged out), and hence they have no way to make sure all on their own that the subsequent obtaining of a writable type reference can actually succeed. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Acked-by: Julien Grall <jgrall@xxxxxxxxxx> master commit: 48980cf24d5cf41fd644600f99c753419505e735 master date: 2022-10-28 11:38:32 +0200 --- xen/common/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 56d47dd664..e3afcacb6c 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -1471,7 +1471,7 @@ int map_vcpu_info(struct vcpu *v, unsigned long gfn, unsigned offset) if ( (v != current) && !(v->pause_flags & VPF_down) ) return -EINVAL; - page = get_page_from_gfn(d, gfn, NULL, P2M_ALLOC); + page = get_page_from_gfn(d, gfn, NULL, P2M_UNSHARE); if ( !page ) return -EINVAL; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.16
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |