On Wed, Mar 23, 2022 at 02:57:30PM +0100, Vlastimil Babka wrote: > I guess it's the simplest thing to do for now. For the future we can > still improve and handle all combinations of kasan/lockdep to occupy as > few bits as possible and set the shift/mask appropriately. Or consider > first if it's necessary anyway. I don't know if we really expect at any > point to start triggering the BUILD_BUG_ON() in radix_tree_init() and > then only some combination of configs will reduce the flags to a number > that works. Or is there anything else that depends on __GFP_BITS_SHIFT? The correct long-term solution is to transition all the radix tree users to the XArray, which has the GFP flags specified in the correct place (ie at the call site) instead of embedding the GFP flags in the data structure. I've paused work on that while I work on folios; by my count there are about 60 users left. What I really need is something which prevents any attempt to add new users. Maybe that's a job for checkpatch.