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: <55DB29B5.3010202@imgtec.com>
Date:	Mon, 24 Aug 2015 15:27:01 +0100
From:	Qais Yousef <qais.yousef@...tec.com>
To:	Marc Zyngier <marc.zyngier@....com>,
	Thomas Gleixner <tglx@...utronix.de>
CC:	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	Jason Cooper <jason@...edaemon.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>
Subject: Re: [PATCH 01/10] irqchip: irq-mips-gic: export gic_send_ipi

On 08/24/2015 02:32 PM, Marc Zyngier wrote:
> On 24/08/15 14:02, Qais Yousef wrote:
>> On 08/24/2015 01:49 PM, Thomas Gleixner wrote:
>>> On Mon, 24 Aug 2015, Qais Yousef wrote:
>>>
>>>> Some drivers might require to send ipi to other cores. So export it.
>>> Which IPIs do you need to send from a driver which are not exposed by
>>> the SMP functions already?
>> It's not an SMP IPI. We use GIC to exchange interrupts between AXD and
>> the host system since AXD is another MIPS core in the cluster.
> So is this the case of another CPU in the system that is not under
> control of Linux, but that you need to signal anyway? How do you agree
> on the IPI number between the two systems?

When Linux loads AXD firmware into memory it places the GIC numbers to 
use at a specific offset there as part of the startup protocol. When AXD 
starts running it will see these values and use them to send and receive 
interrupts.

>
>>>> This will be used later by AXD driver.
>>> That smells fishy and it wants a proper explanation WHY and not just a
>>> sloppy statement that it will be used later. I can figure that out
>>> myself as exporting a function without using it does not make any sense.
>> Sorry for the terse explanation. As pointed above AXD uses GIC to send
>> and receive interrupts to the host core. Without this change I can't
>> compile the driver as a driver module because the symbol is not exported.
>>
>> Does this make things clearer?
> To me, it feels like this is yet another case of routing interrupts to
> another agent in the system, which is not a CPU under the kernel's
> control. There is at least two other platforms doing similar craziness
> (a Freescale platform, and at least one Nvidia).
>
> I'd rather see something more "architected" than this blind export, or
> at least some level of filtering (the idea random drivers can access
> such a low-level function doesn't make me feel very good).

I don't know how to architect this better or how to perform  the 
filtering, but I'm happy to hear suggestions and try them out.
Keep in mind that detecting GIC and writing your own gic_send_ipi() is 
very simple. I have done this when the driver was out of tree. So 
restricting it by not exporting it will not prevent someone from really 
accessing the functionality, it's just they have to do it their own way.

Thanks,
Qais

>
> Thanks,
>
> 	M.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ