Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: vc04_services: Use %p to log pointer
@ 2023-11-07 16:55 Umang Jain
  2023-11-07 16:55 ` [PATCH 1/2] staging: vc04_services: Use %p to log pointer address Umang Jain
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Umang Jain @ 2023-11-07 16:55 UTC (permalink / raw)
  To: linux-staging, linux-rpi-kernel, linux-arm-kernel, linux-media
  Cc: Stefan Wahren, Greg Kroah-Hartman, Dan Carpenter, Kieran Bingham,
	Laurent Pinchart, Dave Stevenson, Phil Elwell,
	Ricardo B . Marliere, Umang Jain

%lx is used to print the unmodified pointer address for debugging.
%p will print the hashed pointer address to avoid leaking information
about kernel memory layout to userspace. But when `no_hash_pointers`
is passed as kernel parameter, unmodified pointer address will be
printed.

Hence, drop %lx in favour of %p. For debugging purposes, one can
easily depend on `no_hash_pointers`.

This also solves the following smatch warnings:
service_callback() warn: argument 7 to %lx specifier is cast from pointer
service_callback() warn: argument 11 to %lx specifier is cast from pointer
service_callback() warn: argument 12 to %lx specifier is cast from pointer
service_callback() warn: argument 13 to %lx specifier is cast from pointer
vchiq_release() warn: argument 7 to %lx specifier is cast from pointer

Umang Jain (2):
  staging: vc04_services: Use %p to log pointer address
  staging: vc04_services: Use %p to log pointer address

 .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c  | 7 +++----
 .../staging/vc04_services/interface/vchiq_arm/vchiq_dev.c  | 4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

-- 
2.41.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-11-23 13:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-07 16:55 [PATCH 0/2] staging: vc04_services: Use %p to log pointer Umang Jain
2023-11-07 16:55 ` [PATCH 1/2] staging: vc04_services: Use %p to log pointer address Umang Jain
2023-11-07 16:55 ` [PATCH 2/2] " Umang Jain
2023-11-23 13:14 ` [PATCH 0/2] staging: vc04_services: Use %p to log pointer Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox