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:	Sat, 10 Oct 2015 20:40:04 +0800
From:	Baoquan He <bhe@...hat.com>
To:	Joerg Roedel <joro@...tes.org>
Cc:	iommu@...ts.linux-foundation.org, kexec@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/10] iommu/amd: Copy the old ir table

On 09/29/15 at 06:11pm, Joerg Roedel wrote:
> On Thu, Sep 24, 2015 at 02:37:36PM +0800, Baoquan He wrote:
> Is it necessary to copy the old ir tables? On AMD these tables are
> per-device, so it is probably the best to handle them like the io
> page-tables and just update the pointer to it in the device-table upon
> interrupt initialization.

Now the timer interrupt bug disappeared, but I may not handle the irq
remapping correctly. Currently I add another function copy_irq_table()
to fill out the table->table if the irq remapping table existed in
amd_iommu_dev_table[devid].data[2]. This is called in copy_dev_tables().
However my ata hard disk always startup wrongly, then the kdump failed
because no root disk. From log and adding dump_stack() it should be the
irq remapping issues, always there are many lines of message triggered
by modify_irte() calling like below:

*****************************
AMD-Vi: Completion-Wait loop timed out
*****************************

I don't know which part of irq remapping handling I didn't noticed. The
attachment is the kdump boot log with my current debugging code. If you
think that's helpful I can arrange and repost another round of draft
patch sets.


static void copy_irq_table(u16 devid)
{
        struct irq_remap_table *table = NULL;
        u16 alias;
        u64 dte;

        alias = amd_iommu_alias_table[devid];
        table = irq_lookup_table[alias];
        if (table) {
                irq_lookup_table[devid] = table;
                return;
        }
        dte     = amd_iommu_dev_table[devid].data[2];
        dte &= DTE_IRQ_PHYS_ADDR_MASK;
        if(!dte)
                return;

        table = kzalloc(sizeof(*table), GFP_ATOMIC);
        if (!table){
                pr_warn("AMD-Vi: amd irq table allocation failed\n");
                return;
        }
        table->table = ioremap_cache(dte, MAX_IRQS_PER_TABLE * sizeof(u32));
        irq_lookup_table[devid] = table;
}

View attachment "kdump-amd.log" of type "text/plain" (101452 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ