From c22f60e6e55f1bf300dd76d2222a93911f3b2bb2 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 12 Oct 2023 04:00:49 +0000 Subject: automatic import of xen --- ...86-shadow-dirty-VRAM-inverted-conditional.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 5f046c48-x86-shadow-dirty-VRAM-inverted-conditional.patch (limited to '5f046c48-x86-shadow-dirty-VRAM-inverted-conditional.patch') diff --git a/5f046c48-x86-shadow-dirty-VRAM-inverted-conditional.patch b/5f046c48-x86-shadow-dirty-VRAM-inverted-conditional.patch new file mode 100644 index 0000000..b25f024 --- /dev/null +++ b/5f046c48-x86-shadow-dirty-VRAM-inverted-conditional.patch @@ -0,0 +1,30 @@ +# Commit 23a216f99d40fbfbc2318ade89d8213eea6ba1f8 +# Date 2020-07-07 14:36:24 +0200 +# Author Jan Beulich +# Committer Jan Beulich +x86/shadow: correct an inverted conditional in dirty VRAM tracking + +This originally was "mfn_x(mfn) == INVALID_MFN". Make it like this +again, taking the opportunity to also drop the unnecessary nearby +braces. + +This is XSA-319. + +Fixes: 246a5a3377c2 ("xen: Use a typesafe to define INVALID_MFN") +Signed-off-by: Jan Beulich +Reviewed-by: Andrew Cooper + +--- a/xen/arch/x86/mm/shadow/common.c ++++ b/xen/arch/x86/mm/shadow/common.c +@@ -3249,10 +3249,8 @@ int shadow_track_dirty_vram(struct domai + int dirty = 0; + paddr_t sl1ma = dirty_vram->sl1ma[i]; + +- if ( !mfn_eq(mfn, INVALID_MFN) ) +- { ++ if ( mfn_eq(mfn, INVALID_MFN) ) + dirty = 1; +- } + else + { + page = mfn_to_page(mfn); -- cgit v1.2.3