soc: qcom: cmd-db: Use %*pEhp specifier to add some sanity
Subsystems (2)
PATCH 1/1 soc: qcom: cmd-db: Use %*pEhp specifier to add some sanity
As Sashiko pointed out in [1] the %*pEp makes the whole thing like "no escape". To add some sanity to this the used specifier also includes ESCAPE_HEX.
---
Just a Link tag (no Fixes et alia) as the escaping seems to be a guard that never fired so far.
drivers/soc/qcom/cmd-db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/cmd-db.c +1 -1
@@ -308,7 +308,7 @@ static int cmd_db_debugfs_dump(struct seq_file *seq, void *p) ent =rsc_to_entry_header (rsc);for (j =0 ; j <le16_to_cpu (rsc->cnt); j++, ent++) { -seq_printf (seq,"0x%05x: %*pEp" ,le32_to_cpu (ent->addr), +seq_printf (seq,"0x%05x: %*pEhp" ,le32_to_cpu (ent->addr), (int )strnlen (ent->id,sizeof (ent->id)), ent->id); len =le16_to_cpu (ent->len);
Signature · 1 line
2.50.1
Quoted 3 lines · Andy Shevchenko
As Sashiko pointed out in [1] the %*pEp makes the whole thing like "no escape". To add some sanity to this the used specifier also includes
ESCAPE_HEX.
Any comments on this, please?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 11 lines · Andy Shevchenko
As Sashiko pointed out in [1] the %*pEp makes the whole thing like "no escape". To add some sanity to this the used specifier also includes
ESCAPE_HEX.Signed-off-by Andy Shevchenko <[email protected]>---
Just a Link tag (no Fixes et alia) as the escaping seems to be a guard that never fired so far.
The names are ASCII-only, but it's worth using escapes just in case we parse CMD-DB incorrectly.
Signature · 2 lines
With best wishes Dmitry
Quoted 6 lines · Andy Shevchenko
As Sashiko pointed out in [1] the %*pEp makes the whole thing like "no escape". To add some sanity to this the used specifier also includes
ESCAPE_HEX.Signed-off-by Andy Shevchenko <[email protected]>
Re: (subset) [PATCH v1 1/1] soc: qcom: cmd-db: Use %*pEhp specifier to add some sanity
In reply to Andy ShevchenkoQuoted 3 lines · Andy Shevchenko
As Sashiko pointed out in [1] the %*pEp makes the whole thing like "no escape". To add some sanity to this the used specifier also includes
ESCAPE_HEX.
Applied, thanks!
[1/1] soc: qcom: cmd-db: Use %*pEhp specifier to add some sanity
commit: 467173658f6c10e130025d4c358ae28a8c47a889
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>