Skip to content
Permalink
Branch: transit-namesp…
Commits on Oct 7, 2018
  1. tools: allow modification of transit net

    mahkoh committed Sep 6, 2018
    The command is
    
    wg set <device> [...] transit-netns <pid|file-path> [...]
    
    For example:
    
    wg set wg0 transit-netns 1
    wg set wg0 transit-netns /proc/1/ns/net
  2. tools: allow specifying the device namespace

    mahkoh committed Sep 11, 2018
    The user can now use
    
    wg --netns <pid|file-path> <subcommand>
    
    to specify the network namespace in which wg should act. This sets the
    attribute WGDEVICE_A_DEV_NETNS_PID or WGDEVICE_A_DEV_NETNS_FD.
    
    In the case of
    
    wg --netns <pid|file-path> show all
    
    we have to try to enter the network namespace because the kernel
    interface does not allow us to list devices in a network namespace
    referenced by pid or fd. Since entering a network namespace requires
    CAP_SYS_ADMIN in the current user namespace and the target user
    namespace, this is almost useless. TODO: Add the missing functionality
    to the kernel.
  3. netlink: allow modification of transit net

    mahkoh committed Sep 6, 2018
    This commit adds two new attributes of which at most one may be
    provided:
    
    * WGDEVICE_A_TRANSIT_NETNS_PID: NLA_U32
    * WGDEVICE_A_TRANSIT_NETNS_FD: NLA_U32
    
    The transit namespace is then set to this namespace. The caller must
    either be in this namespace or have CAP_NET_ADMIN in it.
  4. device: store a copy of the device net

    mahkoh committed Sep 6, 2018
    This eliminates the need for have_transit_net_ref because
    have_transit_net_ref == true if and only if dev_net != transit_net.
  5. netlink: restrict access to the UDP socket

    mahkoh committed Sep 11, 2018
    To interact with the UDP socket the caller must either be in the
    network namespace of the socket or have CAP_NET_ADMIN in that network
    namespace.
  6. netlink: allow specifying the device namespace

    mahkoh committed Sep 11, 2018
    This commit adds two new attributes of which at most one may be
    provided:
    
     * WGDEVICE_A_DEV_NETNS_PID: NLA_U32
     * WGDEVICE_A_DEV_NETNS_FD: NLA_U32
    
    The Wireguard device is then looked up in this namespace instead of the
    namespace of the netlink socket.
  7. device: protect socket_init with device_update_lock

    mahkoh committed Sep 6, 2018
    `set_port` in netlink.c races with `open` in device.c. This can cause
    the following code flow:
    
    * thread 1: set_port: device is not up
    * thread 2: device is opened
    * thread 2: open: called and calls socket_init with the original port
    * thread 1: set_port: sets incoming_port to the new port and returns
    
    incoming_port is then inconsistent. While this is not particularly
    critical, it will become more critial when ste_port also sets the
    transit namespace.
  8. crypto: use BIT(i) & bitmap instead of (bitmap >> i) & 1

    zx2c4 committed Oct 7, 2018
    Pros: clearer if you're not familiar with the shift idiom, uses kernel
    macro.
    
    Cons: doesn't work any more if the lvalue ever ceases to be a bool.
    
    Neutral: generates the same machine code.
    
    Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
  9. compat: clang cannot handle __builtin_constant_p

    zx2c4 committed Oct 7, 2018
    Or, put differently, we don't want to go chasing down random versions of
    clang used by XDA users, so we just disable this checking on clang all
    together.
  10. compat: make asm/simd.h conditional on its existence

    zx2c4 committed Oct 6, 2018
    Android kernels backported it, complicating things.
Commits on Oct 6, 2018
  1. version: bump snapshot

    zx2c4 committed Oct 6, 2018
Commits on Oct 5, 2018
  1. global: rename include'd C files to be .c

    zx2c4 committed Oct 5, 2018
    This is done by 259 other files in the kernel tree:
    
        linux $ rg '#include.*\.c' -l | wc -l
        259
    
    Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
  2. wg-quick.8: add policy routing example

    zx2c4 committed Oct 5, 2018
    Suggested-by: Toke Høiland-Jørgensen <toke@toke.dk>
    Suggested-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Commits on Oct 4, 2018
  1. curve25519-arm: rearrange multiplications for better in-order perform…

    zx2c4 committed Oct 4, 2018
    …ance
    
    Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
  2. curve25519-arm: writeback to base register when possible

    zx2c4 committed Oct 4, 2018
    Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Commits on Oct 3, 2018
  1. curve25519-arm: adjust comment

    zx2c4 committed Oct 3, 2018
Commits on Oct 2, 2018
  1. chacha20-arm: use proper reteq macro instead of bxeq

    zx2c4 committed Sep 30, 2018
    Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
  2. qemu: support powerpc64le

    zx2c4 committed Oct 1, 2018
    This uses ELFv2 ABI, which is the only ppc64 ABI musl supports. Big
    endian uses ELFv1 ABI, which musl doesn't support.
  3. qemu: give up and accept a mips64r2 world

    zx2c4 committed Oct 1, 2018
    We can't do SMP this way, and we also fall back to using the default N32
    ABI, which is a bummer. But the mips64r6 toolchain is too much of a
    hassle to build with Gentoo's crossdev, and at least this works.
  4. ratelimiter: prefer IS_ENABLED

    zx2c4 committed Oct 1, 2018
  5. global: change BUG_ON to WARN_ON

    zx2c4 committed Oct 1, 2018
    Suggested-by: Andrew Lunn <andrew@lunn.ch>
Older
You can’t perform that action at this time.