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]
Date:   Thu, 6 Oct 2022 12:27:09 -0400
From:   Jason Andryuk <jandryuk@...il.com>
To:     Juergen Gross <jgross@...e.com>
Cc:     linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
        Stefano Stabellini <sstabellini@...nel.org>,
        Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        xen-devel@...ts.xenproject.org
Subject: Re: [PATCH v2] xen/pcifront: move xenstore config scanning into sub-function

On Thu, Oct 6, 2022 at 11:35 AM Juergen Gross <jgross@...e.com> wrote:
>
> pcifront_try_connect() and pcifront_attach_devices() share a large
> chunk of duplicated code for reading the config information from
> Xenstore, which only differs regarding calling pcifront_rescan_root()
> or pcifront_scan_root().
>
> Put that code into a new sub-function. It is fine to always call
> pcifront_rescan_root() from that common function, as it will fallback
> to pcifront_scan_root() if the domain/bus combination isn't known
> yet (and pcifront_scan_root() should never be called for an already
> kneon domain/bus combination anyway). In order to avoid duplicate

known

> messages for the fallback case move the check for domain/bus not knwon

known

> to the beginning of pcifront_rescan_root().
>
> While at it fix the error reporting in case the root-xx node had the
> wrong format.
>
> As the return value of pcifront_try_connect() and
> pcifront_attach_devices() are not used anywhere make those functions
> return void. As an additional bonus this removes the dubious return
> of -EFAULT in case of an unexpected driver state.
>
> Signed-off-by: Juergen Gross <jgross@...e.com>

Reviewed-by: Jason Andryuk <jandryuk@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ