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

 



On Tue, Nov 08, 2016 at 11:46:01AM +0100, Jan Stancek wrote:
 > On 11/07/2016 03:34 PM, Dave Jones wrote:
 > > I think it might be better if we wrap all of net/bpf.c in this ifdef,
 > > and then add additional ones wherever we call bpf_gen_filter.
 > > (Right now only two places iirc)
 > 
 > Attached is v2, that follows your suggestion.
 
 Close..
 
 > diff --git a/syscalls/bpf.c b/syscalls/bpf.c
 > index 476a2778d8a0..372ab6dc5376 100644
 > --- a/syscalls/bpf.c
 > +++ b/syscalls/bpf.c
 > @@ -29,9 +29,11 @@ static void bpf_prog_load(struct syscallrecord *rec)
 >  	attr->prog_type = RAND_ARRAY(bpf_prog_types);
 >  
 >  	switch (attr->prog_type) {
 > +#ifdef USE_BPF
 >  	case BPF_PROG_TYPE_SOCKET_FILTER:
 >  		bpf_gen_filter(&insns, &len);
 >  		break;
 > +#endif
 >  	default:
 >  		// this will go away when all the other cases are enumerated
 >  		insns = zmalloc(page_size);

This chunk isn't needed because the whole file is already wrapped.

	Dave

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux