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]
Message-ID: <84b2f5ba-1a16-cb01-646c-37e25d659650@redhat.com>
Date:   Fri, 15 Jan 2021 14:50:18 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Jason Baron <jbaron@...mai.com>
Cc:     seanjc@...gle.com, kvm@...r.kernel.org, x86@...nel.org,
        linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Andrea Arcangeli <aarcange@...hat.com>
Subject: Re: [PATCH v2 2/3] KVM: x86: introduce definitions to support static
 calls for kvm_x86_ops

On 15/01/21 10:26, Peter Zijlstra wrote:
>> +#define KVM_X86_OP(func)					     \
>> +	DEFINE_STATIC_CALL_NULL(kvm_x86_##func,			     \
>> +				*(((struct kvm_x86_ops *)0)->func));
>> +#define KVM_X86_OP_NULL KVM_X86_OP
>> +#include <asm/kvm-x86-ops.h>
>> +EXPORT_STATIC_CALL_GPL(kvm_x86_get_cs_db_l_bits);
>> +EXPORT_STATIC_CALL_GPL(kvm_x86_cache_reg);
>> +EXPORT_STATIC_CALL_GPL(kvm_x86_tlb_flush_current);
> Would something like:
> 
>    https://lkml.kernel.org/r/20201110103909.GD2594@hirez.programming.kicks-ass.net
> 
> Be useful? That way modules can call the static_call() but not change
> it.
> 

Maybe not in these cases, but in general there may be cases where we 
later want to change the static_call (for example replacing jump labels 
with static_calls).

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ