All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sound: stm32: replace "%p" with "%pK"
@ 2018-07-06 13:07 ` Benjamin Gaignard
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Gaignard @ 2018-07-06 13:07 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, mcoquelin.stm32,
	alexandre.torgue, arnaud.pouliquen
  Cc: alsa-devel, linux-arm-kernel, linux-kernel, Benjamin Gaignard

The format specifier "%p" can leak kernel addresses.
Use "%pK" instead.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 sound/soc/stm/stm32_adfsdm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c
index db73fef3e500..0e9373064032 100644
--- a/sound/soc/stm/stm32_adfsdm.c
+++ b/sound/soc/stm/stm32_adfsdm.c
@@ -149,7 +149,7 @@ static int stm32_afsdm_pcm_cb(const void *data, size_t size, void *private)
 	unsigned int old_pos = priv->pos;
 	unsigned int cur_size = size;
 
-	dev_dbg(rtd->dev, "%s: buff_add :%p, pos = %d, size = %zu\n",
+	dev_dbg(rtd->dev, "%s: buff_add :%pK, pos = %d, size = %zu\n",
 		__func__, &pcm_buff[priv->pos], priv->pos, size);
 
 	if ((priv->pos + size) > buff_size) {
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] sound: stm32: replace "%p" with "%pK"
@ 2018-07-06 13:07 ` Benjamin Gaignard
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Gaignard @ 2018-07-06 13:07 UTC (permalink / raw)
  To: linux-arm-kernel

The format specifier "%p" can leak kernel addresses.
Use "%pK" instead.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 sound/soc/stm/stm32_adfsdm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c
index db73fef3e500..0e9373064032 100644
--- a/sound/soc/stm/stm32_adfsdm.c
+++ b/sound/soc/stm/stm32_adfsdm.c
@@ -149,7 +149,7 @@ static int stm32_afsdm_pcm_cb(const void *data, size_t size, void *private)
 	unsigned int old_pos = priv->pos;
 	unsigned int cur_size = size;
 
-	dev_dbg(rtd->dev, "%s: buff_add :%p, pos = %d, size = %zu\n",
+	dev_dbg(rtd->dev, "%s: buff_add :%pK, pos = %d, size = %zu\n",
 		__func__, &pcm_buff[priv->pos], priv->pos, size);
 
 	if ((priv->pos + size) > buff_size) {
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] sound: stm32: replace "%p" with "%pK"
  2018-07-06 13:07 ` Benjamin Gaignard
  (?)
@ 2018-07-06 14:59   ` Takashi Iwai
  -1 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2018-07-06 14:59 UTC (permalink / raw)
  To: Benjamin Gaignard
  Cc: lgirdwood, mcoquelin.stm32, broonie, perex, alexandre.torgue,
	arnaud.pouliquen, alsa-devel, linux-arm-kernel,
	Benjamin Gaignard, linux-kernel

On Fri, 06 Jul 2018 15:07:03 +0200,
Benjamin Gaignard wrote:
> 
> The format specifier "%p" can leak kernel addresses.
> Use "%pK" instead.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>

The code change itself is OK (apart from the subject prefix to be
"ASoC").  But do we really want to patch manually every single place
like this?  There are thousands of files using '%p'.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] sound: stm32: replace "%p" with "%pK"
@ 2018-07-06 14:59   ` Takashi Iwai
  0 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2018-07-06 14:59 UTC (permalink / raw)
  To: Benjamin Gaignard
  Cc: lgirdwood, mcoquelin.stm32, broonie, perex, alexandre.torgue,
	arnaud.pouliquen, alsa-devel, linux-arm-kernel,
	Benjamin Gaignard, linux-kernel

On Fri, 06 Jul 2018 15:07:03 +0200,
Benjamin Gaignard wrote:
> 
> The format specifier "%p" can leak kernel addresses.
> Use "%pK" instead.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>

The code change itself is OK (apart from the subject prefix to be
"ASoC").  But do we really want to patch manually every single place
like this?  There are thousands of files using '%p'.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] sound: stm32: replace "%p" with "%pK"
@ 2018-07-06 14:59   ` Takashi Iwai
  0 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2018-07-06 14:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 06 Jul 2018 15:07:03 +0200,
Benjamin Gaignard wrote:
> 
> The format specifier "%p" can leak kernel addresses.
> Use "%pK" instead.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>

The code change itself is OK (apart from the subject prefix to be
"ASoC").  But do we really want to patch manually every single place
like this?  There are thousands of files using '%p'.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] sound: stm32: replace "%p" with "%pK"
  2018-07-06 14:59   ` Takashi Iwai
@ 2018-07-07 11:29     ` Benjamin Gaignard
  -1 siblings, 0 replies; 8+ messages in thread
From: Benjamin Gaignard @ 2018-07-07 11:29 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Liam Girdwood, Maxime Coquelin, Mark Brown, Jaroslav Kysela,
	Alexandre Torgue, Arnaud Pouliquen, alsa-devel, Linux ARM,
	Benjamin Gaignard, Linux Kernel Mailing List

2018-07-06 16:59 GMT+02:00 Takashi Iwai <tiwai@suse.de>:
> On Fri, 06 Jul 2018 15:07:03 +0200,
> Benjamin Gaignard wrote:
>>
>> The format specifier "%p" can leak kernel addresses.
>> Use "%pK" instead.
>>
>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
>
> The code change itself is OK (apart from the subject prefix to be
> "ASoC").  But do we really want to patch manually every single place
> like this?  There are thousands of files using '%p'.

I have limited myself to the few remaining %p in STM32 architecture.

>
>
> thanks,
>
> Takashi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] sound: stm32: replace "%p" with "%pK"
@ 2018-07-07 11:29     ` Benjamin Gaignard
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Gaignard @ 2018-07-07 11:29 UTC (permalink / raw)
  To: linux-arm-kernel

2018-07-06 16:59 GMT+02:00 Takashi Iwai <tiwai@suse.de>:
> On Fri, 06 Jul 2018 15:07:03 +0200,
> Benjamin Gaignard wrote:
>>
>> The format specifier "%p" can leak kernel addresses.
>> Use "%pK" instead.
>>
>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
>
> The code change itself is OK (apart from the subject prefix to be
> "ASoC").  But do we really want to patch manually every single place
> like this?  There are thousands of files using '%p'.

I have limited myself to the few remaining %p in STM32 architecture.

>
>
> thanks,
>
> Takashi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Applied "ASoC: stm32: replace "%p" with "%pK"" to the asoc tree
  2018-07-06 13:07 ` Benjamin Gaignard
  (?)
  (?)
@ 2018-07-09 11:16 ` Mark Brown
  -1 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2018-07-09 11:16 UTC (permalink / raw)
  To: benjamin.gaignard
  Cc: alsa-devel, Benjamin Gaignard, lgirdwood, linux-kernel,
	arnaud.pouliquen, tiwai, broonie, mcoquelin.stm32,
	linux-arm-kernel, alexandre.torgue

The patch

   ASoC: stm32: replace "%p" with "%pK"

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 8db339d66774821091f73bd0e57c8a7511c5988e Mon Sep 17 00:00:00 2001
From: "benjamin.gaignard@linaro.org" <benjamin.gaignard@linaro.org>
Date: Fri, 6 Jul 2018 15:07:03 +0200
Subject: [PATCH] ASoC: stm32: replace "%p" with "%pK"

The format specifier "%p" can leak kernel addresses.
Use "%pK" instead.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/stm/stm32_adfsdm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c
index db73fef3e500..0e9373064032 100644
--- a/sound/soc/stm/stm32_adfsdm.c
+++ b/sound/soc/stm/stm32_adfsdm.c
@@ -149,7 +149,7 @@ static int stm32_afsdm_pcm_cb(const void *data, size_t size, void *private)
 	unsigned int old_pos = priv->pos;
 	unsigned int cur_size = size;
 
-	dev_dbg(rtd->dev, "%s: buff_add :%p, pos = %d, size = %zu\n",
+	dev_dbg(rtd->dev, "%s: buff_add :%pK, pos = %d, size = %zu\n",
 		__func__, &pcm_buff[priv->pos], priv->pos, size);
 
 	if ((priv->pos + size) > buff_size) {
-- 
2.18.0.rc2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-09 11:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-06 13:07 [PATCH] sound: stm32: replace "%p" with "%pK" Benjamin Gaignard
2018-07-06 13:07 ` Benjamin Gaignard
2018-07-06 14:59 ` Takashi Iwai
2018-07-06 14:59   ` Takashi Iwai
2018-07-06 14:59   ` Takashi Iwai
2018-07-07 11:29   ` Benjamin Gaignard
2018-07-07 11:29     ` Benjamin Gaignard
2018-07-09 11:16 ` Applied "ASoC: stm32: replace "%p" with "%pK"" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.