Re: [PATCH v3 27/46] kmsan: instrumentation.h: add instrumentation_begin_with_regs()

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

 



On Tue, Apr 26 2022 at 18:42, Alexander Potapenko wrote:
> +void kmsan_instrumentation_begin(struct pt_regs *regs)
> +{
> +	struct kmsan_context_state *state = &kmsan_get_context()->cstate;
> +
> +	if (state)
> +		__memset(state, 0, sizeof(struct kmsan_context_state));

  sizeof(*state) please

> +	if (!kmsan_enabled || !regs)
> +		return;

Why has state to be cleared when kmsan is not enabled and how do you end up
with regs == NULL here?

Thanks,

        tglx



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux