Re: [PATCH V2] audit: normalize NETFILTER_PKT (fwd)

2017-02-22 Thread Julia Lawall
-- Date: Thu, 23 Feb 2017 12:43:05 +0800 From: kbuild test robot <fengguang...@intel.com> To: kbu...@01.org Cc: Julia Lawall <julia.law...@lip6.fr> Subject: Re: [PATCH V2] audit: normalize NETFILTER_PKT CC: kbuild-...@01.org In-Reply-To: <9504740e9333a0b7074abe0dddfc487aeeae6cff

Re: question about xt_find_table_lock

2016-11-11 Thread Julia Lawall
On Fri, 11 Nov 2016, Florian Westphal wrote: > Julia Lawall <julia.law...@lip6.fr> wrote: > > The function xt_find_table_lock defined in net/netfilter/x_tables.c is > > preceeded by a comment that says that it returns ERR_PTR() on error. But > > looking at

question about xt_find_table_lock

2016-11-11 Thread Julia Lawall
The function xt_find_table_lock defined in net/netfilter/x_tables.c is preceeded by a comment that says that it returns ERR_PTR() on error. But looking at the definition, I only see occurrences of return NULL and returns of pointers that have previously been dereferenced. Is it the code or the

[PATCH] netfilter: x_tables: simplify IS_ERR_OR_NULL to NULL test

2016-11-11 Thread Julia Lawall
hen != t=e - IS_ERR_OR_NULL(t) + !t @@ expression t,e,e1; @@ t = \(xt_find_table_lock(...)\| try_then_request_module(xt_find_table_lock(...),...)\) ... when != t=e ?- t ? PTR_ERR(t) : e1 + e1 ... when any // Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- net/ipv4/netfil

Re: [Outreachy kernel] [PATCH] net: Remove unnecessary cast on void pointer

2017-03-28 Thread Julia Lawall
On Tue, 28 Mar 2017, simran singhal wrote: > The following Coccinelle script was used to detect this: > @r@ > expression x; > void* e; > type T; > identifier f; > @@ > ( > *((T *)e) > | > ((T *)x)[...] > | > ((T*)x)->f > | > > - (T*) > e > ) > > Signed-off-by: simran singhal

Re: [Outreachy kernel] [PATCH] net: netfilter: remove unused variable

2017-03-29 Thread Julia Lawall
On Wed, 29 Mar 2017, Arushi Singhal wrote: > This patch uses the following coccinelle script to remove > a variable that was simply used to store the return > value of a function call before returning it: > > @@ > identifier len,f; > @@ > > -int len; > ... when != len > when strict > -len

Re: [Outreachy kernel] Re: [PATCH] iptables: Constify option struct

2017-03-27 Thread Julia Lawall
On Tue, 28 Mar 2017, Gargi Sharma wrote: > On Tue, Mar 28, 2017 at 12:45 AM, Gargi Sharma wrote: > > On Tue, Mar 28, 2017 at 12:42 AM, Pablo Neira Ayuso > > wrote: > >> > >> On Tue, Mar 28, 2017 at 12:40:15AM +0530, Gargi Sharma wrote: > >> > The

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
On Sat, 29 Jul 2017, Florian Westphal wrote: > Julia Lawall <julia.law...@lip6.fr> wrote: > > > > > > On Sat, 29 Jul 2017, Florian Westphal wrote: > > > > > Julia Lawall <julia.law...@lip6.fr> wrote: > > > > The

Re: [PATCH 1/1] netfilter: constify nf_conntrack_l3/4proto parameters

2017-07-29 Thread Julia Lawall
On Sat, 29 Jul 2017, Florian Westphal wrote: > Julia Lawall <julia.law...@lip6.fr> wrote: > > When a nf_conntrack_l3/4proto parameter is not on the left hand side > > of an assignment, its address is not taken, and it is not passed to a > > function that may mod

[PATCH 0/1 v2] constify nf_conntrack_l3/4proto parameters

2017-07-30 Thread Julia Lawall
When a nf_conntrack_l3/4proto parameter is not on the left hand side of an assignment, its address is not taken, and it is not passed to a function that may modify its fields, then it can be declared as const. This change is useful from a documentation point of view, and can possibly facilitate

[PATCH 1/1 v2] netfilter: constify nf_conntrack_l3/4proto parameters

2017-07-30 Thread Julia Lawall
making some nf_conntrack_l3/4proto structures const subsequently. Done with the help of Coccinelle. Some spacing adjusted to fit within 80 characters. Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- v2: Added consideration of array parameters. This adds transfor

[PATCH 1/1 v3 nf-next] netfilter: constify nf_conntrack_l3/4proto parameters

2017-08-01 Thread Julia Lawall
making some nf_conntrack_l3/4proto structures const subsequently. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- v3: Rebased against nf-next. Some functions, such as nf_ct_l3proto_pernet_register, are no longer defined, so they are no longer u

[PATCH 0/1 v3 nf-next] constify nf_conntrack_l3/4proto parameters

2017-08-01 Thread Julia Lawall
When a nf_conntrack_l3/4proto parameter is not on the left hand side of an assignment, its address is not taken, and it is not passed to a function that may modify its fields, then it can be declared as const. This change is useful from a documentation point of view, and can possibly facilitate

[PATCH nf-next] netfilter: constify nf_loginfo structures

2017-08-01 Thread Julia Lawall
@depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct nf_loginfo i = { ... }; // Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- net/ipv4/netfilter/ip_tables.c |2 +- net/ipv4/netfilter/nf_log_arp.c |2 +- net/ipv4/netfilter/nf_log_ipv4.c |2 +

[PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
The nf_hook_ops structure is only passed as the second argument to nf_register_net_hook or nf_unregister_net_hook, both of which are declared as const. Thus the nf_hook_ops structure itself can be const. Done with the help of Coccinelle. --- net/decnet/netfilter/dn_rtmsg.c|2 +-

[PATCH 1/2] decnet: dn_rtmsg: constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
; @@ static +const struct nf_hook_ops i = { ... }; // Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- net/decnet/netfilter/dn_rtmsg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c index a

[PATCH 2/2] netfilter: ipt_CLUSTERIP: constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
; @@ static +const struct nf_hook_ops i = { ... }; // Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- net/ipv4/netfilter/ipt_CLUSTERIP.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c

Re: [Outreachy kernel] [PATCH] src: buffer is not null terminated

2017-10-08 Thread Julia Lawall
The subject line is not very clear. Apparently, some buffer (which one?) is not null terminated (but what will you do about it?). It would be better to say what is done inthe subject line, eg Use snprintf rather than strncpy, and then as you already do explain why the change is desirable in the

[PATCH] netfilter: nf_tables: fix odd_ptr_err.cocci warnings

2018-01-11 Thread Julia Lawall
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b4464bcab38d3f7fe995a7cb960eeac6889bec08 commit: 3b49e2e94e6ebb8b23d0955d9e898254455734f8 [8286/9035] netfilter: nf_tables: add flow table netlink frontend The following is a 0-day report generated by