Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07504540 authored by Maya Erez's avatar Maya Erez
Browse files

msm_11ad: use %pK to avoid kernel address information leak



Use %pK instead of plain %p to avoid leaking of kernel addresses
to userspace.

Change-Id: Ie870cc2df07c45ba04140fd51d52b5e28cc8df41
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent 78033016
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -780,7 +780,7 @@ static int msm_11ad_smmu_init(struct msm11ad_ctx *ctx)
static int msm_11ad_ssr_shutdown(const struct subsys_desc *subsys,
static int msm_11ad_ssr_shutdown(const struct subsys_desc *subsys,
				 bool force_stop)
				 bool force_stop)
{
{
	pr_info("%s(%p,%d)\n", __func__, subsys, force_stop);
	pr_info("%s(%pK,%d)\n", __func__, subsys, force_stop);
	/* nothing is done in shutdown. We do full recovery in powerup */
	/* nothing is done in shutdown. We do full recovery in powerup */
	return 0;
	return 0;
}
}
@@ -791,7 +791,7 @@ static int msm_11ad_ssr_powerup(const struct subsys_desc *subsys)
	struct platform_device *pdev;
	struct platform_device *pdev;
	struct msm11ad_ctx *ctx;
	struct msm11ad_ctx *ctx;


	pr_info("%s(%p)\n", __func__, subsys);
	pr_info("%s(%pK)\n", __func__, subsys);


	pdev = to_platform_device(subsys->dev);
	pdev = to_platform_device(subsys->dev);
	ctx = platform_get_drvdata(pdev);
	ctx = platform_get_drvdata(pdev);
@@ -1185,12 +1185,12 @@ static int msm_11ad_probe(struct platform_device *pdev)
	msm_11ad_init_cpu_boost(ctx);
	msm_11ad_init_cpu_boost(ctx);


	/* report */
	/* report */
	dev_info(ctx->dev, "msm_11ad discovered. %p {\n"
	dev_info(ctx->dev, "msm_11ad discovered. %pK {\n"
		 "  gpio_en = %d\n"
		 "  gpio_en = %d\n"
		 "  sleep_clk_en = %d\n"
		 "  sleep_clk_en = %d\n"
		 "  rc_index = %d\n"
		 "  rc_index = %d\n"
		 "  use_smmu = %d\n"
		 "  use_smmu = %d\n"
		 "  pcidev = %p\n"
		 "  pcidev = %pK\n"
		 "}\n", ctx, ctx->gpio_en, ctx->sleep_clk_en, ctx->rc_index,
		 "}\n", ctx, ctx->gpio_en, ctx->sleep_clk_en, ctx->rc_index,
		 ctx->use_smmu, ctx->pcidev);
		 ctx->use_smmu, ctx->pcidev);


@@ -1227,7 +1227,7 @@ static int msm_11ad_remove(struct platform_device *pdev)


	msm_11ad_ssr_deinit(ctx);
	msm_11ad_ssr_deinit(ctx);
	list_del(&ctx->list);
	list_del(&ctx->list);
	dev_info(ctx->dev, "%s: pdev %p pcidev %p\n", __func__, pdev,
	dev_info(ctx->dev, "%s: pdev %pK pcidev %pK\n", __func__, pdev,
		 ctx->pcidev);
		 ctx->pcidev);
	kfree(ctx->pristine_state);
	kfree(ctx->pristine_state);


@@ -1490,7 +1490,7 @@ void *msm_11ad_dev_init(struct device *dev, struct wil_platform_ops *ops,
	struct msm11ad_ctx *ctx = pcidev2ctx(pcidev);
	struct msm11ad_ctx *ctx = pcidev2ctx(pcidev);


	if (!ctx) {
	if (!ctx) {
		pr_err("Context not found for pcidev %p\n", pcidev);
		pr_err("Context not found for pcidev %pK\n", pcidev);
		return NULL;
		return NULL;
	}
	}