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: <87857a72-eca0-4919-8e1d-ff04b9047d82@app.fastmail.com>
Date: Tue, 25 Feb 2025 12:13:31 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Kunihiko Hayashi" <hayashi.kunihiko@...ionext.com>,
 "Manivannan Sadhasivam" <manivannan.sadhasivam@...aro.org>,
 Krzysztof WilczyƄski <kw@...ux.com>,
 "Kishon Vijay Abraham I" <kishon@...nel.org>,
 "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
 "Lorenzo Pieralisi" <lpieralisi@...nel.org>,
 "Gustavo Pimentel" <gustavo.pimentel@...opsys.com>,
 "Bjorn Helgaas" <bhelgaas@...gle.com>, shuah <shuah@...nel.org>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, "Niklas Cassel" <cassel@...nel.org>
Subject: Re: [PATCH v4 5/6] misc: pci_endpoint_test: Remove global 'irq_type' and
 'no_msi'

On Tue, Feb 25, 2025, at 12:02, Kunihiko Hayashi wrote:
> The global variable "irq_type" preserves the current value of
> ioctl(GET_IRQTYPE).
>
> However, all tests that use interrupts first call ioctl(SET_IRQTYPE)
> to set test->irq_type, then write the value of test->irq_type into the
> register pointed by test_reg_bar, and request the interrupt to the
> endpoint. The endpoint function driver, pci-epf-test, refers to the
> register, and determine which type of interrupt to raise.
>
> The global variable "irq_type" is never used in the actual test,
> so remove the variable and replace it with test->irq_type.
>
> And also for the same reason, the variable "no_msi" can be removed.
>
> Initially, test->irq_type has IRQ_TYPE_UNDEFINED, and the
> ioctl(GET_IRQTYPE) before calling ioctl(SET_IRQTYPE) will return an error.
>
> Suggested-by: Niklas Cassel <cassel@...nel.org>
> Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>

Nice catch, always good to remove global variables with too generic names.

Acked-by: Arnd Bergmann <arnd@...db.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ