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: <8ab95f7f784448038d7777c45f1f2d55@intel.com>
Date:   Thu, 2 Sep 2021 19:34:35 +0000
From:   "Winkler, Tomas" <tomas.winkler@...el.com>
To:     Barry Song <21cnbao@...il.com>,
        "Sang, Oliver" <oliver.sang@...el.com>
CC:     lkp <lkp@...el.com>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
        "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
        Barry Song <song.bao.hua@...ilicon.com>,
        LKML <linux-kernel@...r.kernel.org>,
        "lkp@...ts.01.org" <lkp@...ts.01.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Marc Zyngier <maz@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Jonathan.Cameron@...wei.com" <Jonathan.Cameron@...wei.com>,
        "bilbao@...edu" <bilbao@...edu>, Jonathan Corbet <corbet@....net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "leon@...nel.org" <leon@...nel.org>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        Linuxarm <linuxarm@...wei.com>,
        "luzmaximilian@...il.com" <luzmaximilian@...il.com>,
        "mchehab+huawei@...nel.org" <mchehab+huawei@...nel.org>,
        "schnelle@...ux.ibm.com" <schnelle@...ux.ibm.com>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
Subject: RE: [PCI/MSI] a4fc4cf388:
 dmesg.genirq:Flags_mismatch_irq##(mei_me)vs.#(xhci_hcd)

> dmesg.genirq:Flags_mismatch_irq##(mei_me)vs.#(xhci_hcd)
> 
> On Tue, Aug 31, 2021 at 1:21 PM Barry Song <21cnbao@...il.com> wrote:
> >
> > On Mon, Aug 30, 2021 at 2:38 AM kernel test robot
> <oliver.sang@...el.com> wrote:
> > >
> > >
> > >
> > > Greeting,
> > >
> > > FYI, we noticed the following commit (built with gcc-9):
> > >
> > > commit: a4fc4cf388319ea957ffbdab5073bdd267de9082 ("[PATCH v3 3/3]
> > > PCI/MSI: remove msi_attrib.default_irq in msi_desc")
> > > url:
> > > https://github.com/0day-ci/linux/commits/Barry-Song/PCI-MSI-Clarify-
> > > the-IRQ-sysfs-ABI-for-PCI-devices/20210825-183018
> > > base:
> > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
> > > 6e764bcd1cf72a2846c0e53d3975a09b242c04c9
> > >
> > > in testcase: kernel-selftests
> > > version: kernel-selftests-x86_64-ebaa603b-1_20210825
> > > with following parameters:
> > >
> > >         group: pidfd
> > >         ucode: 0xe2
> > >
> > > test-description: The kernel contains a set of "self tests" under the
> tools/testing/selftests/ directory. These are intended to be small unit tests
> to exercise individual code paths in the kernel.
> > > test-url: https://www.kernel.org/doc/Documentation/kselftest.txt
> > >
> > >
> > > on test machine: 4 threads Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
> > > with 32G memory
> > >
> > > caused below changes (please refer to attached dmesg/kmsg for entire
> log/backtrace):
> > >
> > >
> > >
> > > If you fix the issue, kindly add following tag
> > > Reported-by: kernel test robot <oliver.sang@...el.com>
> > >
> > >
> > >
> > > [  179.602028][   T34] genirq: Flags mismatch irq 16. 00002000 (mei_me) vs.
> 00000000 (xhci_hcd)
> > > [  179.614073][   T34] CPU: 2 PID: 34 Comm: kworker/u8:2 Not tainted
> 5.14.0-rc7-00014-ga4fc4cf38831 #1
> > > [  179.623225][   T34] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT,
> BIOS 1.8.1 12/05/2017
> > > [  179.631432][   T34] Workqueue: events_unbound async_run_entry_fn
> > > [  179.637543][   T34] Call Trace:
> > > [  179.640789][   T34]  dump_stack_lvl+0x45/0x59
> > > [  179.645253][   T34]  __setup_irq.cold+0x50/0xd4
> > > [  179.649893][   T34]  ? mei_me_pg_exit_sync+0x480/0x480 [mei_me]
> > > [  179.655923][   T34]  request_threaded_irq+0x10c/0x180
> > > [  179.661073][   T34]  ? mei_me_irq_quick_handler+0x240/0x240
> [mei_me]
> > > [  179.667528][   T34]  mei_me_probe+0x131/0x300 [mei_me]
> > > [  179.672767][   T34]  local_pci_probe+0x42/0x80
> > > [  179.677313][   T34]  pci_device_probe+0x107/0x1c0
> > > [  179.682118][   T34]  really_probe+0xb6/0x380
> > > [  179.687094][   T34]  __driver_probe_device+0xfe/0x180
> > > [  179.692242][   T34]  driver_probe_device+0x1e/0xc0
> > > [  179.697133][   T34]  __driver_attach_async_helper+0x2b/0x80
> > > [  179.702802][   T34]  async_run_entry_fn+0x30/0x140
> > > [  179.707693][   T34]  process_one_work+0x274/0x5c0
> > > [  179.712503][   T34]  worker_thread+0x50/0x3c0
> > > [  179.716959][   T34]  ? process_one_work+0x5c0/0x5c0
> > > [  179.721936][   T34]  kthread+0x14f/0x180
> > > [  179.725958][   T34]  ? set_kthread_struct+0x40/0x40
> > > [  179.730935][   T34]  ret_from_fork+0x22/0x30
> > > [  179.735699][   T34] mei_me 0000:00:16.0: request_threaded_irq failure.
> irq = 16
> > > [  179.743125][   T34] mei_me 0000:00:16.0: initialization failed.
> > > [  179.749399][   T34] mei_me: probe of 0000:00:16.0 failed with error -16
> > >
> > >
> >
> > it seems there is a direct reference to pdev->irq.
> > Hi Oliver, would you try if the below patch can fix the problem:
> 
> + Tomas
> 
> sorry. after second looking, drivers/misc/mei/pci-me.c has many places using
> pdev->irq directly. We really need this driver's maintainers to address the
> problem.

Will look at that. 
> 
> On the other hand, "struct mei_me_hw *hw" seems to be totally not used in
> this driver except here:
> 164 static int mei_me_probe(struct pci_dev *pdev, const struct
> pci_device_id *ent)
> 165 {
> 166         const struct mei_cfg *cfg;
> 167         struct mei_device *dev;
> 168         struct mei_me_hw *hw;
> 169         unsigned int irqflags;
> 170         int err;
> .....
> 219         hw->irq = pdev->irq;
> ...
> 
> this looks wrong. maybe we can leverage hw->irq in other places such as
> shutdown, suspend, resume.

We need this, usage will follow.
> 
> Thanks
> barry
> 
> 
> >
> > diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
> > index c3393b383e59..a45a2d4257a6 100644
> > --- a/drivers/misc/mei/pci-me.c
> > +++ b/drivers/misc/mei/pci-me.c
> > @@ -216,7 +216,7 @@ static int mei_me_probe(struct pci_dev *pdev,
> > const struct pci_device_id *ent)
> >
> >         pci_enable_msi(pdev);
> >
> > -       hw->irq = pdev->irq;
> > +       hw->irq = pci_irq_vector(pdev, 0);
> >
> >          /* request and enable interrupt */
> >         irqflags = pci_dev_msi_enabled(pdev) ? IRQF_ONESHOT :
> > IRQF_SHARED;
> >
> >
> > I don't have any hardware to test.


Hard to believe, MEI is on every Intel client platform :)

> >
> > >
> > > To reproduce:
> > >
> > >         git clone https://github.com/intel/lkp-tests.git
> > >         cd lkp-tests
> > >         bin/lkp install                job.yaml  # job file is attached in this email
> > >         bin/lkp split-job --compatible job.yaml  # generate the yaml file for
> lkp run
> > >         bin/lkp run                    generated-yaml-file
> > >
> > >
> > >
> > > ---
> > > 0DAY/LKP+ Test Infrastructure                   Open Source Technology Center
> > > https://lists.01.org/hyperkitty/list/lkp@lists.01.org       Intel Corporation
> > >
> > > Thanks,
> > > Oliver Sang
> > >
> >
> > Thanks
> > barry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ