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:   Mon, 9 Aug 2021 15:08:35 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Like Xu <like.xu.linux@...il.com>
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>, Ingo Molnar <mingo@...hat.com>,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/5] KVM: x86: Clean up redundant macro definitions

On Mon, Aug 09, 2021, Like Xu wrote:
> In KVM/x86 code, there are macros with the same name that are
> defined and used separately in the evolving code, and if the scope
> of the code review is only on iterations of the patch set, it can be
> difficult to spot these fragmented macros being defined repeatedly.
> 
> IMO, it's necessary to clean this up to improve the consistency and

Please use more specific shortlogs.  "Clean up" is too ambiguous, e.g. I would
expect it to mean "clean up the macro itself".

> readability of the code, and it also helps to avoid software defects
> caused by inconsistencies in the scope of influence of macros.
> 
> Like Xu (5):

>   KVM: x86: Clean up redundant mod_64(x, y) macro definition

Feels like we should find a home outside of KVM for mod_64(), it's a full generic
and straightforward macro.

>   KVM: x86: Clean up redundant CC macro definition

CC() should be kept where it is.  It should never be used outside of nested code
and is far too generic of a name to be exposed to the world at large.  It was
deliberately defined only in the nested.c files.

>   KVM: x86: Clean up redundant ROL16(val, n) macro definition

Moving ROL16 seems ok, though it scares me a bit that someone went through the
trouble of #undef'ing the macros.

>   KVM: x86: Clean up redundant __ex(x) macro definition

__ex() and __kvm_handle_fault_on_reboot() were supposed to have been removed.
The last two patches [8][9] of this series[*] got lost; I'll repost them as they
no longer apply cleanly.

>   KVM: x86: Clean up redundant pr_fmt(fmt) macro definition for svm

NAK, this breaks sev.c's formatting.  Arguably, nested.c and avic.c should use
more specific print messages, though that gets tricky with nested code as it's
not wholly contained in nested.c.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ