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: <53e4d6c3-ee19-fd04-4ba3-862d04558689@codeaurora.org>
Date:   Fri, 1 Jun 2018 11:06:53 -0400
From:   Sinan Kaya <okaya@...eaurora.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     linux-pci@...r.kernel.org, Timur Tabi <timur@...eaurora.org>,
        linux-arm-msm@...r.kernel.org,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
        Jonathan Corbet <corbet@....net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Christoffer Dall <cdall@...aro.org>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Marc Zyngier <marc.zyngier@....com>,
        Kai-Heng Feng <kai.heng.feng@...onical.com>,
        Thymo van Beers <thymovanbeers@...il.com>,
        Frederic Weisbecker <frederic@...nel.org>,
        Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        David Rientjes <rientjes@...gle.com>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        Juergen Gross <jgross@...e.com>, Borislav Petkov <bp@...e.de>,
        Mikulas Patocka <mpatocka@...hat.com>,
        Petr Tesarik <ptesarik@...e.cz>,
        Andy Lutomirski <luto@...nel.org>,
        Dou Liyang <douly.fnst@...fujitsu.com>,
        Ram Pai <linuxram@...ibm.com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PCI: move early dump functionality from x86 arch into the
 common code

On 6/1/2018 11:02 AM, Andy Shevchenko wrote:
> On Wed, May 30, 2018 at 7:34 AM, Sinan Kaya <okaya@...eaurora.org> wrote:
>> Move early dump functionality into common code so that it is available for
>> all archtiectures. No need to carry arch specific reads around as the read
>> hooks are already initialized by the time pci_setup_device() is getting
>> called during scan.
> 
>>  /* If set, the PCIe ATS capability will not be used. */
>>  static bool pcie_ats_disabled;
>>
>> +bool pci_early_dump;
>> +
> 
> I didn't check above these, but maybe a good idea to add one line
> comment what is this about?

This was discussed here: 

https://www.spinics.net/lists/linux-pci/msg72859.html

> 
> 
>>  extern const unsigned char pcie_link_speed[];
>> -
>> +extern bool pci_early_dump;
>>  bool pcie_cap_has_lnkctl(const struct pci_dev *dev);
>>
> 
> Hmm... I would rather not attach this line to some function declarations.

Sure

> 
>> +static void early_dump_pci_device(struct pci_dev *pdev)
>> +{
>> +       u32 value[256 / 4];
>> +       int i;
>> +
>> +       dev_info(&pdev->dev, "pci 0000:%02x:%02x.%d config space:\n",
>> +                pdev->bus->number, PCI_SLOT(pdev->devfn),
>> +                PCI_FUNC(pdev->devfn));
> 
> Shouldn't be this changed to pci_info() ?

Yeah, I need to get used to pci_info().

> 
>> +
>> +       for (i = 0; i < 256; i += 4)
>> +               pci_read_config_dword(pdev, i, &value[i / 4]);
>> +
>> +       print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, value,
>> +                      256, false);
>> +}
> 


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ