On Tue, May 15, 2018 at 3:28 PM, Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> wrote: > > > 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); >> +} >> + Will fix in v2. > > > >> /* >> * 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; > > Will move in v2.