Re: [PATCH 08/21] binder: keep vma addresses type as unsigned long

From: Alice Ryhl
Date: Tue Nov 07 2023 - 04:08:40 EST


Carlos Llamas <cmllamas@xxxxxxxxxx> writes:
> - seq_printf(m, " size %zd:%zd data %pK\n",
> + seq_printf(m, " size %zd:%zd data %lx\n",
> buffer->data_size, buffer->offsets_size,
> buffer->user_data);

This changes all of the print operations to use %lx instead of %pK,
which means that the addresses are no longer being hidden when using
kptr_restrict.

Since the pointers are all userspace pointers, it's not clear to me what
the consequences of this are. However, I'd like to confirm whether this
is an intentional change?

And if so, maybe it should use %px instead?

(Everything else in this change LGTM.)

Alice