lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170511.105311.1695831326048998410.davem@davemloft.net>
Date:   Thu, 11 May 2017 10:53:11 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     daniel@...earbox.net
Cc:     ast@...com, alexei.starovoitov@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH 3/5] bpf: Add strict alignment flag for BPF_PROG_LOAD.

From: Daniel Borkmann <daniel@...earbox.net>
Date: Thu, 11 May 2017 14:53:58 +0200

> On 05/10/2017 09:09 PM, David Miller wrote:
>> @@ -3574,6 +3581,10 @@ int bpf_check(struct bpf_prog **prog, union
>> bpf_attr *attr)
>>   	} else {
>>   		log_level = 0;
>>   	}
>> +	if (attr->prog_flags & BPF_F_STRICT_ALIGNMENT)
>> +		strict_alignment = true;
>> +	else
>> +		strict_alignment = false;
> 
> Just minor nit: Can we move this into struct bpf_verifier_env
> here instead of global var? The only change it would need is
> in check_ptr_alignment() to pass the env from check_mem_access().
> check_ptr_alignment() can then infer this from env.

I was just being lazy and doing it the way bpf_log is done. :-)

I've moved it into bpf_verifier_env, no problem.

> Rest looks good:
> 
> Acked-by: Daniel Borkmann <daniel@...earbox.net>

Thanks again for review.

Powered by blists - more mailing lists