mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Yang Shunyong <shunyong.yang@hxt-semitech.com>
Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] irqdomain: provide useful debugging information for irq domain
Date: Wed, 17 Jan 2018 08:37:05 +0000	[thread overview]
Message-ID: <210f90d0-1588-2185-4845-d5d143183621@arm.com> (raw)
In-Reply-To: <1516163877-32396-1-git-send-email-shunyong.yang@hxt-semitech.com>

Hi Yang,

On 17/01/18 04:37, Yang Shunyong wrote:
> With recent hashed kernel pointers change, output with %p will
> output hashed address. This patch changes %p to %px in irq domain
> debug information. As unprivileged user has no permission to mount
> debugfs or set printk level to KERN_DEBUG to access the information,
> changes in this patch are appropriate.
> 
> Signed-off-by: Yang Shunyong <shunyong.yang@hxt-semitech.com>
> ---
>  kernel/irq/irqdomain.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index 62068ad..d40fbed 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -75,7 +75,7 @@ struct fwnode_handle *__irq_domain_alloc_fwnode(unsigned int type, int id,
>  		n = kasprintf(GFP_KERNEL, "%s-%d", name, id);
>  		break;
>  	default:
> -		n = kasprintf(GFP_KERNEL, "irqchip@%p", data);
> +		n = kasprintf(GFP_KERNEL, "irqchip@%px", data);
>  		break;
>  	}
>  
> @@ -450,7 +450,7 @@ EXPORT_SYMBOL_GPL(irq_domain_check_msi_remap);
>   */
>  void irq_set_default_host(struct irq_domain *domain)
>  {
> -	pr_debug("Default domain set to @0x%p\n", domain);
> +	pr_debug("Default domain set to @0x%px\n", domain);
>  
>  	irq_default_domain = domain;
>  }
> @@ -635,7 +635,7 @@ unsigned int irq_create_mapping(struct irq_domain *domain,
>  	struct device_node *of_node;
>  	int virq;
>  
> -	pr_debug("irq_create_mapping(0x%p, 0x%lx)\n", domain, hwirq);
> +	pr_debug("%s(0x%px, 0x%lx)\n", __func__, domain, hwirq);
>  
>  	/* Look for default domain if nececssary */
>  	if (domain == NULL)
> @@ -644,7 +644,7 @@ unsigned int irq_create_mapping(struct irq_domain *domain,
>  		WARN(1, "%s(, %lx) called with NULL domain\n", __func__, hwirq);
>  		return 0;
>  	}
> -	pr_debug("-> using domain @%p\n", domain);
> +	pr_debug("-> using domain @%px\n", domain);
>  
>  	of_node = irq_domain_get_of_node(domain);
>  
> @@ -921,7 +921,7 @@ static void virq_debug_show_one(struct seq_file *m, struct irq_desc *desc)
>  		chip = irq_data_get_irq_chip(data);
>  		seq_printf(m, "%-15s  ", (chip && chip->name) ? chip->name : "none");
>  
> -		seq_printf(m, "0x%p  ", irq_data_get_irq_chip_data(data));
> +		seq_printf(m, "0x%px  ", irq_data_get_irq_chip_data(data));
>  
>  		seq_printf(m, "   %c    ", (desc->action && desc->action->handler) ? '*' : ' ');
>  		direct = (irq == hwirq) && (irq < domain->revmap_direct_max_irq);
> 

In all honesty, I'd be more inclined to remove this debug feature
altogether, as CONFIG_GENERIC_IRQ_DEBUGFS is more complete and more
useful. Is there any feature missing from that infrastructure that
prevents you from using it instead?

If the answer is "none", then I'll post a patch removing it.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2018-01-17  8:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17  4:37 Yang Shunyong
2018-01-17  8:37 ` Marc Zyngier [this message]
2018-01-17  9:18   ` Thomas Gleixner
2018-01-17  9:26     ` Marc Zyngier
2018-01-17  9:26     ` Yang, Shunyong
2018-01-17  9:33       ` Thomas Gleixner
     [not found]         ` <1516182426.3280.19.camel@hxt-semitech.com>
2018-01-17  9:56           ` [此邮件可能存在风险] " Marc Zyngier
     [not found]           ` <alpine.DEB.2.20.1801171056330.1777@nanos>
2018-01-17 10:20             ` Yang, Shunyong
2018-01-17 10:41               ` Thomas Gleixner
2018-01-17 10:43               ` Marc Zyngier
2018-01-18  1:53                 ` Yang, Shunyong
2018-01-18  8:54                   ` Marc Zyngier
2018-01-18 12:06                     ` Yang, Shunyong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=210f90d0-1588-2185-4845-d5d143183621@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shunyong.yang@hxt-semitech.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®