Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1476499 > unrolled thread
| Started by | Marc Zyngier <marc.zyngier@arm.com> |
|---|---|
| First post | 2016-09-05 16:40 +0200 |
| Last post | 2016-09-05 16:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/2] genirq: Use firmware identifier while adding domain Marc Zyngier <marc.zyngier@arm.com> - 2016-09-05 16:40 +0200
| From | Marc Zyngier <marc.zyngier@arm.com> |
|---|---|
| Date | 2016-09-05 16:40 +0200 |
| Subject | Re: [PATCH 2/2] genirq: Use firmware identifier while adding domain |
| Message-ID | <se3e2-50e-15@gated-at.bofh.it> |
On 31/05/16 13:56, Punit Agrawal wrote: > Use the firmware provided identifier for the domain name. > > Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> > --- > kernel/irq/irqdomain.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c > index 1fe2fea..3af09e1 100644 > --- a/kernel/irq/irqdomain.c > +++ b/kernel/irq/irqdomain.c > @@ -114,6 +114,10 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, > domain->hwirq_max = hwirq_max; > domain->revmap_size = size; > domain->revmap_direct_max_irq = direct_max; > + if (is_fwnode_irqchip(fwnode)) > + domain->name = container_of(fwnode, struct irqchip_fwid, fwnode)->name; So this thing worries me to no end. Look at the way irqchip_fwid is constructed: name = kasprintf(GFP_KERNEL, "irqchip@%p", data); You'd end-up disclosing a kernel address, which is not a very good idea. > + else > + domain->name = of_node_full_name(of_node); And what if the node gets pruned (as it can happen on OpenFirmware implementations)? > irq_domain_check_hierarchy(domain); > > mutex_lock(&irq_domain_mutex); > Thanks, M. -- Jazz is not dead. It just smells funny...
Back to top | Article view | linux.kernel
csiph-web