Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1472367

Re: [PATCH] livepatch: add load/unload hooks to objects

From Jiri Kosina <jikos@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] livepatch: add load/unload hooks to objects
Date 2016-08-30 11:50 +0200
Message-ID <sbNQ5-32D-5@gated-at.bofh.it> (permalink)
References <sauw9-2lJ-13@gated-at.bofh.it> <sauw9-2lJ-11@gated-at.bofh.it> <sbwFz-yc-13@gated-at.bofh.it> <sbxrX-14K-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 29 Aug 2016, Christopher Arges wrote:

> Another example is CVE-2016-2117. Here we need to unset NETIF_F_SG on a 
> particular device. If the device is already loaded we need a way to 
> fixup hw_features on an already allocated network device. Again this 
> could be done in the init code of the patch, but a nicer solution would 
> be to do this on a load/unload hook appropriately.

I am afraid this is more complicated than what you describe. You can't 
just unset NETIF_F_SG and be done with it; look for example what might 
happen if you clear the flag while skb_segment() is running and gcc is 
refetching netdev_features_t (there is no READ_ONCE() for that). The same 
holds for __ip6_append_data().
I am not saying this can't be worked around, but it's way much more 
complicated than just clearing a bit in a callback.

-- 
Jiri Kosina
SUSE Labs

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] livepatch: add load/unload hooks to objects Chris J Arges <chris.j.arges@canonical.com> - 2016-08-26 21:00 +0200
  Re: [PATCH] livepatch: add load/unload hooks to objects Petr Mladek <pmladek@suse.com> - 2016-08-29 17:30 +0200
    Re: [PATCH] livepatch: add load/unload hooks to objects Christopher Arges <chris.j.arges@canonical.com> - 2016-08-29 18:20 +0200
      Re: [PATCH] livepatch: add load/unload hooks to objects Jiri Kosina <jikos@kernel.org> - 2016-08-30 11:50 +0200
        Re: [PATCH] livepatch: add load/unload hooks to objects Christopher Arges <chris.j.arges@canonical.com> - 2016-08-30 15:00 +0200
      Re: [PATCH] livepatch: add load/unload hooks to objects Petr Mladek <pmladek@suse.com> - 2016-08-30 16:50 +0200
        Re: [PATCH] livepatch: add load/unload hooks to objects Christopher Arges <chris.j.arges@canonical.com> - 2016-08-30 17:20 +0200

csiph-web