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] [day] [month] [year] [list]
Message-ID: <453d5f6e-49ed-4840-944d-f6accb690b81@amd.com>
Date: Mon, 6 Jan 2025 10:04:38 +0530
From: "Nikunj A. Dadhania" <nikunj@....com>
To: Francesco Lavra <francescolavra.fl@...il.com>
Cc: bp@...en8.de, dave.hansen@...ux.intel.com, kvm@...r.kernel.org,
 linux-kernel@...r.kernel.org, mingo@...hat.com, pbonzini@...hat.com,
 pgonda@...gle.com, seanjc@...gle.com, tglx@...utronix.de,
 thomas.lendacky@....com, x86@...nel.org
Subject: Re: [PATCH v15 03/13] x86/sev: Add Secure TSC support for SNP guests



On 1/5/2025 1:56 AM, Francesco Lavra wrote:
> On 2024-12-03 at 9:00, Nikunj A Dadhania wrote:

>> +
>> +e_request:
>> +	/* The response buffer contains sensitive data, explicitly
>> clear it. */
>> +	memzero_explicit(buf, sizeof(buf));
>> +	memzero_explicit(tsc_resp, sizeof(*tsc_resp));
> 
> buf is an unsigned char *, so by using sizeof(buf) you are not zeroing
> the entire buffer.
> Also, I see no point in having a separate tsc_resp buffer just to copy
> the response from buf to tsc_resp, if you just use a single buffer with
> size (SNP_TSC_INFO_RESP_SZ + AUTHTAG_LEN) and parse the response from
> that buffer you will avoid the double buffer allocation, the memory
> copying, and the double zeroing.

Makes sense, will update.

Regards
Nikunj


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ