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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 29 Dec 2020 11:56:18 +0100
From:   Borislav Petkov <>
To:     Sean Christopherson <>
Cc:     Peter Gonda <>,
        Thomas Gleixner <>,
        Ingo Molnar <>, Joerg Roedel <>,
        Tom Lendacky <>,,,
        David Rientjes <>
Subject: Re: [PATCH] x86/sev-es: Fix SEV-ES OUT/IN immediate opcode vc

On Mon, Dec 28, 2020 at 03:43:06PM -0800, Sean Christopherson wrote:
> Eh, casting to u8 is "absolutely correct" as well.  I don't like using bytes[]
> because it feels like accessing the raw data as opposed to the end result of
> decoding, but it's not a sticking point.

Ok, code in the kernel uses mostly ->value so u8 casting it is.

> Yes, insn_get_immediate() sets insn->immediate.value directly and sign extends
> the imm8 (which is correct, e.g. for "AND r/m64, imm8"). 
> 	switch (inat_immediate_size(insn->attr)) {
> 	case INAT_IMM_BYTE:
> 		insn->immediate.value = get_next(signed char, insn);
> 		insn->immediate.nbytes = 1;

Ah, there it is. And we set nbytes too, conveniently.



Powered by blists - more mailing lists