On Fri, Sep 04, 2026 at 12:25:59PM +0100, Harry Yoo wrote:
> I don't understand why v3 of this patchset suddenly implements
> hardening for kfree() and usercopy to handle ERR_PTR().
> 
> The address range for 'zero or NULL PTR' range and ERR_PTR() do not
> overlap. The bugfixes and hardening patches are irrelevant.
> It should be a separate series?
> 
> Also usercopy.c changes go through the hardening tree, slub.c and
> slub_kunit.c changes go through the slab tree, and LKDTM has its own
> tree. Patch 3 and 5 touch files across multiple trees, which can be
> avoided.
> 

I added the ERR_PTR changes after Kees raised handling that range in the
v2 review [1]. The two topics also came up together in the 2014 [2] and
2019 [3] discussions; in the latter, Jann suggested a separate
warning-and-return check [4]. I wanted to broaden the discussion and see
whether considering both together might suggest a better approach.

I agree that the resulting implementations are independent. I'll send
v4 with the ZERO_SIZE_PTR alignment, exact-match and zero-size KUnit
patches only, and pursue the ERR_PTR work separately. I'll split that
work along the SLUB, usercopy and LKDTM boundaries you pointed out.

[1] https://lore.kernel.org/r/202608111716.0FA9DB17@keescook/
[2] https://lore.kernel.org/r/[email protected]/
[3] https://lore.kernel.org/r/[email protected]/
[4] 
https://lore.kernel.org/r/cag48ez05qvn6_gq2tbrra1a_dwqoassyubusu5ymwxx-gqm...@mail.gmail.com/

Thanks,
Karl


Reply via email to