On 05/08/2018 08:20 PM, Andrey Konovalov wrote: > + > +void set_track(struct kasan_track *track, gfp_t flags) This was - static inline void set_track(struct kasan_track *track, gfp_t flags) and still used only locally. > +{ > + track->pid = current->pid; > + track->stack = save_stack(flags); > +} > + > /* > * Adaptive redzone policy taken from the userspace AddressSanitizer runtime. > * For larger allocations larger redzones are used. > */ > -static unsigned int optimal_redzone(unsigned int object_size) > +unsigned int optimal_redzone(unsigned int object_size) I'd rather move this in common too. For khwasan you could just add: if (IS_ENABLED(CONFIG_KASAN_HW)) return 0;