Re: [PATCH v1 02/16] khwasan: move common kasan and khwasan code to common.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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;





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux