14 Oct, 2020

1 commit


09 Oct, 2020

2 commits


03 Oct, 2020

1 commit


19 Aug, 2020

1 commit


29 Jun, 2020

1 commit

  • lockdep_set_class_and_subclass() is meant to reduce
    the _nested() annotations by assigning a default subclass.
    For addr_list_lock, we have to compute the subclass at
    run-time as the netdevice topology changes after creation.

    So, we should just get rid of these
    lockdep_set_class_and_subclass() and stick with our _nested()
    annotations.

    Fixes: 845e0ebb4408 ("net: change addr_list_lock back to static key")
    Suggested-by: Taehee Yoo
    Cc: Dmitry Vyukov
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     

10 Jun, 2020

1 commit

  • The dynamic key update for addr_list_lock still causes troubles,
    for example the following race condition still exists:

    CPU 0: CPU 1:
    (RCU read lock) (RTNL lock)
    dev_mc_seq_show() netdev_update_lockdep_key()
    -> lockdep_unregister_key()
    -> netif_addr_lock_bh()

    because lockdep doesn't provide an API to update it atomically.
    Therefore, we have to move it back to static keys and use subclass
    for nest locking like before.

    In commit 1a33e10e4a95 ("net: partially revert dynamic lockdep key
    changes"), I already reverted most parts of commit ab92d68fc22f
    ("net: core: add generic lockdep keys").

    This patch reverts the rest and also part of commit f3b0a18bb6cb
    ("net: remove unnecessary variables and callback"). After this
    patch, addr_list_lock changes back to using static keys and
    subclasses to satisfy lockdep. Thanks to dev->lower_level, we do
    not have to change back to ->ndo_get_lock_subclass().

    And hopefully this reduces some syzbot lockdep noises too.

    Reported-by: syzbot+f3a0e80c34b3fc28ac5e@syzkaller.appspotmail.com
    Cc: Taehee Yoo
    Cc: Dmitry Vyukov
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     

07 May, 2020

2 commits


05 May, 2020

1 commit

  • This patch reverts the folowing commits:

    commit 064ff66e2bef84f1153087612032b5b9eab005bd
    "bonding: add missing netdev_update_lockdep_key()"

    commit 53d374979ef147ab51f5d632dfe20b14aebeccd0
    "net: avoid updating qdisc_xmit_lock_key in netdev_update_lockdep_key()"

    commit 1f26c0d3d24125992ab0026b0dab16c08df947c7
    "net: fix kernel-doc warning in "

    commit ab92d68fc22f9afab480153bd82a20f6e2533769
    "net: core: add generic lockdep keys"

    but keeps the addr_list_lock_key because we still lock
    addr_list_lock nestedly on stack devices, unlikely xmit_lock
    this is safe because we don't take addr_list_lock on any fast
    path.

    Reported-and-tested-by: syzbot+aaa6fa4949cc5d9b7b25@syzkaller.appspotmail.com
    Cc: Dmitry Vyukov
    Cc: Taehee Yoo
    Signed-off-by: Cong Wang
    Acked-by: Taehee Yoo
    Signed-off-by: David S. Miller

    Cong Wang
     

01 May, 2020

1 commit

  • MACsec decryption always occurs in a softirq context. Since
    the FPU may not be usable in the softirq context, the call to
    decrypt may be scheduled on the cryptd work queue. The cryptd
    work queue does not provide ordering guarantees. Therefore,
    preserving order requires masking out ASYNC implementations
    of gcm(aes).

    For instance, an Intel CPU with AES-NI makes available the
    generic-gcm-aesni driver from the aesni_intel module to
    implement gcm(aes). However, this implementation requires
    the FPU, so it is not always available to use from a softirq
    context, and will fallback to the cryptd work queue, which
    does not preserve frame ordering. With this change, such a
    system would select gcm_base(ctr(aes-aesni),ghash-generic).
    While the aes-aesni implementation prefers to use the FPU, it
    will fallback to the aes-asm implementation if unavailable.

    By using a synchronous version of gcm(aes), the decryption
    will complete before returning from crypto_aead_decrypt().
    Therefore, the macsec_decrypt_done() callback will be called
    before returning from macsec_decrypt(). Thus, the order of
    calls to macsec_post_decrypt() for the frames is preserved.

    While it's presumable that the pure AES-NI version of gcm(aes)
    is more performant, the hybrid solution is capable of gigabit
    speeds on modest hardware. Regardless, preserving the order
    of frames is paramount for many network protocols (e.g.,
    triggering TCP retries). Within the MACsec driver itself, the
    replay protection is tripped by the out-of-order frames, and
    can cause frames to be dropped.

    This bug has been present in this code since it was added in
    v4.6, however it may not have been noticed since not all CPUs
    have FPU offload available. Additionally, the bug manifests
    as occasional out-of-order packets that are easily
    misattributed to other network phenomena.

    When this code was added in v4.6, the crypto/gcm.c code did
    not restrict selection of the ghash function based on the
    ASYNC flag. For instance, x86 CPUs with PCLMULQDQ would
    select the ghash-clmulni driver instead of ghash-generic,
    which submits to the cryptd work queue if the FPU is busy.
    However, this bug was was corrected in v4.8 by commit
    b30bdfa86431afbafe15284a3ad5ac19b49b88e3, and was backported
    all the way back to the v3.14 stable branch, so this patch
    should be applicable back to the v4.6 stable branch.

    Signed-off-by: Scott Dial
    Signed-off-by: David S. Miller

    Scott Dial
     

25 Apr, 2020

1 commit

  • When a macsec interface is created, the mtu is calculated with the lower
    interface's mtu value.
    If the mtu of lower interface is lower than the length, which is needed
    by macsec interface, macsec's mtu value will be overflowed.
    So, if the lower interface's mtu is too low, macsec interface's mtu
    should be set to 0.

    Test commands:
    ip link add dummy0 mtu 10 type dummy
    ip link add macsec0 link dummy0 type macsec
    ip link show macsec0

    Before:
    11: macsec0@dummy0: mtu 4294967274
    After:
    11: macsec0@dummy0: mtu 0

    Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver")
    Signed-off-by: Taehee Yoo
    Signed-off-by: David S. Miller

    Taehee Yoo
     

10 Apr, 2020

1 commit

  • In the macsec_changelink(), "struct macsec_tx_sa tx_sc" is used to
    store "macsec_secy.tx_sc".
    But, the struct type of tx_sc is macsec_tx_sc, not macsec_tx_sa.
    So, the macsec_tx_sc should be used instead.

    Test commands:
    ip link add dummy0 type dummy
    ip link add macsec0 link dummy0 type macsec
    ip link set macsec0 type macsec encrypt off

    Splat looks like:
    [61119.963483][ T9335] ==================================================================
    [61119.964709][ T9335] BUG: KASAN: slab-out-of-bounds in macsec_changelink.part.34+0xb6/0x200 [macsec]
    [61119.965787][ T9335] Read of size 160 at addr ffff888020d69c68 by task ip/9335
    [61119.966699][ T9335]
    [61119.966979][ T9335] CPU: 0 PID: 9335 Comm: ip Not tainted 5.6.0+ #503
    [61119.967791][ T9335] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
    [61119.968914][ T9335] Call Trace:
    [61119.969324][ T9335] dump_stack+0x96/0xdb
    [61119.969809][ T9335] ? macsec_changelink.part.34+0xb6/0x200 [macsec]
    [61119.970554][ T9335] print_address_description.constprop.5+0x1be/0x360
    [61119.971294][ T9335] ? macsec_changelink.part.34+0xb6/0x200 [macsec]
    [61119.971973][ T9335] ? macsec_changelink.part.34+0xb6/0x200 [macsec]
    [61119.972703][ T9335] __kasan_report+0x12a/0x170
    [61119.973323][ T9335] ? macsec_changelink.part.34+0xb6/0x200 [macsec]
    [61119.973942][ T9335] kasan_report+0xe/0x20
    [61119.974397][ T9335] check_memory_region+0x149/0x1a0
    [61119.974866][ T9335] memcpy+0x1f/0x50
    [61119.975209][ T9335] macsec_changelink.part.34+0xb6/0x200 [macsec]
    [61119.975825][ T9335] ? macsec_get_stats64+0x3e0/0x3e0 [macsec]
    [61119.976451][ T9335] ? kernel_text_address+0x111/0x120
    [61119.976990][ T9335] ? pskb_expand_head+0x25f/0xe10
    [61119.977503][ T9335] ? stack_trace_save+0x82/0xb0
    [61119.977986][ T9335] ? memset+0x1f/0x40
    [61119.978397][ T9335] ? __nla_validate_parse+0x98/0x1ab0
    [61119.978936][ T9335] ? macsec_alloc_tfm+0x90/0x90 [macsec]
    [61119.979511][ T9335] ? __kasan_slab_free+0x111/0x150
    [61119.980021][ T9335] ? kfree+0xce/0x2f0
    [61119.980700][ T9335] ? netlink_trim+0x196/0x1f0
    [61119.981420][ T9335] ? nla_memcpy+0x90/0x90
    [61119.982036][ T9335] ? register_lock_class+0x19e0/0x19e0
    [61119.982776][ T9335] ? memcpy+0x34/0x50
    [61119.983327][ T9335] __rtnl_newlink+0x922/0x1270
    [ ... ]

    Fixes: 3cf3227a21d1 ("net: macsec: hardware offloading infrastructure")
    Signed-off-by: Taehee Yoo
    Signed-off-by: David S. Miller

    Taehee Yoo
     

07 Apr, 2020

1 commit

  • macsec_upd_offload() gets the value of MACSEC_OFFLOAD_ATTR_TYPE
    without checking its presence in the request message, and this causes
    a NULL dereference. Fix it rejecting any configuration that does not
    include this attribute.

    Reported-and-tested-by: syzbot+7022ab7c383875c17eff@syzkaller.appspotmail.com
    Fixes: dcb780fb2795 ("net: macsec: add nla support for changing the offloading selection")
    Signed-off-by: Davide Caratti
    Signed-off-by: David S. Miller

    Davide Caratti
     

30 Mar, 2020

1 commit


27 Mar, 2020

6 commits

  • This patch makes real_dev_feature propagation by MACSec offloaded device.

    Issue description:
    real_dev features are disabled upon macsec creation.

    Root cause:
    Features limitation (specific to SW MACSec limitation) is being applied
    to HW offloaded case as well.
    This causes 'set_features' request on the real_dev with reduced feature
    set due to chain propagation.

    Proposed solution:
    Report real_dev features when HW offloading is enabled.
    NB! MACSec offloaded device does not propagate VLAN offload features at
    the moment. This can potentially be added later on as a separate patch.

    Note: this patch requires HW offloading to be enabled by default in order
    to function properly.

    Signed-off-by: Mark Starovoytov
    Signed-off-by: Igor Russkikh
    Signed-off-by: David S. Miller

    Mark Starovoytov
     
  • When HW offloading is enabled, offloaded stats should be used, because
    s/w stats are wrong and out of sync with the HW in this case.

    Signed-off-by: Dmitry Bogdanov
    Signed-off-by: Mark Starovoytov
    Signed-off-by: Igor Russkikh
    Signed-off-by: David S. Miller

    Dmitry Bogdanov
     
  • The idea is simple. If the frame is an exact match for the controlled port
    (based on DA comparison), then we simply divert this skb to matching port.

    Multicast/broadcast messages are delivered to all ports.

    Signed-off-by: Mark Starovoytov
    Signed-off-by: Igor Russkikh
    Signed-off-by: David S. Miller

    Mark Starovoytov
     
  • Offload engine can setup several SecY. Each macsec interface shall have
    its own mac address. It will filter a traffic by dest mac address.

    Signed-off-by: Dmitry Bogdanov
    Signed-off-by: Mark Starovoytov
    Signed-off-by: Igor Russkikh
    Signed-off-by: David S. Miller

    Dmitry Bogdanov
     
  • This patch adds secy pointer initialization in the macsec_context.
    It will be used by MAC drivers in offloading operations.

    Signed-off-by: Dmitry Bogdanov
    Signed-off-by: Mark Starovoytov
    Signed-off-by: Igor Russkikh
    Signed-off-by: David S. Miller

    Dmitry Bogdanov
     
  • This patch adds a new MACsec offloading option, MACSEC_OFFLOAD_MAC,
    allowing a user to select a MAC as a provider for MACsec offloading
    operations.

    Signed-off-by: Antoine Tenart
    Signed-off-by: Mark Starovoytov
    Signed-off-by: Igor Russkikh
    Signed-off-by: David S. Miller

    Antoine Tenart
     

26 Mar, 2020

1 commit


24 Mar, 2020

1 commit

  • Only attach macsec to ethernet devices.

    Syzbot was able to trigger a KMSAN warning in macsec_handle_frame
    by attaching to a phonet device.

    Macvlan has a similar check in macvlan_port_create.

    v1->v2
    - fix commit message typo

    Reported-by: syzbot
    Signed-off-by: Willem de Bruijn
    Signed-off-by: David S. Miller

    Willem de Bruijn
     

16 Mar, 2020

2 commits

  • Netlink support of extended packet number cipher suites,
    allows adding and updating XPN macsec interfaces.

    Added support in:
    * Creating interfaces with GCM-AES-XPN-128 and GCM-AES-XPN-256 suites.
    * Setting and getting 64bit packet numbers with of SAs.
    * Setting (only on SA creation) and getting ssci of SAs.
    * Setting salt when installing a SAK.

    Added 2 cipher suite identifiers according to 802.1AE-2018 table 14-1:
    * MACSEC_CIPHER_ID_GCM_AES_XPN_128
    * MACSEC_CIPHER_ID_GCM_AES_XPN_256

    In addition, added 2 new netlink attribute types:
    * MACSEC_SA_ATTR_SSCI
    * MACSEC_SA_ATTR_SALT

    Depends on: macsec: Support XPN frame handling - IEEE 802.1AEbw.

    Signed-off-by: Era Mayflower
    Signed-off-by: David S. Miller

    Era Mayflower
     
  • Support extended packet number cipher suites (802.1AEbw) frames handling.
    This does not include the needed netlink patches.

    * Added xpn boolean field to `struct macsec_secy`.
    * Added ssci field to `struct_macsec_tx_sa` (802.1AE figure 10-5).
    * Added ssci field to `struct_macsec_rx_sa` (802.1AE figure 10-5).
    * Added salt field to `struct macsec_key` (802.1AE 10.7 NOTE 1).
    * Created pn_t type for easy access to lower and upper halves.
    * Created salt_t type for easy access to the "ssci" and "pn" parts.
    * Created `macsec_fill_iv_xpn` function to create IV in XPN mode.
    * Support in PN recovery and preliminary replay check in XPN mode.

    In addition, according to IEEE 802.1AEbw figure 10-5, the PN of incoming
    frame can be 0 when XPN cipher suite is used, so fixed the function
    `macsec_validate_skb` to fail on PN=0 only if XPN is off.

    Signed-off-by: Era Mayflower
    Signed-off-by: David S. Miller

    Era Mayflower
     

11 Mar, 2020

2 commits


04 Mar, 2020

1 commit


15 Jan, 2020

4 commits

  • Allow to call macsec_pn_wrapped from hardware drivers to notify when a
    PN rolls over. Some drivers might used an interrupt to implement this.

    Signed-off-by: Antoine Tenart
    Signed-off-by: David S. Miller

    Antoine Tenart
     
  • MACsec offloading to underlying hardware devices is disabled by default
    (the software implementation is used). This patch adds support for
    changing this setting through the MACsec netlink interface. Many checks
    are done when enabling offloading on a given MACsec interface as there
    are limitations (it must be supported by the hardware, only a single
    interface can be offloaded on a given physical device at a time, rules
    can't be moved for now).

    Signed-off-by: Antoine Tenart
    Signed-off-by: David S. Miller

    Antoine Tenart
     
  • This patch introduces the MACsec hardware offloading infrastructure.

    The main idea here is to re-use the logic and data structures of the
    software MACsec implementation. This allows not to duplicate definitions
    and structure storing the same kind of information. It also allows to
    use a unified genlink interface for both MACsec implementations (so that
    the same userspace tool, `ip macsec`, is used with the same arguments).
    The MACsec offloading support cannot be disabled if an interface
    supports it at the moment.

    The MACsec configuration is passed to device drivers supporting it
    through macsec_ops which are called from the MACsec genl helpers. Those
    functions call the macsec ops of PHY and Ethernet drivers in two steps:
    a preparation one, and a commit one. The first step is allowed to fail
    and should be used to check if a provided configuration is compatible
    with the features provided by a MACsec engine, while the second step is
    not allowed to fail and should only be used to enable a given MACsec
    configuration. Two extra calls are made: when a virtual MACsec interface
    is created and when it is deleted, so that the hardware driver can stay
    in sync.

    The Rx and TX handlers are modified to take in account the special case
    were the MACsec transformation happens in the hardware, whether in a PHY
    or in a MAC, as the packets seen by the networking stack on both the
    physical and MACsec virtual interface are exactly the same. This leads
    to some limitations: the hardware and software implementations can't be
    used on the same physical interface, as the policies would be impossible
    to fulfill (such as strict validation of the frames). Also only a single
    virtual MACsec interface can be offloaded to a physical port supporting
    hardware offloading as it would be impossible to guess onto which
    interface a given packet should go (for ingress traffic).

    Another limitation as of now is that the counters and statistics are not
    reported back from the hardware to the software MACsec implementation.
    This isn't an issue when using offloaded MACsec transformations, but it
    should be added in the future so that the MACsec state can be reported
    to the user (which would also improve the debug).

    Signed-off-by: Antoine Tenart
    Signed-off-by: David S. Miller

    Antoine Tenart
     
  • This patch moves some structure, type and identifier definitions into a
    MACsec specific header. This patch does not modify how the MACsec code
    is running and only move things around. This is a preparation for the
    future MACsec hardware offloading support, which will re-use those
    definitions outside macsec.c.

    Signed-off-by: Antoine Tenart
    Signed-off-by: David S. Miller

    Antoine Tenart
     

25 Oct, 2019

3 commits

  • This patch removes variables and callback these are related to the nested
    device structure.
    devices that can be nested have their own nest_level variable that
    represents the depth of nested devices.
    In the previous patch, new {lower/upper}_level variables are added and
    they replace old private nest_level variable.
    So, this patch removes all 'nest_level' variables.

    In order to avoid lockdep warning, ->ndo_get_lock_subclass() was added
    to get lockdep subclass value, which is actually lower nested depth value.
    But now, they use the dynamic lockdep key to avoid lockdep warning instead
    of the subclass.
    So, this patch removes ->ndo_get_lock_subclass() callback.

    Signed-off-by: Taehee Yoo
    Signed-off-by: David S. Miller

    Taehee Yoo
     
  • When a macsec interface is created, it increases a refcnt to a lower
    device(real device). when macsec interface is deleted, the refcnt is
    decreased in macsec_free_netdev(), which is ->priv_destructor() of
    macsec interface.

    The problem scenario is this.
    When nested macsec interfaces are exiting, the exit routine of the
    macsec module makes refcnt leaks.

    Test commands:
    ip link add dummy0 type dummy
    ip link add macsec0 link dummy0 type macsec
    ip link add macsec1 link macsec0 type macsec
    modprobe -rv macsec

    [ 208.629433] unregister_netdevice: waiting for macsec0 to become free. Usage count = 1

    Steps of exit routine of macsec module are below.
    1. Calls ->dellink() in __rtnl_link_unregister().
    2. Checks refcnt and wait refcnt to be 0 if refcnt is not 0 in
    netdev_run_todo().
    3. Calls ->priv_destruvtor() in netdev_run_todo().

    Step2 checks refcnt, but step3 decreases refcnt.
    So, step2 waits forever.

    This patch makes the macsec module do not hold a refcnt of the lower
    device because it already holds a refcnt of the lower device with
    netdev_upper_dev_link().

    Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver")
    Signed-off-by: Taehee Yoo
    Signed-off-by: David S. Miller

    Taehee Yoo
     
  • Some interface types could be nested.
    (VLAN, BONDING, TEAM, MACSEC, MACVLAN, IPVLAN, VIRT_WIFI, VXLAN, etc..)
    These interface types should set lockdep class because, without lockdep
    class key, lockdep always warn about unexisting circular locking.

    In the current code, these interfaces have their own lockdep class keys and
    these manage itself. So that there are so many duplicate code around the
    /driver/net and /net/.
    This patch adds new generic lockdep keys and some helper functions for it.

    This patch does below changes.
    a) Add lockdep class keys in struct net_device
    - qdisc_running, xmit, addr_list, qdisc_busylock
    - these keys are used as dynamic lockdep key.
    b) When net_device is being allocated, lockdep keys are registered.
    - alloc_netdev_mqs()
    c) When net_device is being free'd llockdep keys are unregistered.
    - free_netdev()
    d) Add generic lockdep key helper function
    - netdev_register_lockdep_key()
    - netdev_unregister_lockdep_key()
    - netdev_update_lockdep_key()
    e) Remove unnecessary generic lockdep macro and functions
    f) Remove unnecessary lockdep code of each interfaces.

    After this patch, each interface modules don't need to maintain
    their lockdep keys.

    Signed-off-by: Taehee Yoo
    Signed-off-by: David S. Miller

    Taehee Yoo
     

26 Sep, 2019

1 commit

  • Fei Liu reported a crash when doing netperf on a topo of macsec
    dev over veth:

    [ 448.919128] refcount_t: underflow; use-after-free.
    [ 449.090460] Call trace:
    [ 449.092895] refcount_sub_and_test+0xb4/0xc0
    [ 449.097155] tcp_wfree+0x2c/0x150
    [ 449.100460] ip_rcv+0x1d4/0x3a8
    [ 449.103591] __netif_receive_skb_core+0x554/0xae0
    [ 449.108282] __netif_receive_skb+0x28/0x78
    [ 449.112366] netif_receive_skb_internal+0x54/0x100
    [ 449.117144] napi_gro_complete+0x70/0xc0
    [ 449.121054] napi_gro_flush+0x6c/0x90
    [ 449.124703] napi_complete_done+0x50/0x130
    [ 449.128788] gro_cell_poll+0x8c/0xa8
    [ 449.132351] net_rx_action+0x16c/0x3f8
    [ 449.136088] __do_softirq+0x128/0x320

    The issue was caused by skb's true_size changed without its sk's
    sk_wmem_alloc increased in tcp/skb_gro_receive(). Later when the
    skb is being freed and the skb's truesize is subtracted from its
    sk's sk_wmem_alloc in tcp_wfree(), underflow occurs.

    macsec is calling gro_cells_receive() to receive a packet, which
    actually requires skb->sk to be NULL. However when macsec dev is
    over veth, it's possible the skb->sk is still set if the skb was
    not unshared or expanded from the peer veth.

    ip_rcv() is calling skb_orphan() to drop the skb's sk for tproxy,
    but it is too late for macsec's calling gro_cells_receive(). So
    fix it by dropping the skb's sk earlier on rx path of macsec.

    Fixes: 5491e7c6b1a9 ("macsec: enable GRO and RPS on macsec devices")
    Reported-by: Xiumei Mu
    Reported-by: Fei Liu
    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     

03 Jul, 2019

2 commits


31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 3029 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

28 Apr, 2019

1 commit

  • Add options to strictly validate messages and dump messages,
    sometimes perhaps validating dump messages non-strictly may
    be required, so add an option for that as well.

    Since none of this can really be applied to existing commands,
    set the options everwhere using the following spatch:

    @@
    identifier ops;
    expression X;
    @@
    struct genl_ops ops[] = {
    ...,
    {
    .cmd = X,
    + .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
    ...
    },
    ...
    };

    For new commands one should just not copy the .validate 'opt-out'
    flags and thus get strict validation.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg