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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1pTO+T67EBdlQd9@zn.tnic>
Date:   Thu, 27 Oct 2022 11:45:31 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Dionna Amalie Glaze <dionnaglaze@...gle.com>
Cc:     Peter Gonda <pgonda@...gle.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org,
        Tom Lendacky <Thomas.Lendacky@....com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Joerg Roedel <jroedel@...e.de>,
        Thomas Gleixner <tglx@...utronix.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH] virt/coco/sev-guest: Initialize err in
 handle_guest_request

On Wed, Oct 19, 2022 at 12:58:12PM -0700, Dionna Amalie Glaze wrote:
> fw_err = 0xff doesn't make sense to me actually. It's not a documented
> code that the firmware was never called.
> Still, we can simply pass fw_err to snp_issue_guest_request rather
> than an unsigned long err, since a null pointer results in an -EINVAL.

Yes, pls do that. Such I/O function args are always a PITA anyway.

In retrospect, that handle_guest_request() with gazillion args should
have been made to take a struct as a single argument and populate it as
it operates.

The callers then would look at it and decide what to do.

Looking at the callers, they all take members of struct
snp_guest_request_ioctl and pass them in. A first step in cleaning that
up could be to simply pass that struct snp_guest_request_ioctl pointer
instead...

Oh well, in case folks feel bored. :-)

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ