* Re: [net-2.6 PATCH] ipv6: fix missing in6_ifa_put in addrconf
From: David Miller @ 2010-11-16 17:35 UTC (permalink / raw)
To: john.r.fastabend; +Cc: eric.dumazet, netdev, shemminger
In-Reply-To: <20101116062921.31164.70903.stgit@jf-dev1-dcblab>
From: John Fastabend <john.r.fastabend@intel.com>
Date: Mon, 15 Nov 2010 22:29:21 -0800
> Fix ref count bug introduced by
>
> commit 2de795707294972f6c34bae9de713e502c431296
> Author: Lorenzo Colitti <lorenzo@google.com>
> Date: Wed Oct 27 18:16:49 2010 +0000
>
> ipv6: addrconf: don't remove address state on ifdown if the address
> is being kept
>
>
> Fix logic so that addrconf_ifdown() decrements the inet6_ifaddr
> refcnt correctly with in6_ifa_put().
>
> Reported-by: Stephen Hemminger <shemminger@vyatta.com>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Applied, thanks a lot.
^ permalink raw reply
* Re: [RFC] irda: irttp: allow zero byte packets
From: David Miller @ 2010-11-16 17:51 UTC (permalink / raw)
To: w.sang; +Cc: irda-users, netdev, samuel
In-Reply-To: <1289344787-12160-1-git-send-email-w.sang@pengutronix.de>
From: Wolfram Sang <w.sang@pengutronix.de>
Date: Wed, 10 Nov 2010 00:19:47 +0100
> Sending zero byte packets is not neccessarily an error (AF_INET accepts it,
> too), so just apply a shortcut. This was discovered because of a non-working
> software with WINE. See
>
> http://bugs.winehq.org/show_bug.cgi?id=19397#c86
> http://thread.gmane.org/gmane.linux.irda.general/1643
>
> for very detailed debugging information and a testcase. Kudos to Wolfgang for
> those!
>
> Reported-by: Wolfgang Schwotzer <wolfgang.schwotzer@gmx.net>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Tested-by: Mike Evans <mike.evans@cardolan.com>
This looks good to me, applied, thanks!
^ permalink raw reply
* Re: [patch] netlink: let nlmsg and nla functions take pointer-to-const args
From: David Miller @ 2010-11-16 17:52 UTC (permalink / raw)
To: jengelh; +Cc: netdev
In-Reply-To: <alpine.LNX.2.01.1011100106010.10874@obet.zrqbmnf.qr>
From: Jan Engelhardt <jengelh@medozas.de>
Date: Wed, 10 Nov 2010 01:06:36 +0100 (CET)
> parent 2531add5568de01edcabf321d1bbb69a6a6d6c27 (v2.6.36-4468-g2531add)
> commit f87d7f1b74689c96cc2f53b8cabfd309d7ad1bda
> Author: Jan Engelhardt <jengelh@medozas.de>
> Date: Wed Nov 10 00:10:55 2010 +0100
>
> netlink: let nlmsg and nla functions take pointer-to-const args
>
> The changed functions do not modify the NL messages and/or attributes
> at all. They should use const (similar to strchr), so that callers
> which have a const nlmsg/nlattr around can make use of them without
> casting.
>
> While at it, constify a data array.
>
> Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Applied.
^ permalink raw reply
* Re: [PATCH 2/9] drivers/isdn/mISDN: Use printf extension %pV
From: David Miller @ 2010-11-16 18:23 UTC (permalink / raw)
To: joe; +Cc: linux-kernel, isdn, netdev
In-Reply-To: <b7079ecc43454c8b8baaef07f8cf1c1756c2ce3e.1289348757.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Tue, 9 Nov 2010 16:35:16 -0800
> Using %pV reduces the number of printk calls and
> eliminates any possible message interleaving from
> other printk calls.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] Enhance AF_PACKET implementation to not require high order contiguous memory allocation (v4)
From: David Miller @ 2010-11-16 18:25 UTC (permalink / raw)
To: nhorman; +Cc: netdev, eric.dumazet, zenczykowski
In-Reply-To: <1289416194-1844-1-git-send-email-nhorman@tuxdriver.com>
From: nhorman@tuxdriver.com
Date: Wed, 10 Nov 2010 14:09:54 -0500
> Version 4 of this patch.
Applied, thanks a lot for doing this.
^ permalink raw reply
* Re: [PATCH net-next-2.6 v2] macvlan: lockless tx path
From: David Miller @ 2010-11-16 18:59 UTC (permalink / raw)
To: kaber; +Cc: eric.dumazet, netdev, greearb, bhutchings
In-Reply-To: <4CDCF8C3.6010007@trash.net>
From: Patrick McHardy <kaber@trash.net>
Date: Fri, 12 Nov 2010 09:20:19 +0100
> On 11.11.2010 08:14, Eric Dumazet wrote:
>> macvlan is a stacked device, like tunnels. We should use the lockless
>> mechanism we are using in tunnels and loopback.
>>
>> This patch completely removes locking in TX path.
>>
>> tx stat counters are added into existing percpu stat structure, renamed
>> from rx_stats to pcpu_stats.
>>
>> Note : this reverts commit 2c11455321f37 (macvlan: add multiqueue
>> capability)
>>
>> Note : rx_errors converted to a 32bit counter, like tx_dropped, since
>> they dont need 64bit range.
>>
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>> Cc: Patrick McHardy <kaber@trash.net>
>> Cc: Ben Greear <greearb@candelatech.com>
>> Cc: Ben Hutchings <bhutchings@solarflare.com>
>> ---
>> V2: correct kerneldoc
>> u32 for tx_dropped and rx_errors
>
> Looks good to me.
>
> Acked-by: Patrick McHardy <kaber@trash.net>
Applied, thanks everyone.
^ permalink raw reply
* Re: network device reference leak with net-next
From: Lorenzo Colitti @ 2010-11-16 19:21 UTC (permalink / raw)
To: John Fastabend
Cc: Stephen Hemminger, Eric Dumazet, netdev@vger.kernel.org,
brian.haley, maze
In-Reply-To: <4CE1BFCE.70105@intel.com>
On Tue, Nov 16, 2010 at 12:18 AM, John Fastabend
<john.r.fastabend@intel.com> wrote:
> Quick glance looks like an in6_ifa_put is missed?
Oops. Sorry about that.
I'm testing your fix, it seems to work so far.
^ permalink raw reply
* Re: [PATCH net-next-2.6] vlan: lockless transmit path
From: David Miller @ 2010-11-16 19:24 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, kaber
In-Reply-To: <1289468520.17691.1018.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 11 Nov 2010 10:42:00 +0100
> vlan is a stacked device, like tunnels. We should use the lockless
> mechanism we are using in tunnels and loopback.
>
> This patch completely removes locking in TX path.
>
> tx stat counters are added into existing percpu stat structure, renamed
> from vlan_rx_stats to vlan_pcpu_stats.
>
> Note : this partially reverts commit 2e59af3dcbdf (vlan: multiqueue vlan
> device)
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, although there were some conflicts since John Fastabend
made some vlan changes recently.
Please double check my work.
^ permalink raw reply
* Re: [PATCH net-next-2.6] vlan: remove ndo_select_queue() logic
From: David Miller @ 2010-11-16 19:24 UTC (permalink / raw)
To: eric.dumazet; +Cc: jesse, netdev, kaber
In-Reply-To: <1289504565.17691.1710.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 11 Nov 2010 20:42:45 +0100
> [PATCH] vlan: remove ndo_select_queue() logic
>
> Now vlan are lockless, we dont need special ndo_select_queue() logic.
> dev_pick_tx() will do the multiqueue stuff on the real device transmit.
>
> Suggested-by: Jesse Gross <jesse@nicira.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Also applied, but again there were conflicts I had to resolve,
please check that I got it right.
Thanks.
^ permalink raw reply
* Re: [PATCH net-next-2.6] udp: use atomic_inc_not_zero_hint
From: David Miller @ 2010-11-16 19:35 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1289887106.3364.53.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 16 Nov 2010 06:58:26 +0100
> UDP sockets refcount is usually 2, unless an incoming frame is going to
> be queued in receive or backlog queue.
>
> Using atomic_inc_not_zero_hint() permits to reduce latency, because
> processor issues less memory transactions.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 V2] net: reorder struct sock fields
From: David Miller @ 2010-11-16 19:35 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1289922964.5372.443.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 16 Nov 2010 16:56:04 +0100
> Le mardi 16 novembre 2010 à 08:12 +0100, Eric Dumazet a écrit :
>> Right now, fields in struct sock are not optimally ordered, because each
>> path (RX softirq, TX completion, RX user, TX user) has to touch fields
>> that are contained in many different cache lines.
>>
>
> Performance testing pointed out I forgot :
>
> - sk_drops, read for each queued packet, and incremented on packet drops
> - sk_flags tested in sock_def_readable()
> - sk_policy[0]
>
> Here is V2 of patch :
>
> [PATCH net-next-2.6 V2] net: reorder struct sock fields
Applied, thanks!
^ permalink raw reply
* Re: [PATCH] mpc52xx: cleanup locking
From: David Miller @ 2010-11-16 19:39 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, a.llano, grant.likely, jhautbois
In-Reply-To: <1288799798.2511.164.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 03 Nov 2010 16:56:38 +0100
> commit 1e4e0767ecb1 (Fix locking on fec_mpc52xx driver) assumed IRQ are
> enabled when an IRQ handler is called.
>
> It is not the case anymore (IRQF_DISABLED is deprecated), so we can use
> regular spin_lock(), no need for spin_lock_irqsave().
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Tested-by: Jean-Michel Hautbois <jhautbois@gmail.com>
> Cc: Asier Llano <a.llano@ziv.es>
> Cc: Grant Likely <grant.likely@secretlab.ca>
Applied, thanks Eric.
^ permalink raw reply
* [PATCH] net: irda: irttp: sync error paths of data- and udata-requests
From: Wolfram Sang @ 2010-11-16 19:40 UTC (permalink / raw)
To: netdev; +Cc: Wolfram Sang, Samuel Ortiz, David Miller
In-Reply-To: <20101116.095101.115945762.davem@davemloft.net>
irttp_data_request() returns meaningful errorcodes, while irttp_udata_request()
just returns -1 in similar situations. Sync the two and the loglevels of the
accompanying output.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: David Miller <davem@davemloft.net>
---
Thank you David for picking up the zero-byte-packet-patch. Now as it was
applied, this one might be interesting, too (on top of it)? Nothing seriously
needed, but looks more proper IMHO. LXR says that are callers of these
functions check with < 0 anyhow.
net/irda/irttp.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 6cfaeaf..f6054f9 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -550,7 +550,7 @@ EXPORT_SYMBOL(irttp_close_tsap);
*/
int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb)
{
- int ret = -1;
+ int ret;
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
@@ -566,13 +566,14 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb)
/* Check that nothing bad happens */
if (!self->connected) {
- IRDA_DEBUG(1, "%s(), Not connected\n", __func__);
+ IRDA_WARNING("%s(), Not connected\n", __func__);
+ ret = -ENOTCONN;
goto err;
}
if (skb->len > self->max_seg_size) {
- IRDA_DEBUG(1, "%s(), UData is too large for IrLAP!\n",
- __func__);
+ IRDA_ERROR("%s(), UData is too large for IrLAP!\n", __func__);
+ ret = -EMSGSIZE;
goto err;
}
--
1.7.2.3
^ permalink raw reply related
* Re: [PATCH] xfrm: update flowi saddr in icmp_send if unset
From: David Miller @ 2010-11-16 19:46 UTC (permalink / raw)
To: uweber; +Cc: netdev
In-Reply-To: <20101105113912.GA14694@babylon>
From: Ulrich Weber <uweber@astaro.com>
Date: Fri, 5 Nov 2010 12:39:12 +0100
> otherwise xfrm_lookup will fail to find correct policy
>
> Signed-off-by: Ulrich Weber <uweber@astaro.com>
Looks good, applied to net-2.6
Sorry for taking so long but I wanted to validate this change
against how the rest of this code handles source addresses.
^ permalink raw reply
* Re: [PATCH net-next-2.6] vlan: remove ndo_select_queue() logic
From: Eric Dumazet @ 2010-11-16 19:54 UTC (permalink / raw)
To: David Miller; +Cc: jesse, netdev, kaber
In-Reply-To: <20101116.112454.179916339.davem@davemloft.net>
Le mardi 16 novembre 2010 à 11:24 -0800, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 11 Nov 2010 20:42:45 +0100
>
> > [PATCH] vlan: remove ndo_select_queue() logic
> >
> > Now vlan are lockless, we dont need special ndo_select_queue() logic.
> > dev_pick_tx() will do the multiqueue stuff on the real device transmit.
> >
> > Suggested-by: Jesse Gross <jesse@nicira.com>
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> Also applied, but again there were conflicts I had to resolve,
> please check that I got it right.
>
Both patches seem fine to me.
I am going to test them.
Thanks !
^ permalink raw reply
* Re: iproute2: use automake
From: Jan Engelhardt @ 2010-11-16 20:12 UTC (permalink / raw)
To: David Miller
Cc: shemminger, stephen.hemminger, Netfilter Developer Mailing List,
netdev
In-Reply-To: <alpine.LNX.2.01.1011162017320.24880@obet.zrqbmnf.qr>
On Tuesday 2010-11-16 18:41, David Miller wrote:
>
>> Until you make a convincing case that the existing infrastructure
>> is a problem, choosing an alternative solution is bogus.
>
>I can't count the amount of times I've seen major source trees
>invest tons of engineering into things to decrease the pain of
>using things like automake and libtool.
The pro argument for a build system is not that Linux-only projects
receive unneeded portability work, but that the work involved with
maintaining all the commands in Makefiles, which tend to be a source
of update anomalies, gets reduced.
>X11 even has a script that basically turns libtool into one big
>fat NOP, because on Linux everything libtool tries to figure out
>is completely superfluous.
(I was not trying to make a case for Libtool specifically.)
And yet they do use a build system (which happens to be Automake, but
that's not my point). Was their time spent just to produce,
"unnecessary non-sense", as you call it? I can imagine they will
disagree with you.
>Don't crap up the tree with unnecessary non-sense just for some
>theoretical gain. Things work just fine right now.
They do not.
* running make in subdirs is broken
* iproute2/arpd compilation fails if db_185.h, atm.h is not present
and
* people could not quite opt out building arpd when they are
fine with not having it
* the DESTDIR variable was completely abused
* data files were shoven into /usr/lib where they don't even belong
(that is, if you care about FHS even a tiny bit)
* NO_SHARED_LIBS=y is broken
* -lresolv was added unconditionally when it's not even needed
* CFLAGS was overriden, which means a user running make CFLAGS="-g"
will kill the all-important -Wall and -I../include
* Out-of-tree building, anyone?
But what do I say; if it works _for you_, I must be wrong by
definition.
^ permalink raw reply
* Re: [PATCH net-next-2.6 v4] can: Topcliff: PCH_CAN driver: Add Flow control/Fix Endianess issue/Separate IF register/Enumerate LEC macro/Move MSI processing/Use BIT(X)/Change Message Object index/Add prefix PCH_
From: Wolfgang Grandegger @ 2010-11-16 20:39 UTC (permalink / raw)
To: David Miller
Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
sameo-VuQAYsv1563Yd54FQh9/CA,
margie.foster-ral2JQCrhuEAvxtiuMwx3w,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
masa-korg-ECg8zkTtlr0C6LszWs/t0g,
kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w, chripell-VaTbYqLCNhc,
joel.clark-ral2JQCrhuEAvxtiuMwx3w, qi.wang-ral2JQCrhuEAvxtiuMwx3w
In-Reply-To: <20101116.091443.226753420.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Hi David,
On 11/16/2010 06:14 PM, David Miller wrote:
>
> Way too many changes in one patch.
>
> Please post one that fixes the endianness issues.
>
> One that fixes the register interface seperation.
>
> One that adds flow control processing.
>
> etc.
>
> When you combine many tasks into one patch it's impossible
> to bisect through your changes to debug problems in order
> to figure out which changed introduced a bug.
>
> I am not applying this, and I will not apply your patches
> until you split them up properly.
>
> You may think that there is zero value in this, but there
> is huge value in it for anyone who tries to debug your
> changes in the future. Right now you are making that a
> nearly impossible task.
Please take into account that this patch got accepted by accident
(because the maintainer did not respond properly in time). At that time
the driver was incomplete, not ready for mainline and did not even work
properly. Therefore it makes little sense to debug or even bisec these
changes. Just for that reason I made an exemption and added my
"Acked-by". Hope you can share my arguments.
Wolfgang.
^ permalink raw reply
* Re: [PATCH net-next-2.6 v4] can: Topcliff: PCH_CAN driver: Add Flow control/Fix Endianess issue/Separate IF register/Enumerate LEC macro/Move MSI processing/Use BIT(X)/Change Message Object index/Add prefix PCH_
From: David Miller @ 2010-11-16 20:43 UTC (permalink / raw)
To: wg-5Yr1BZd7O62+XT7JhA+gdA
Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
sameo-VuQAYsv1563Yd54FQh9/CA,
margie.foster-ral2JQCrhuEAvxtiuMwx3w,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
masa-korg-ECg8zkTtlr0C6LszWs/t0g,
kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w, chripell-VaTbYqLCNhc,
joel.clark-ral2JQCrhuEAvxtiuMwx3w, qi.wang-ral2JQCrhuEAvxtiuMwx3w
In-Reply-To: <4CE2EC13.9090707-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
From: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
Date: Tue, 16 Nov 2010 21:39:47 +0100
> Please take into account that this patch got accepted by accident
> (because the maintainer did not respond properly in time). At that time
> the driver was incomplete, not ready for mainline and did not even work
> properly. Therefore it makes little sense to debug or even bisec these
> changes. Just for that reason I made an exemption and added my
> "Acked-by". Hope you can share my arguments.
You don't put stupid on top of stupid and justify the latter using
the former.
^ permalink raw reply
* Re: [PATCH net-next-2.6 v4] can: Topcliff: PCH_CAN driver: Add Flow control/Fix Endianess issue/Separate IF register/Enumerate LEC macro/Move MSI processing/Use BIT(X)/Change Message Object index/Add prefix PCH_
From: Wolfram Sang @ 2010-11-16 21:07 UTC (permalink / raw)
To: David Miller
Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
sameo-VuQAYsv1563Yd54FQh9/CA,
margie.foster-ral2JQCrhuEAvxtiuMwx3w,
netdev-u79uwXL29TY76Z2rM5mHXA, chripell-VaTbYqLCNhc,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
masa-korg-ECg8zkTtlr0C6LszWs/t0g,
kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
joel.clark-ral2JQCrhuEAvxtiuMwx3w, wg-5Yr1BZd7O62+XT7JhA+gdA,
qi.wang-ral2JQCrhuEAvxtiuMwx3w
In-Reply-To: <20101116.124325.116396459.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 898 bytes --]
On Tue, Nov 16, 2010 at 12:43:25PM -0800, David Miller wrote:
> From: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
> Date: Tue, 16 Nov 2010 21:39:47 +0100
>
> > Please take into account that this patch got accepted by accident
> > (because the maintainer did not respond properly in time). At that time
> > the driver was incomplete, not ready for mainline and did not even work
> > properly. Therefore it makes little sense to debug or even bisec these
> > changes. Just for that reason I made an exemption and added my
> > "Acked-by". Hope you can share my arguments.
>
> You don't put stupid on top of stupid and justify the latter using
> the former.
Is reverting the incomplete driver an option?
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 188 bytes --]
_______________________________________________
Socketcan-core mailing list
Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
https://lists.berlios.de/mailman/listinfo/socketcan-core
^ permalink raw reply
* Re: [PATCH net-next-2.6 v4] can: Topcliff: PCH_CAN driver: Add Flow control/Fix Endianess issue/Separate IF register/Enumerate LEC macro/Move MSI processing/Use BIT(X)/Change Message Object index/Add prefix PCH_
From: David Miller @ 2010-11-16 21:10 UTC (permalink / raw)
To: w.sang-bIcnvbaLZ9MEGnE8C9+IrQ
Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
sameo-VuQAYsv1563Yd54FQh9/CA,
margie.foster-ral2JQCrhuEAvxtiuMwx3w,
netdev-u79uwXL29TY76Z2rM5mHXA, chripell-VaTbYqLCNhc,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
masa-korg-ECg8zkTtlr0C6LszWs/t0g,
kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
joel.clark-ral2JQCrhuEAvxtiuMwx3w, wg-5Yr1BZd7O62+XT7JhA+gdA,
qi.wang-ral2JQCrhuEAvxtiuMwx3w
In-Reply-To: <20101116210716.GA19893-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
From: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Date: Tue, 16 Nov 2010 22:07:16 +0100
> On Tue, Nov 16, 2010 at 12:43:25PM -0800, David Miller wrote:
>> From: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
>> Date: Tue, 16 Nov 2010 21:39:47 +0100
>>
>> > Please take into account that this patch got accepted by accident
>> > (because the maintainer did not respond properly in time). At that time
>> > the driver was incomplete, not ready for mainline and did not even work
>> > properly. Therefore it makes little sense to debug or even bisec these
>> > changes. Just for that reason I made an exemption and added my
>> > "Acked-by". Hope you can share my arguments.
>>
>> You don't put stupid on top of stupid and justify the latter using
>> the former.
>
> Is reverting the incomplete driver an option?
I told everyone that the plan was that we had several months
to fix this, and that's what we should do.
But yes if people are going to be maximally difficult about this and
refuse to split up the bug fixes, I will have to regrettably revert
the driver.
But let's avoid that if we can.
^ permalink raw reply
* Re: [PATCH] Enhance AF_PACKET implementation to not require high order contiguous memory allocation (v4)
From: Neil Horman @ 2010-11-16 21:30 UTC (permalink / raw)
To: David Miller; +Cc: netdev, eric.dumazet, zenczykowski
In-Reply-To: <20101116.102537.246547550.davem@davemloft.net>
On Tue, Nov 16, 2010 at 10:25:37AM -0800, David Miller wrote:
> From: nhorman@tuxdriver.com
> Date: Wed, 10 Nov 2010 14:09:54 -0500
>
> > Version 4 of this patch.
>
> Applied, thanks a lot for doing this.
No problem, thanks!
Neil
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* [PATCH 1/3] netfilter: allow hooks to pass error code back up the stack
From: Eric Paris @ 2010-11-16 21:52 UTC (permalink / raw)
To: netdev, linux-kernel, selinux, netfilter-devel
Cc: eparis, equinox, eric.dumazet, davem, hzhong, jmorris, kaber,
kuznet, paul.moore, pekkas, sds, yoshfuji
SELinux would like to pass certain fatal errors back up the stack. This patch
implements the generic netfilter support for this functionality.
Based-on-patch-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Eric Paris <eparis@redhat.com>
---
include/linux/netfilter.h | 2 ++
net/netfilter/core.c | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 03317c8..1893837 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -33,6 +33,8 @@
#define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE)
+#define NF_DROP_ERR(x) (((-x) << NF_VERDICT_BITS) | NF_DROP)
+
/* only for userspace compatibility */
#ifndef __KERNEL__
/* Generic cache responses from hook functions.
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 85dabb8..32fcbe2 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -173,9 +173,11 @@ next_hook:
outdev, &elem, okfn, hook_thresh);
if (verdict == NF_ACCEPT || verdict == NF_STOP) {
ret = 1;
- } else if (verdict == NF_DROP) {
+ } else if ((verdict & NF_VERDICT_MASK) == NF_DROP) {
kfree_skb(skb);
- ret = -EPERM;
+ ret = -(verdict >> NF_VERDICT_BITS);
+ if (ret == 0)
+ ret = -EPERM;
} else if ((verdict & NF_VERDICT_MASK) == NF_QUEUE) {
if (!nf_queue(skb, elem, pf, hook, indev, outdev, okfn,
verdict >> NF_VERDICT_BITS))
^ permalink raw reply related
* [PATCH 2/3] network: tcp_connect should return certain errors up the stack
From: Eric Paris @ 2010-11-16 21:52 UTC (permalink / raw)
To: netdev, linux-kernel, selinux, netfilter-devel
Cc: eparis, equinox, eric.dumazet, davem, hzhong, jmorris, kaber,
kuznet, paul.moore, pekkas, sds, yoshfuji
In-Reply-To: <20101116215238.6727.39248.stgit@paris.rdu.redhat.com>
The current tcp_connect code completely ignores errors from sending an skb.
This makes sense in many situations (like -ENOBUFFS) but I want to be able to
immediately fail connections if they are denied by the SELinux netfilter hook.
Netfilter does not normally return ECONNREFUSED when it drops a packet so we
respect that error code as a final and fatal error that can not be recovered.
Based-on-patch-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Eric Paris <eparis@redhat.com>
---
net/ipv4/tcp_output.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index e961522..15dcd7b 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2592,6 +2592,7 @@ int tcp_connect(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *buff;
+ int err;
tcp_connect_init(sk);
@@ -2614,7 +2615,9 @@ int tcp_connect(struct sock *sk)
sk->sk_wmem_queued += buff->truesize;
sk_mem_charge(sk, buff->truesize);
tp->packets_out += tcp_skb_pcount(buff);
- tcp_transmit_skb(sk, buff, 1, sk->sk_allocation);
+ err = tcp_transmit_skb(sk, buff, 1, sk->sk_allocation);
+ if (err == -ECONNREFUSED)
+ return err;
/* We change tp->snd_nxt after the tcp_transmit_skb() call
* in order to make this packet get counted in tcpOutSegs.
^ permalink raw reply related
* [PATCH 3/3] SELinux: return -ECONNREFUSED from ip_postroute to signal fatal error
From: Eric Paris @ 2010-11-16 21:52 UTC (permalink / raw)
To: netdev, linux-kernel, selinux, netfilter-devel
Cc: eparis, equinox, eric.dumazet, davem, hzhong, jmorris, kaber,
kuznet, paul.moore, pekkas, sds, yoshfuji
In-Reply-To: <20101116215238.6727.39248.stgit@paris.rdu.redhat.com>
The SELinux netfilter hooks just return NF_DROP if they drop a packet. We
want to signal that a drop in this hook is a permanant fatal error and is not
transient. If we do this the error will be passed back up the stack in some
places and applications will get a faster interaction that something went
wrong.
Signed-off-by: Eric Paris <eparis@redhat.com>
---
security/selinux/hooks.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 8ba5001..b1104f9 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -4594,11 +4594,11 @@ static unsigned int selinux_ip_postroute(struct sk_buff *skb, int ifindex,
secmark_perm = PACKET__SEND;
break;
default:
- return NF_DROP;
+ return NF_DROP_ERR(-ECONNREFUSED);
}
if (secmark_perm == PACKET__FORWARD_OUT) {
if (selinux_skb_peerlbl_sid(skb, family, &peer_sid))
- return NF_DROP;
+ return NF_DROP_ERR(-ECONNREFUSED);
} else
peer_sid = SECINITSID_KERNEL;
} else {
@@ -4611,28 +4611,28 @@ static unsigned int selinux_ip_postroute(struct sk_buff *skb, int ifindex,
ad.u.net.netif = ifindex;
ad.u.net.family = family;
if (selinux_parse_skb(skb, &ad, &addrp, 0, NULL))
- return NF_DROP;
+ return NF_DROP_ERR(-ECONNREFUSED);
if (secmark_active)
if (avc_has_perm(peer_sid, skb->secmark,
SECCLASS_PACKET, secmark_perm, &ad))
- return NF_DROP;
+ return NF_DROP_ERR(-ECONNREFUSED);
if (peerlbl_active) {
u32 if_sid;
u32 node_sid;
if (sel_netif_sid(ifindex, &if_sid))
- return NF_DROP;
+ return NF_DROP_ERR(-ECONNREFUSED);
if (avc_has_perm(peer_sid, if_sid,
SECCLASS_NETIF, NETIF__EGRESS, &ad))
- return NF_DROP;
+ return NF_DROP_ERR(-ECONNREFUSED);
if (sel_netnode_sid(addrp, family, &node_sid))
- return NF_DROP;
+ return NF_DROP_ERR(-ECONNREFUSED);
if (avc_has_perm(peer_sid, node_sid,
SECCLASS_NODE, NODE__SENDTO, &ad))
- return NF_DROP;
+ return NF_DROP_ERR(-ECONNREFUSED);
}
return NF_ACCEPT;
^ permalink raw reply related
* Re: [PATCH] filter: Optimize instruction revalidation code.
From: Hagen Paul Pfeifer @ 2010-11-16 22:13 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: davem, eric.dumazet, drosenberg, netdev
In-Reply-To: <201011162208.BHC17628.SVtFMJOOLFQFOH@I-love.SAKURA.ne.jp>
* Tetsuo Handa | 2010-11-16 22:08:50 [+0900]:
>--- a/net/core/filter.c
>+++ b/net/core/filter.c
>@@ -383,7 +383,57 @@ EXPORT_SYMBOL(sk_run_filter);
> */
> int sk_chk_filter(struct sock_filter *filter, int flen)
> {
>- struct sock_filter *ftest;
>+ /*
>+ * Valid instructions are initialized to non-0.
>+ * Invalid instructions are initialized to 0.
>+ */
>+ static u16 codes[] = {
>+ [BPF_ALU|BPF_ADD|BPF_K] = BPF_S_ALU_ADD_K + 1,
>+ [BPF_ALU|BPF_ADD|BPF_X] = BPF_S_ALU_ADD_X + 1,
>+ [BPF_ALU|BPF_SUB|BPF_K] = BPF_S_ALU_SUB_K + 1,
[...]
Maybe I don't get it, but you increment the opcode by one, but you never
increment the opcode in sk_run_filter() - do I miss something? Did you test
the your patch (a trivial tcpdump rule should be sufficient)?
If this question is answered (or fixed):
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
HGN
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox