13 Apr
2023
13 Apr
'23
6:46 a.m.
On Thu, Apr 13, 2023 at 07:41:06AM +0300, Dan Carpenter wrote:
On Tue, Apr 11, 2023 at 06:22:20PM +0200, Guennadi Liakhovetski wrote:
Hi,
Actually there's no black magic there because there's no dereference but only pointer arithmetic. The compiler just adds the calculated offset to NULL and passes that small pointer to printk().
The code in check_pointer_msg() is supposed to detect bugs but we're taking advantage of it and introducing bugs... It's might not be magic but it's pretty astonishing.
"efault" is not a mispelling of default. The "e" means error.
regards, dan carpenter