Re: [PATCH v2 25/35] nds32: Build infrastructure

2017-11-29 Thread Geert Uytterhoeven
On Thu, Nov 30, 2017 at 6:48 AM, Greentime Hu wrote: > 2017-11-30 4:27 GMT+08:00 Arnd Bergmann : >> On Wed, Nov 29, 2017 at 3:10 PM, Greentime Hu wrote: >>> 2017-11-29 19:57 GMT+08:00 Arnd Bergmann : On Wed, Nov 29, 2017

Re: [PATCH v4 7/8] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-29 Thread Souptick Joarder
Hi David, Dan, On Thu, Nov 30, 2017 at 12:50 AM, David Daney wrote: > On 11/29/2017 08:07 AM, Souptick Joarder wrote: >> >> On Wed, Nov 29, 2017 at 4:00 PM, Souptick Joarder >> wrote: >>> >>> On Wed, Nov 29, 2017 at 6:25 AM, David Daney

Re: [PATCH v2 25/35] nds32: Build infrastructure

2017-11-29 Thread Greentime Hu
2017-11-30 4:27 GMT+08:00 Arnd Bergmann : > On Wed, Nov 29, 2017 at 3:10 PM, Greentime Hu wrote: >> 2017-11-29 19:57 GMT+08:00 Arnd Bergmann : >>> On Wed, Nov 29, 2017 at 12:39 PM, Greentime Hu wrote: How about this?

Re: [PATCH net-next 0/2] bpf/tracing: allow user space to query prog array on the same tp

2017-11-29 Thread Alexei Starovoitov
On 11/28/17 11:20 PM, Yonghong Song wrote: Commit e87c6bc3852b ("bpf: permit multiple bpf attachments for a single perf event") added support to attach multiple bpf programs to a single perf event. Given a perf event (kprobe, uprobe, or kernel tracepoint), the perf ioctl interface is used to

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-11-29 Thread Tobin C. Harding
On Wed, Nov 29, 2017 at 08:41:36PM -0800, Joe Perches wrote: > On Thu, 2017-11-30 at 15:18 +1100, Tobin C. Harding wrote: > > On Wed, Nov 29, 2017 at 07:58:26PM -0800, Joe Perches wrote: > > > On Thu, 2017-11-30 at 10:26 +1100, Tobin C. Harding wrote: > > > > On Wed, Nov 29, 2017 at 03:20:58PM

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-11-29 Thread Joe Perches
On Thu, 2017-11-30 at 15:18 +1100, Tobin C. Harding wrote: > On Wed, Nov 29, 2017 at 07:58:26PM -0800, Joe Perches wrote: > > On Thu, 2017-11-30 at 10:26 +1100, Tobin C. Harding wrote: > > > On Wed, Nov 29, 2017 at 03:20:58PM -0800, Andrew Morton wrote: > > > > On Wed, 29 Nov 2017 13:05:04 +1100

Re: [PATCH net,stable v2] vhost: fix skb leak in handle_rx()

2017-11-29 Thread Wei Xu
On Wed, Nov 29, 2017 at 10:43:33PM +0800, Jason Wang wrote: > > > On 2017年11月29日 22:23, w...@redhat.com wrote: > > From: Wei Xu > > > > Matthew found a roughly 40% tcp throughput regression with commit > > c67df11f(vhost_net: try batch dequing from skb array) as discussed > >

Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-11-29 Thread Jakub Kicinski
On Wed, 29 Nov 2017 20:10:09 -0800, Stephen Hemminger wrote: > On Wed, 29 Nov 2017 19:51:38 -0800 Jakub Kicinski wrote: > > On Thu, 30 Nov 2017 11:29:56 +0800, Jason Wang wrote: > > > On 2017年11月29日 03:27, Jesse Brandeburg wrote: > > > commit 0c195567a8f6e82ea5535cd9f1d54a1626dd233e > > >

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-11-29 Thread Tobin C. Harding
On Wed, Nov 29, 2017 at 07:58:26PM -0800, Joe Perches wrote: > On Thu, 2017-11-30 at 10:26 +1100, Tobin C. Harding wrote: > > On Wed, Nov 29, 2017 at 03:20:58PM -0800, Andrew Morton wrote: > > > On Wed, 29 Nov 2017 13:05:04 +1100 "Tobin C. Harding" > > > wrote: > > > > > > >

Re: KASAN: use-after-free Read in sock_release

2017-11-29 Thread Al Viro
On Thu, Nov 30, 2017 at 02:07:19AM +, Al Viro wrote: > FWIW, looking through the callers of sock_alloc_file()... we might be > better off if it did sock_release() on failure. Then the calling > conventions become "sock_alloc_file() means not calling sock_release() > directly - either it'll

Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-11-29 Thread Stephen Hemminger
On Wed, 29 Nov 2017 19:51:38 -0800 Jakub Kicinski wrote: > On Thu, 30 Nov 2017 11:29:56 +0800, Jason Wang wrote: > > On 2017年11月29日 03:27, Jesse Brandeburg wrote: > > > Hi, I'd like to get some feedback on a proposal to enhance > > > virtio-net to ease

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-11-29 Thread Joe Perches
On Thu, 2017-11-30 at 10:26 +1100, Tobin C. Harding wrote: > On Wed, Nov 29, 2017 at 03:20:58PM -0800, Andrew Morton wrote: > > On Wed, 29 Nov 2017 13:05:04 +1100 "Tobin C. Harding" wrote: > > > > > printk specifier %p now hashes all addresses before printing. Sometimes > > > we

Re: Commit 05cf0d1bf4 ("net: stmmac: free an skb first when there are no longer any descriptors using it") breaks stmmac?

2017-11-29 Thread Niklas Cassel
On Mon, Nov 27, 2017 at 02:41:00PM +, Jose Abreu wrote: > Hi Niklas, Hello Jose, > > I think your commit 05cf0d1bf4 ("net: stmmac: free an skb first > when there are no longer any descriptors using it") is breaking > stmmac driver in multi-queue configuration (this stacktrace may > contain

Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-11-29 Thread Jakub Kicinski
On Thu, 30 Nov 2017 11:29:56 +0800, Jason Wang wrote: > On 2017年11月29日 03:27, Jesse Brandeburg wrote: > > Hi, I'd like to get some feedback on a proposal to enhance virtio-net > > to ease configuration of a VM and that would enable live migration of > > passthrough network SR-IOV devices. > > > >

Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-11-29 Thread Jason Wang
On 2017年11月29日 03:27, Jesse Brandeburg wrote: Hi, I'd like to get some feedback on a proposal to enhance virtio-net to ease configuration of a VM and that would enable live migration of passthrough network SR-IOV devices. Today we have SR-IOV network devices (VFs) that can be passed into a VM

Re: [BUG] kernel stack corruption during/after Netlabel error

2017-11-29 Thread Casey Schaufler
On 11/29/2017 4:31 PM, James Morris wrote: > On Wed, 29 Nov 2017, Casey Schaufler wrote: > >> I see that there is a proposed fix later in the thread, but I don't see >> the patch. Could you send it to me, so I can try it on my problem? > Forwarded off-list. The patch does fix the problem I was

Re: [Patch net v2] act_sample: get rid of tcf_sample_cleanup_rcu()

2017-11-29 Thread Eric Dumazet
On Wed, 2017-11-29 at 16:07 -0800, Cong Wang wrote: > Similar to commit d7fb60b9cafb ("net_sched: get rid of tcfa_rcu"), > TC actions don't need to respect RCU grace period, because it > is either just detached from tc filter (standalone case) or > it is removed together with tc filter (bound

Re: [PATCH net,stable v2] vhost: fix skb leak in handle_rx()

2017-11-29 Thread Jason Wang
On 2017年11月29日 23:31, Michael S. Tsirkin wrote: On Wed, Nov 29, 2017 at 09:23:24AM -0500,w...@redhat.com wrote: From: Wei Xu Matthew found a roughly 40% tcp throughput regression with commit c67df11f(vhost_net: try batch dequing from skb array) as discussed in the following

[PATCH net] sit: update frag_off info

2017-11-29 Thread Hangbin Liu
After parsing the sit netlink change info, we forget to update frag_off in ipip6_tunnel_update(). Fix it by assigning frag_off with new value. Fixes: f37234160233 ("sit: add support of link creation via rtnl") Reported-by: Jianlin Shi Signed-off-by: Hangbin Liu

Re: KASAN: use-after-free Read in sock_release

2017-11-29 Thread Al Viro
On Wed, Nov 29, 2017 at 11:37:04AM -0800, Cong Wang wrote: > > Allocated by task 31066: > > save_stack+0x43/0xd0 mm/kasan/kasan.c:447 > > set_track mm/kasan/kasan.c:459 [inline] > > kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 > > kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3613 > > kmalloc

Re: KASAN: use-after-free Read in sock_release

2017-11-29 Thread Al Viro
On Wed, Nov 29, 2017 at 12:24:55PM -0800, Linus Torvalds wrote: > Ugh. The inode freeing really is confusing and fairly involved, but > the last free *should* happen as part of the final dput() that is done > at the end of __fput(). Note that struct socket is coallocated with its inode.

Re: [PATCH v5 next 2/5] modules:capabilities: add cap_kernel_module_request() permission check

2017-11-29 Thread Luis R. Rodriguez
On Mon, Nov 27, 2017 at 06:18:35PM +0100, Djalal Harouni wrote: > +/* Determine whether a module auto-load operation is permitted. */ > +int may_autoload_module(char *kmod_name, int required_cap, > + const char *kmod_prefix); > + While we are reviewing a general LSM for this,

Re: [PATCH resend] trace/xdp: fix compile warning: 'struct bpf_map' declared inside parameter list

2017-11-29 Thread Daniel Borkmann
On 11/30/2017 02:41 AM, Xie XiuQi wrote: > We meet this compile warning, which caused by missing bpf.h in xdp.h. > > In file included from ./include/trace/events/xdp.h:10:0, > from ./include/linux/bpf_trace.h:6, > from

Re: [PATCH] [RFC v3] packet: experimental support for 64-bit timestamps

2017-11-29 Thread Willem de Bruijn
On Wed, Nov 29, 2017 at 8:39 PM, Willem de Bruijn wrote: > On Wed, Nov 29, 2017 at 3:06 PM, Arnd Bergmann wrote: >> On Wed, Nov 29, 2017 at 5:51 PM, Willem de Bruijn >> wrote: Thanks for the review! Any

[PATCH net-next RFC] selftests: test timestamps in psock_tpacket

2017-11-29 Thread Willem de Bruijn
From: Willem de Bruijn Packet rings can return timestamps. Optionally test this path. Verify that the returned values are sane. Also test new timestamp modes skip and ns64. Signed-off-by: Willem de Bruijn --- tools/testing/selftests/net/psock_tpacket.c

[PATCH v2 1/6] perf: Add new types PERF_TYPE_KPROBE and PERF_TYPE_UPROBE

2017-11-29 Thread Song Liu
Two new perf types, PERF_TYPE_KPROBE and PERF_TYPE_UPROBE, are added to allow creating [k,u]probe with perf_event_open. These [k,u]probe are associated with the file decriptor created by perf_event_open, thus are easy to clean when the file descriptor is destroyed. kprobe_func and uprobe_path are

[PATCH v2 5/6] bpf: add option for bpf_load.c to use PERF_TYPE_KPROBE

2017-11-29 Thread Song Liu
Function load_and_attach() is updated to be able to create kprobes with either old text based API, or the new PERF_TYPE_KPROBE API. A global flag use_perf_type_probe is added to select between the two APIs. Signed-off-by: Song Liu Reviewed-by: Josef Bacik

[PATCH v2 4/6] perf: implement support of PERF_TYPE_UPROBE

2017-11-29 Thread Song Liu
This patch adds perf_uprobe support with similar pattern as previous patch (for kprobe). Two functions, create_local_trace_uprobe() and destroy_local_trace_uprobe(), are created so a uprobe can be created and attached to the file descriptor created by perf_event_open(). Signed-off-by: Song Liu

[PATCH v2 0/6] enable creating [k,u]probe with perf_event_open

2017-11-29 Thread Song Liu
Changes PATCH v1 to PATCH v2: Split PERF_TYPE_PROBE into PERF_TYPE_KPROBE and PERF_TYPE_UPROBE. Split perf_probe into perf_kprobe and perf_uprobe. Remove struct probe_desc, use config1 and config2 instead. Changes RFC v2 to PATCH v1: Check type PERF_TYPE_PROBE in perf_event_set_filter().

[PATCH v2 2/6] perf: copy new perf_event.h to tools/include/uapi

2017-11-29 Thread Song Liu
perf_event.h is updated in previous patch, this patch applies same changes to the tools/ version. This is part is put in a separate patch in case the two files are back ported separately. Signed-off-by: Song Liu Reviewed-by: Yonghong Song Reviewed-by: Josef

[PATCH v2] perf_event_open.2: add type PERF_TYPE_KPROBE and PERF_TYPE_UPROBE

2017-11-29 Thread Song Liu
Two new types PERF_TYPE_KPROBE and PERF_TYPE_UPROBE are being added to perf_event_attr. This patch adds information about this type. Signed-off-by: Song Liu --- man2/perf_event_open.2 | 42 ++ 1 file changed, 42 insertions(+) diff

[PATCH v2] bcc: Try use new API to create [k,u]probe with perf_event_open

2017-11-29 Thread Song Liu
New kernel API allows creating [k,u]probe with perf_event_open. This patch tries to use the new API. If the new API doesn't work, we fall back to old API. bpf_detach_probe() looks up the event being removed. If the event is not found, we skip the clean up procedure. Signed-off-by: Song Liu

[PATCH v2 3/6] perf: implement support of PERF_TYPE_KPROBE

2017-11-29 Thread Song Liu
A new pmu, perf_kprobe, is created for PERF_TYPE_KPROBE. Based on input from perf_event_open(), perf_kprobe creates a kprobe (or kretprobe) for the perf_event. This kprobe is private to this perf_event, and thus not added to global lists, and not available in tracefs. Two functions,

[PATCH v2 6/6] bpf: add new test test_many_kprobe

2017-11-29 Thread Song Liu
The test compares old text based kprobe API with PERF_TYPE_KPROBE. Here is a sample output of this test: Creating 1000 kprobes with text-based API takes 6.979683 seconds Cleaning 1000 kprobes with text-based API takes 84.897687 seconds Creating 1000 kprobes with PERF_TYPE_KPROBE (function name)

Re: [PATCH 1/6] perf: Add new type PERF_TYPE_PROBE

2017-11-29 Thread Song Liu
> On Nov 23, 2017, at 2:22 AM, Peter Zijlstra wrote: > > On Wed, Nov 15, 2017 at 09:23:33AM -0800, Song Liu wrote: >> A new perf type PERF_TYPE_PROBE is added to allow creating [k,u]probe >> with perf_event_open. These [k,u]probe are associated with the file >> decriptor

[PATCH net] tcp: remove buggy call to tcp_v6_restore_cb()

2017-11-29 Thread Eric Dumazet
From: Eric Dumazet tcp_v6_send_reset() expects to receive an skb with skb->cb[] layout as used in TCP stack. MD5 lookup uses tcp_v6_iif() and tcp_v6_sdif() and thus TCP_SKB_CB(skb)->header.h6 This patch probably fixes RST packets sent on behalf of a timewait md5 ipv6

[PATCH resend] trace/xdp: fix compile warning: 'struct bpf_map' declared inside parameter list

2017-11-29 Thread Xie XiuQi
We meet this compile warning, which caused by missing bpf.h in xdp.h. In file included from ./include/trace/events/xdp.h:10:0, from ./include/linux/bpf_trace.h:6, from drivers/net/ethernet/intel/i40e/i40e_txrx.c:29: ./include/trace/events/xdp.h:93:17: warning:

Re: [PATCH] [RFC v3] packet: experimental support for 64-bit timestamps

2017-11-29 Thread Willem de Bruijn
On Wed, Nov 29, 2017 at 3:06 PM, Arnd Bergmann wrote: > On Wed, Nov 29, 2017 at 5:51 PM, Willem de Bruijn > wrote: >>> Thanks for the review! Any suggestions for how to do the testing? If you >>> have >>> existing test cases, could you give my

Re: [PATCH] trace/xdp: fix compile warning: ‘struct bpf_map’ declared inside parameter list

2017-11-29 Thread Xie XiuQi
On 2017/11/29 19:13, Daniel Borkmann wrote: > Xie, thanks for the patch! We could route this fix via bpf tree if you want. > > Could you resend your patch with below Fixes and Acked-by tag added to > netdev@vger.kernel.org in Cc, so that it ends up in patchwork there? > Sure, I'll resend soon.

Re: [PATCH v5 next 3/5] modules:capabilities: automatic module loading restriction

2017-11-29 Thread Luis R. Rodriguez
On Mon, Nov 27, 2017 at 06:18:36PM +0100, Djalal Harouni wrote: > diff --git a/include/linux/module.h b/include/linux/module.h > index 5cbb239..c36aed8 100644 > --- a/include/linux/module.h > +++ b/include/linux/module.h > @@ -261,7 +261,16 @@ struct notifier_block; > > #ifdef CONFIG_MODULES >

Re: [PATCH net 0/6] tools: bpftool: fix a minor issues with JSON and Makefiles

2017-11-29 Thread Daniel Borkmann
On 11/29/2017 02:44 AM, Jakub Kicinski wrote: > Quentin says: > > First commit in this series fixes a crash that occurs when incorrect > arguments are passed to bpftool after the `--json` option. It comes from > the usage() function trying to use the JSON writer, although the latter > has not

Re: [PATCH v5 next 1/5] modules:capabilities: add request_module_cap()

2017-11-29 Thread Theodore Ts'o
On Wed, Nov 29, 2017 at 11:28:52AM -0600, Serge E. Hallyn wrote: > > Just to be clear, module loading requires - and must always continue to > require - CAP_SYS_MODULE against the initial user namespace. Containers > in user namespaces do not have that. > > I don't believe anyone has ever

Re: [PATCH RFC 2/2] veth: propagate bridge GSO to peer

2017-11-29 Thread Solio Sarabia
On Mon, Nov 27, 2017 at 07:02:01PM -0700, David Ahern wrote: > On 11/27/17 6:42 PM, Solio Sarabia wrote: > > Adding ioctl support for 'ip link set' would work. I'm still concerned > > how to enforce the upper limit to not exceed that of the lower devices. > > Actually, giving the user control to

Re: [BUG] kernel stack corruption during/after Netlabel error

2017-11-29 Thread James Morris
On Wed, 29 Nov 2017, Casey Schaufler wrote: > I see that there is a proposed fix later in the thread, but I don't see > the patch. Could you send it to me, so I can try it on my problem? Forwarded off-list. Interestingly, I didn't see the KASAN output email from Stephen here. -- James Morris

[RFC] bpf: offload: report device information for offloaded programs

2017-11-29 Thread Jakub Kicinski
Report to the user ifindex and namespace information of offloaded programs. Always set dev_bound to true if program was loaded for a device which has been since removed. Specify the namespace using dev/inode combination. Signed-off-by: Jakub Kicinski Reviewed-by:

Re: [BUG] kernel stack corruption during/after Netlabel error

2017-11-29 Thread Casey Schaufler
On 11/29/2017 2:26 AM, James Morris wrote: > I'm seeing a kernel stack corruption bug (detected via gcc) when running > the SELinux testsuite on a 4.15-rc1 kernel, in the 2nd inet_socket test: > > https://github.com/SELinuxProject/selinux-testsuite/blob/master/tests/inet_socket/test > > #

Re: [RFC 1/3] kallsyms: don't leak address when symbol not found

2017-11-29 Thread Tobin C. Harding
I reordered the To's and CC's, I hope this doesn't break threading. (clearly I haven't groked email yet :( ) On Tue, Nov 28, 2017 at 09:30:17AM +1100, Tobin C. Harding wrote: > Currently if kallsyms_lookup() fails to find the symbol then the address > is printed. This potentially leaks sensitive

RE: [PATCH] sched/deadline: fix one-bit signed bitfields to be unsigned

2017-11-29 Thread Keller, Jacob E
> -Original Message- > From: Jakub Kicinski [mailto:kubak...@wp.pl] > Sent: Tuesday, November 28, 2017 8:08 PM > To: Kirsher, Jeffrey T > Cc: mi...@redhat.com; pet...@infradead.org; Keller, Jacob E > ; linux-ker...@vger.kernel.org; >

[Patch net v2] act_sample: get rid of tcf_sample_cleanup_rcu()

2017-11-29 Thread Cong Wang
Similar to commit d7fb60b9cafb ("net_sched: get rid of tcfa_rcu"), TC actions don't need to respect RCU grace period, because it is either just detached from tc filter (standalone case) or it is removed together with tc filter (bound case) in which case RCU grace period is already respected at

Re: [PATCH v5 next 1/5] modules:capabilities: add request_module_cap()

2017-11-29 Thread Kees Cook
On Wed, Nov 29, 2017 at 2:45 PM, Linus Torvalds wrote: > On Wed, Nov 29, 2017 at 7:58 AM, David Miller wrote: >> >> We're talking about making sure that loading "ppp.ko" really gets >> ppp.ko rather than some_other_module.ko renamed to ppp.ko

Re: [kernel-hardening] Re: [RFC 0/3] kallsyms: don't leak address when printing symbol

2017-11-29 Thread Tobin C. Harding
On Tue, Nov 28, 2017 at 08:58:44AM +0530, Kaiwan N Billimoria wrote: > On Tue, Nov 28, 2017 at 7:20 AM, Tobin C. Harding wrote: > > > > Noob question: how do we _know_ this. In other words how do we know no > > userland tools rely on the current behaviour? No stress to answer Kees,

Re: [PATCH 0/2] replace %pK with %p

2017-11-29 Thread Kees Cook
On Wed, Nov 29, 2017 at 3:38 PM, Tobin C. Harding wrote: > We are now hashing addresses printed with %pK (when > kptr_restrict==0). Perhaps we can get rid of %pK (and kptr_restrict) > entirely. Instead of rushing ahead and doing so let's replace all printk > format strings that use

Re: [BUG] kernel stack corruption during/after Netlabel error

2017-11-29 Thread James Morris
On Wed, 29 Nov 2017, Eric Dumazet wrote: > On Wed, 2017-11-29 at 12:23 -0800, Eric Dumazet wrote: > > > > I suspect this exposes an ancient bug, caused by fact that TCP moves > > IP[6]CB in skb->cb[] > > > > Basically the 2nd tcp_filter() added in commit > >

[PATCH 0/2] replace %pK with %p

2017-11-29 Thread Tobin C. Harding
We are now hashing addresses printed with %pK (when kptr_restrict==0). Perhaps we can get rid of %pK (and kptr_restrict) entirely. Instead of rushing ahead and doing so let's replace all printk format strings that use %pK with %p. It is a nice time to do this now while we are prepared for

[PATCH 2/2] printk: add specifier %pz, for zeroed address

2017-11-29 Thread Tobin C. Harding
Currently %pK [at times] zeros addresses. It would be nice to remove %pK entirely. Printing zero addresses is useful if we want to sanitize an address but there may be userland tools that currently rely on the address format (i.e the correct width). Add printk specifier %pz. Signed-off-by: Tobin

[PATCH 1/2] tree-wide: replace all users of %pK with %p

2017-11-29 Thread Tobin C. Harding
%p is now hashed, it is therefore more secure than %p (with kptr_restrict==0). We may be able to remove %pK and kptr_restrict altogether now. First, let's replace all in tree users of %pK. We can give this a while in the wild to see what breaks. Then if things play nicely we can remove %pK

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Andrew Lunn
> While Andrew's suggestion to use of_mdiobus_register() even for the > built-in DSA created slave_mii_bus makes sense, I would rather recommend > you instantiate your own bus (ala mv88e6xxx), such that your DT will > likely look like: Hi Florian I could still look like this, if the built in

Re: [PATCH V11 0/5] hash addresses printed with %p

2017-11-29 Thread Tobin C. Harding
On Wed, Nov 29, 2017 at 03:20:40PM -0800, Andrew Morton wrote: > On Wed, 29 Nov 2017 13:05:00 +1100 "Tobin C. Harding" wrote: > > > Currently there exist approximately 14 000 places in the Kernel where > > addresses are being printed using an unadorned %p. This potentially > >

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-11-29 Thread Tobin C. Harding
On Wed, Nov 29, 2017 at 03:20:58PM -0800, Andrew Morton wrote: > On Wed, 29 Nov 2017 13:05:04 +1100 "Tobin C. Harding" wrote: > > > printk specifier %p now hashes all addresses before printing. Sometimes > > we need to see the actual unmodified address. This can be achieved using

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Florian Fainelli
On 11/29/2017 03:19 PM, Linus Walleij wrote: > On Wed, Nov 29, 2017 at 10:56 PM, Andrew Lunn wrote: > >> I think the problem might be, you are using the DSA provided MDIO bus. >> The Marvell switches has a similar setup in terms of interrupts. The >> PHY interrupts appear within

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-11-29 Thread Andrew Morton
On Wed, 29 Nov 2017 13:05:04 +1100 "Tobin C. Harding" wrote: > printk specifier %p now hashes all addresses before printing. Sometimes > we need to see the actual unmodified address. This can be achieved using > %lx but then we face the risk that if in future we want to change the

Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-11-29 Thread Andrew Morton
On Wed, 29 Nov 2017 13:05:03 +1100 "Tobin C. Harding" wrote: > Currently there exist approximately 14 000 places in the kernel where > addresses are being printed using an unadorned %p. This potentially > leaks sensitive information regarding the Kernel layout in memory. Many > of

Re: [PATCH V11 0/5] hash addresses printed with %p

2017-11-29 Thread Andrew Morton
On Wed, 29 Nov 2017 13:05:00 +1100 "Tobin C. Harding" wrote: > Currently there exist approximately 14 000 places in the Kernel where > addresses are being printed using an unadorned %p. This potentially > leaks sensitive information regarding the Kernel layout in memory. Many > of

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Linus Walleij
On Wed, Nov 29, 2017 at 10:56 PM, Andrew Lunn wrote: > I think the problem might be, you are using the DSA provided MDIO bus. > The Marvell switches has a similar setup in terms of interrupts. The > PHY interrupts appear within the switch. So i implemented an interrupt >

Re: [PATCH v4 7/8] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-29 Thread David Daney
On 11/29/2017 02:56 PM, Andrew Lunn wrote: On Tue, Nov 28, 2017 at 04:55:39PM -0800, David Daney wrote: +static int bgx_probe(struct platform_device *pdev) +{ + struct mac_platform_data platform_data; + const __be32 *reg; + u32 port; + u64 addr; + struct

Re: [PATCH v4 7/8] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-29 Thread Andrew Lunn
On Tue, Nov 28, 2017 at 04:55:39PM -0800, David Daney wrote: > +static int bgx_probe(struct platform_device *pdev) > +{ > + struct mac_platform_data platform_data; > + const __be32 *reg; > + u32 port; > + u64 addr; > + struct device_node *child; > + struct platform_device

Re: [BUG] kernel stack corruption during/after Netlabel error

2017-11-29 Thread Eric Dumazet
On Wed, 2017-11-29 at 12:23 -0800, Eric Dumazet wrote: > > I suspect this exposes an ancient bug, caused by fact that TCP moves > IP[6]CB in skb->cb[] > > Basically the 2nd tcp_filter() added in commit > 8fac365f63c866a00015fa13932d8ffc584518b8 > ("tcp: Add a tcp_filter hook before handle ack

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-11-29 Thread Linus Torvalds
On Wed, Nov 29, 2017 at 2:28 PM, Kees Cook wrote: > > In the future, maybe we could have a knob: unhashed, hashed (default), > or zeroed. I haven't actually seen a case for that yet. Let's see if there are actually any debug issues at all, and how big they are before

Re: [PATCH v5 next 1/5] modules:capabilities: add request_module_cap()

2017-11-29 Thread Linus Torvalds
On Wed, Nov 29, 2017 at 7:58 AM, David Miller wrote: > > We're talking about making sure that loading "ppp.ko" really gets > ppp.ko rather than some_other_module.ko renamed to ppp.ko via some > other mechanism. > > Both modules have legitimate signatures so the kernel will

RE: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-11-29 Thread Roberts, William C
> -Original Message- > From: keesc...@google.com [mailto:keesc...@google.com] On Behalf Of Kees > Cook > Sent: Wednesday, November 29, 2017 2:28 PM > To: David Laight > Cc: Linus Torvalds ; Tobin C. Harding > ;

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-11-29 Thread Kees Cook
On Wed, Nov 29, 2017 at 2:07 AM, David Laight wrote: > From: Linus Torvalds >> Sent: 29 November 2017 02:29 >> >> On Tue, Nov 28, 2017 at 6:05 PM, Tobin C. Harding wrote: >> > >> >Let's add specifier %px as a >> > clear, opt-in, way to print a pointer

Re: [PATCH v4 7/8] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-29 Thread Andrew Lunn
On Wed, Nov 29, 2017 at 10:11:38PM +0300, Dan Carpenter wrote: > On Wed, Nov 29, 2017 at 09:37:15PM +0530, Souptick Joarder wrote: > > >> +static int bgx_port_sgmii_set_link_speed(struct bgx_port_priv *priv, > > >> struct port_status status) > > >> +{ > > >> + u64 data; > > >> +

Re: Sending 802.1Q packets using AF_PACKET socket on filtered bridge forwards with wrong MAC addresses

2017-11-29 Thread Brandon Carpenter
I narrowed the search to a memmove() called from skb_reorder_vlan_header() in net/core/skbuff.c. > memmove(skb->data - ETH_HLEN, skb->data - skb->mac_len - VLAN_HLEN, >2 * ETH_ALEN); Calling skb_reset_mac_len() after skb_reset_mac_header() before calling br_allowed_ingress() in

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Andrew Lunn
Hi Linus > Just that the PHYs are on the MDIO bus inside the switch, of > course. I think the problem might be, you are using the DSA provided MDIO bus. The Marvell switches has a similar setup in terms of interrupts. The PHY interrupts appear within the switch. So i implemented an interrupt

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Florian Fainelli
On 11/29/2017 01:28 PM, Linus Walleij wrote: > On Wed, Nov 29, 2017 at 4:56 PM, Andrew Lunn wrote: >>> I have the phy-handle in the ethernet controller. This RTL8366RB >>> thing is just one big PHY as far as I know. >> >> We don't model switches as PHYs. They are their own device

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Linus Walleij
On Wed, Nov 29, 2017 at 4:56 PM, Andrew Lunn wrote: >> I have the phy-handle in the ethernet controller. This RTL8366RB >> thing is just one big PHY as far as I know. > > We don't model switches as PHYs. They are their own device type. And > the internal or external PHYs are just

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-29 Thread Russell King - ARM Linux
On Wed, Nov 29, 2017 at 09:06:56PM +, Yan Markman wrote: > The attached p21 patch doesn't change anything. > But another one from the mail-text is good > void phylink_disconnect_phy(struct phylink *pl) > + pl->phy_state.link = false; > > There still (not for my

RE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-29 Thread Yan Markman
The attached p21 patch doesn't change anything. But another one from the mail-text is good void phylink_disconnect_phy(struct phylink *pl) + pl->phy_state.link = false; There still (not for my MRVL-PP2) problem: It is expected that on ifconfig-down the

Re: [PATCH 1/2] net: phy: core: use genphy version of callbacks read_status and config_aneg per default

2017-11-29 Thread David Miller
From: Heiner Kallweit Date: Wed, 29 Nov 2017 21:47:16 +0100 > Am 15.11.2017 um 22:56 schrieb Florian Fainelli: >> On 11/15/2017 01:42 PM, Heiner Kallweit wrote: >>> read_status and config_aneg are the only mandatory callbacks and most >>> of the time the generic

Re: [PATCH 1/2] net: phy: core: use genphy version of callbacks read_status and config_aneg per default

2017-11-29 Thread Heiner Kallweit
Am 15.11.2017 um 22:56 schrieb Florian Fainelli: > On 11/15/2017 01:42 PM, Heiner Kallweit wrote: >> read_status and config_aneg are the only mandatory callbacks and most >> of the time the generic implementation is used by drivers. >> So make the core fall back to the generic version if a driver

Re: [PATCH RfC 1/2] net: phy: core: remove now uneeded disabling of interrupts

2017-11-29 Thread Heiner Kallweit
Am 16.11.2017 um 10:51 schrieb Ard Biesheuvel: > On 15 November 2017 at 22:19, Heiner Kallweit wrote: >> Am 15.11.2017 um 23:04 schrieb Florian Fainelli: >>> On 11/12/2017 01:08 PM, Heiner Kallweit wrote: After commits c974bdbc3e "net: phy: Use threaded IRQ, to allow

Re: KASAN: use-after-free Read in sock_release

2017-11-29 Thread Eric Dumazet
On Wed, 2017-11-29 at 11:37 -0800, Cong Wang wrote: > (Cc'ing fs people...) > > On Wed, Nov 29, 2017 at 12:33 AM, syzbot > om> > wrote: > > Hello, > > > > syzkaller hit the following crash on > >

Re: [PATCH v2 25/35] nds32: Build infrastructure

2017-11-29 Thread Arnd Bergmann
On Wed, Nov 29, 2017 at 3:10 PM, Greentime Hu wrote: > 2017-11-29 19:57 GMT+08:00 Arnd Bergmann : >> On Wed, Nov 29, 2017 at 12:39 PM, Greentime Hu wrote: >>> >>> How about this? >>> >>> choice >>> prompt "CPU type" >>>

Re: KASAN: use-after-free Read in sock_release

2017-11-29 Thread Linus Torvalds
On Wed, Nov 29, 2017 at 11:37 AM, Cong Wang wrote: > (Cc'ing fs people...) > > On Wed, Nov 29, 2017 at 12:33 AM, syzbot wrote: >> BUG: KASAN: use-after-free in sock_release+0x1c6/0x1e0 net/socket.c:601 Lovely. Yeah, that is: 601 if

Re: [BUG] kernel stack corruption during/after Netlabel error

2017-11-29 Thread Eric Dumazet
On Wed, Nov 29, 2017 at 11:59 AM, Stephen Smalley wrote: > On Wed, 2017-11-29 at 09:34 -0800, Eric Dumazet wrote: >> On Wed, Nov 29, 2017 at 9:31 AM, Stephen Smalley >> wrote: >> > On Wed, 2017-11-29 at 21:26 +1100, James Morris wrote: >> > > I'm seeing a

[PATCH v2 01/17] idr: Fix build

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox The IDR calls WARN_ON without including Signed-off-by: Matthew Wilcox --- include/linux/idr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/idr.h b/include/linux/idr.h index 7c3a365f7e12..dd048cf456b7

[PATCH v2 07/17] idr: Delete idr_find_ext function

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox Simply changing idr_remove's 'id' argument to 'unsigned long' works for all callers. Signed-off-by: Matthew Wilcox --- include/linux/idr.h| 7 +-- net/sched/act_api.c| 2 +- net/sched/cls_flower.c | 2 +- 3 files

[PATCH v2 17/17] idr: Warn if old iterators see large IDs

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox Now that the IDR can be used to store large IDs, it is possible somebody might only partially convert their old code and use the iterators which can only handle IDs up to INT_MAX. It's probably unwise to show them a truncated ID, so settle for

[PATCH v2 16/17] idr: Rename idr_for_each_entry_ext

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox Match idr_alloc_ul with idr_get_next_ul and idr_for_each_entry_ul. Also add kernel-doc. Signed-off-by: Matthew Wilcox --- include/linux/idr.h | 17 ++--- lib/idr.c | 20 +++-

[PATCH v2 13/17] cls_u32: Reinstate cyclic allocation

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox Commit e7614370d6f0 ("net_sched: use idr to allocate u32 filter handles) converted htid allocation to use the IDR. The ID allocated by this scheme changes; it used to be cyclic, but now always allocates the lowest available. The IDR supports cyclic

[PATCH v2 10/17] cls_basic: Convert to use idr_alloc_u32

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox Use the new helper which saves a temporary variable and a few lines of code. Signed-off-by: Matthew Wilcox --- net/sched/cls_basic.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff

[PATCH v2 12/17] cls_flower: Convert to idr_alloc_u32

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox Use the new helper which saves a temporary variable and a few lines of code. Signed-off-by: Matthew Wilcox --- net/sched/cls_flower.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) diff

[PATCH v2 11/17] cls_bpf: Convert to use idr_alloc_u32

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox Use the new helper. This has a modest reduction in both lines of code and compiled code size. Signed-off-by: Matthew Wilcox --- net/sched/cls_bpf.c | 24 ++-- 1 file changed, 10 insertions(+), 14

[PATCH v2 06/17] idr: Delete idr_replace_ext function

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox Changing idr_replace's 'id' argument to 'unsigned long' works for all callers. Callers which passed a negative ID now get -ENOENT instead of -EINVAL. No callers relied on this error value. Signed-off-by: Matthew Wilcox ---

[PATCH v2 08/17] idr: Add idr_alloc_u32 helper

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox All current users of idr_alloc_ext() actually want to allocate a u32 and it's a little painful for them to use idr_alloc_ext(). This convenience function makes it simple. Signed-off-by: Matthew Wilcox ---

[PATCH v2 15/17] idr: Rename idr_alloc_ext to idr_alloc_ul

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox idr_alloc_ul fits better with other parts of the Linux kernel where we need to name a function based on the types it operates on. It uses a 'nextid' pointer argument instead of separate minimum ID and output assigned ID, (like idr_get_next), reducing

[PATCH v2 14/17] cls_u32: Convert to idr_alloc_u32

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox No real benefit to this classifier, but since we're allocating a u32 anyway, we should use this function. Signed-off-by: Matthew Wilcox --- net/sched/cls_u32.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-)

[PATCH v2 05/17] idr: Delete idr_remove_ext function

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox Simply changing idr_remove's 'id' argument to 'unsigned long' suffices for all callers. Signed-off-by: Matthew Wilcox --- include/linux/idr.h| 7 +-- net/sched/act_api.c| 2 +- net/sched/cls_basic.c | 6 +++---

[PATCH v2 04/17] IDR test suite: Check handling negative end correctly

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox One of the charming quirks of the idr_alloc() interface is that you can pass a negative end and it will be interpreted as "maximum". Ensure we don't break that. Signed-off-by: Matthew Wilcox ---

[PATCH v2 00/17] IDR changes for v4.15-rc1

2017-11-29 Thread Matthew Wilcox
From: Matthew Wilcox v2: - Rebased on f6454f80e8a965fca203dab28723f68ec78db608 to resolve conflicting changes with cls_bpf - Fix whitespace - Change a WARN_ON to WARN_ON_ONCE (git snafu yesterday) Original cover letter: The patches here are of three types: -

  1   2   >