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  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]
Date:   Thu, 26 Nov 2020 10:47:33 +0000
From:   John Garry <john.garry@...wei.com>
To:     Marc Zyngier <maz@...nel.org>
CC:     Thomas Gleixner <tglx@...utronix.de>, <gregkh@...uxfoundation.org>,
        <rafael@...nel.org>, <martin.petersen@...cle.com>,
        <jejb@...ux.ibm.com>, <linuxarm@...wei.com>,
        <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] genirq/affinity: Add irq_update_affinity_desc()

Hi Marc,

>> Right, I did consider this.
> 
> FWIW, I've pushed my hack branch[1]

Did you miss that reference?

> out with a couple of patches
> for you to try (the top 3 patches). They allow platform-MSI domains
> created by devices (mbigen, ICU) to be advertised as shared between
> devices, so that the low-level driver can handle that in an appropriate
> way.
> 
> I gave it a go on my D05 and nothing blew up, but I can't really remove
> the kernel module, as that's where my disks are... :-/

You still should be able to enable my favorite 
CONFIG_DEBUG_TEST_DRIVER_REMOVE=y, while the distro still boot. But I'll 
just test if you want.

> Please let me know if that helps.
> 
>>> It is just that passing that information down isn't a simple affair,
>>> as msi_alloc_info_t isn't a generic type... Let me have a think.
>>
>> I think that there is a way to circumvent the problem, which you might
>> call hacky, but OTOH, not sure if there's much point changing mbigen
>> or related infrastructure at this stage.
> 
> Bah, it's a simple change, and there is now more than the mbigen using
> the same API...
> 
>>
>> Anyway, so we have 128 irqs in total for the mbigen domain, but the
>> driver only is interesting in something like irq indexes 1,2,72-81,
>> and 96-112. So we can just dispose the mappings for irq index 0-112 at
>> removal stage, thereby keeping the its device around. We do still call
>> platform_irq_count(), which sets up all 128 mappings, so maybe we
>> should be unmapping all of these - this would be the contentious part.
>> But maybe not, as the device driver is only interested in that subset,
>> and has no business unmapping the rest.
> 
> I don't think the driver should mess with interrupts it doesn't own.

I would tend to agree. But all 128 lines here are for the SAS 
controller. It's quite strange, as only about ~20 are useful.

> And while the mbigen port that is connected to the SAS controller
> doesn't seem to be shared between endpoints, some other ports definitely
> are:
> 
> # cat /sys/kernel/debug/irq/domains/\\_SB.MBI1
> name:   \_SB.MBI1
>   size:   409
>   mapped: 192
>   flags:  0x00000003
> 
> [...]
> 
> I guess that the other 217 lines are connected somewhere.
> 

I think that is not the right one. See 
https://github.com/tianocore/edk2-platforms/blob/master/Silicon/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05Sas.asl#L101


Thanks,
John

Powered by blists - more mailing lists