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: <8338dd00-3aa4-418f-a547-1c19623358cb@linux.microsoft.com>
Date: Thu, 27 Feb 2025 14:54:29 -0800
From: Easwar Hariharan <eahariha@...ux.microsoft.com>
To: Roman Kisel <romank@...ux.microsoft.com>
Cc: Nuno Das Neves <nunodasneves@...ux.microsoft.com>,
 linux-hyperv@...r.kernel.org, x86@...nel.org,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 linux-arch@...r.kernel.org, linux-acpi@...r.kernel.org,
 eahariha@...ux.microsoft.com, kys@...rosoft.com, haiyangz@...rosoft.com,
 wei.liu@...nel.org, mhklinux@...look.com, decui@...rosoft.com,
 catalin.marinas@....com, will@...nel.org, tglx@...utronix.de,
 mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
 daniel.lezcano@...aro.org, joro@...tes.org, robin.murphy@....com,
 arnd@...db.de, jinankjain@...ux.microsoft.com, muminulrussell@...il.com,
 skinsburskii@...ux.microsoft.com, mrathor@...ux.microsoft.com,
 ssengar@...ux.microsoft.com, apais@...ux.microsoft.com,
 Tianyu.Lan@...rosoft.com, stanislav.kinsburskiy@...il.com,
 gregkh@...uxfoundation.org, vkuznets@...hat.com, prapal@...ux.microsoft.com,
 muislam@...rosoft.com, anrayabh@...ux.microsoft.com, rafael@...nel.org,
 lenb@...nel.org, corbet@....net
Subject: Re: [PATCH v5 01/10] hyperv: Convert Hyper-V status codes to strings

On 2/27/2025 9:02 AM, Roman Kisel wrote:
> 
> 
> On 2/26/2025 3:07 PM, Nuno Das Neves wrote:
> 
> [...]
> 
>> +
>> +const char *hv_result_to_string(u64 hv_status)
>> +{
>> +    switch (hv_result(hv_status)) {
> 
> [...]
> 
>> +        return "HV_STATUS_VTL_ALREADY_ENABLED";
>> +    default:
>> +        return "Unknown";
>> +    };
>> +    return "Unknown";
>> +}
>> +EXPORT_SYMBOL_GPL(hv_result_to_string);
> 
> Should we remove this and output the hexadecimal error code in ~3 places
> this function is used?
> 
> The "Unknown" part would make debugging harder actually when something
> fails. I presume that the mainstream scenarios all work, and it is the
> edge cases that might fail, and these are likelier to produce "Unknown".
> 
> Folks who actually debug failed hypercalls rarely have issues with
> looking up the error code, and printing "Unknown" to the log is worse
> than a hexadecimal. Like even the people who wrote the code got nothing
> to say about what is going on.
> 

Sorry, I have to disagree with this, a recent commit of mine[1] closed a WSL
issue that was open for over 2 years for, partly, the utter uselessness of
the hex return code of the hypercall.

[1] https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d2138eab8cde61e0e6f62d0713e45202e8457d6d

Thanks,
Easwar (he/him)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ