lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 2 Sep 2022 08:09:29 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Zhao Liu <zhao1.liu@...ux.intel.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H . Peter Anvin" <hpa@...or.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Ira Weiny <ira.weiny@...el.com>,
        "Fabio M . De Francesco" <fmdefrancesco@...il.com>,
        Zhenyu Wang <zhenyu.z.wang@...el.com>,
        Zhao Liu <zhao1.liu@...el.com>
Subject: Re: [PATCH] KVM: SVM: Replace kmap_atomic() with kmap_local_page()

On 9/2/22 02:08, Zhao Liu wrote:
> From: Zhao Liu <zhao1.liu@...el.com>
> 
> The use of kmap_atomic() is being deprecated in favor of
> kmap_local_page()[1].
> 
> In arch/x86/kvm/svm/sev.c, the function sev_clflush_pages() doesn't
> need to disable pagefaults and preemption in kmap_atomic(). It can
> simply use kmap_local_page() / kunmap_local() that can instead do the
> mapping / unmapping regardless of the context.
> 
> With kmap_local_page(), the mapping is per thread, CPU local and not
> globally visible. Therefore, sev_clflush_pages() is a function where
> the use of kmap_local_page() in place of kmap_atomic() is correctly
> suited.

This changelog is a little on the weak side.  You could literally take
any arbitrary call-site and file for kmap_atomic() and slap that
changelog on it.  For instance:

	In drivers/target/target_core_sbc.c, the function
	sbc_dif_copy_prot() doesn't need to disable pagefaults and
	preemption in kmap_atomic(). It can simply use kmap_local_page()
	/ kunmap_local() that can instead do the mapping / unmapping
	regardless of the context.

	With kmap_local_page(), the mapping is per thread, CPU local and
	not globally visible. Therefore, sbc_dif_copy_prot() is a
	function where the use of kmap_local_page() in place of
	kmap_atomic() is correctly suited.

That's all valid English and there's nothing incorrect in it.  But, it
doesn't indicate that any actual analysis was performed.  It's utterly
generic.  It could literally have been generated by a pretty trivial script.

It would be great to add at least a small, call-site-specific human
touch to these changelogs.

In this case, saying something about how global the cache flush is would
be a great addition.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ