17 Jan, 2019

1 commit

  • The section of bpfilter UMH blob is the ".bpfilter_umh". but this is not
    an explicit section. so linking warning occurred at compile time for the
    powerpc.
    So, this patch makes use of the ".rodata" instead of the ".bpfilter_umh".

    Config condition:

    CONFIG_BPFILTER=y
    CONFIG_BPFILTER_UMH=y

    Result:

    ld: warning: orphan section `.bpfilter_umh' from
    `net/bpfilter/bpfilter_umh_blob.o' being placed in section `.bpfilter_umh'

    Fixes: 61fbf5933d42 ("net: bpfilter: restart bpfilter_umh when error occurred")
    Reported-by: Stephen Rothwell
    Signed-off-by: Taehee Yoo
    Signed-off-by: David S. Miller

    Taehee Yoo
     

12 Jan, 2019

1 commit

  • The bpfilter_umh will be stopped via __stop_umh() when the bpfilter
    error occurred.
    The bpfilter_umh() couldn't start again because there is no restart
    routine.

    The section of the bpfilter_umh_{start/end} is no longer .init.rodata
    because these area should be reused in the restart routine. hence
    the section name is changed to .bpfilter_umh.

    The bpfilter_ops->start() is restart callback. it will be called when
    bpfilter_umh is stopped.
    The stop bit means bpfilter_umh is stopped. this bit is set by both
    start and stop routine.

    Before this patch,
    Test commands:
    $ iptables -vnL
    $ kill -9
    $ iptables -vnL
    [ 480.045136] bpfilter: write fail -32
    $ iptables -vnL

    All iptables commands will fail.

    After this patch,
    Test commands:
    $ iptables -vnL
    $ kill -9
    $ iptables -vnL
    $ iptables -vnL

    Now, all iptables commands will work.

    Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module")
    Signed-off-by: Taehee Yoo
    Signed-off-by: David S. Miller

    Taehee Yoo
     

28 Jun, 2018

1 commit