linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/4] net: bpfilter: fix two bugs in bpfilter
@ 2018-12-30 16:30 Taehee Yoo
  2019-01-04 20:54 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Taehee Yoo @ 2018-12-30 16:30 UTC (permalink / raw)
  To: davem, netdev, linux-kernel, daniel, ast, mcgrof; +Cc: ap420073

This patches fix two bugs in the bpfilter_umh which are related in
iptables command.

The first patch adds an exit code for UMH process.
This provides an opportunity to cleanup members of the umh_info
to modules which use the UMH.

The second patch makes the bpfilter_umh use UMH cleanup callback.

The third patch adds re-start routine for the bpfilter_umh.
The bpfilter_umh does not re-start after error occurred.
because there is no re-start routine in the module.

The fourth patch ensures that the bpfilter.ko module will not removed while
it's being used.
The bpfilter.ko is not protected by locks or module reference counter.
Therefore that can be removed while module is being used.
In order to protect that, mutex is used.

The first and second patch are preparation patches for the third and
fourth patch.

TEST #1
   while :
   do
	modprobe bpfilter
	kill -9 <pid of the bpfilter_umh>
	iptables -vnL
   done

TEST #2
   while :
   do
	iptables -I FORWARD -m string --string ap --algo kmp &
	iptables -F &
	modprobe -rv bpfilter &
   done

The TEST1 makes a failure of iptables command.
This is fixed by the third patch.

The TEST2 makes a panic because of a race condition in the bpfilter_umh
module.
This is fixed by the fourth patch.


Taehee Yoo (4):
  umh: add exit routine for UMH process
  net: bpfilter: use cleanup callback to release umh_info
  net: bpfilter: restart bpfilter_umh when error occurred
  net: bpfilter: disallow to remove bpfilter module while being used

 include/linux/bpfilter.h         | 15 +++++--
 include/linux/umh.h              |  4 ++
 kernel/exit.c                    |  1 +
 kernel/umh.c                     | 27 ++++++++++++
 net/bpfilter/bpfilter_kern.c     | 72 +++++++++++++++++---------------
 net/bpfilter/bpfilter_umh_blob.S |  2 +-
 net/ipv4/bpfilter/sockopt.c      | 59 +++++++++++++++++++++-----
 7 files changed, 132 insertions(+), 48 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net 0/4] net: bpfilter: fix two bugs in bpfilter
  2018-12-30 16:30 [PATCH net 0/4] net: bpfilter: fix two bugs in bpfilter Taehee Yoo
@ 2019-01-04 20:54 ` David Miller
  2019-01-05  2:59   ` Taehee Yoo
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2019-01-04 20:54 UTC (permalink / raw)
  To: ap420073; +Cc: netdev, linux-kernel, daniel, ast, mcgrof

From: Taehee Yoo <ap420073@gmail.com>
Date: Mon, 31 Dec 2018 01:30:45 +0900

> This patches fix two bugs in the bpfilter_umh which are related in
> iptables command.
 ...

I am still thinking about these patches, sorry for taking so long to
give a response.

Thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net 0/4] net: bpfilter: fix two bugs in bpfilter
  2019-01-04 20:54 ` David Miller
@ 2019-01-05  2:59   ` Taehee Yoo
  0 siblings, 0 replies; 3+ messages in thread
From: Taehee Yoo @ 2019-01-05  2:59 UTC (permalink / raw)
  To: David Miller; +Cc: Netdev, linux-kernel, Daniel Borkmann, ast, mcgrof

On Sat, 5 Jan 2019 at 05:54, David Miller <davem@davemloft.net> wrote:
>
> From: Taehee Yoo <ap420073@gmail.com>
> Date: Mon, 31 Dec 2018 01:30:45 +0900
>
> > This patches fix two bugs in the bpfilter_umh which are related in
> > iptables command.
>  ...
>
> I am still thinking about these patches, sorry for taking so long to
> give a response.
>
> Thank you.

Thank you for letting me know!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-05  2:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-30 16:30 [PATCH net 0/4] net: bpfilter: fix two bugs in bpfilter Taehee Yoo
2019-01-04 20:54 ` David Miller
2019-01-05  2:59   ` Taehee Yoo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).