drivers/perf: convert sysfs sprintf family to sysfs_emit
authorQi Liu <liuqi115@huawei.com>
Fri, 19 Mar 2021 10:04:33 +0000 (18:04 +0800)
committerWill Deacon <will@kernel.org>
Thu, 25 Mar 2021 12:55:44 +0000 (12:55 +0000)
commitfb62d67586afc046f3783d819985c737f6b0b666
tree812c6b649bc448360dbdf0c19c40e87f27e7962f
parent9ec9f9cf8660d549c77e719d2ce11647a03063b9
drivers/perf: convert sysfs sprintf family to sysfs_emit

sprintf does not know the PAGE_SIZE maximum of the temporary buffer
used for sysfs content and it's possible to overrun the buffer length.

Use sysfs_emit() function to ensures that no overrun is done.

Signed-off-by: Qi Liu <liuqi115@huawei.com>
Link: https://lore.kernel.org/r/1616148273-16374-4-git-send-email-liuqi115@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm_dmc620_pmu.c
drivers/perf/arm_smmuv3_pmu.c
drivers/perf/fsl_imx8_ddr_perf.c
drivers/perf/hisilicon/hisi_uncore_pmu.c
drivers/perf/qcom_l2_pmu.c
drivers/perf/qcom_l3_pmu.c
drivers/perf/thunderx2_pmu.c
drivers/perf/xgene_pmu.c