* Re: ANNOUNCE: debloat-testing kernel git tree
From: Tianji Li @ 2011-03-03 19:45 UTC (permalink / raw)
To: rick.jones2-VXdhtT5mjnY
Cc: Dave Täht, sedat.dilek-Re5JQEeQqe8AvxtiuMwx3w,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
bloat-devel-JXvr2/1DY2fm6VMwtOF2vx4hnT+Y9+D1,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1299176168.2157.14.camel@tardy>
On 03/03/2011 12:16 PM, Rick Jones wrote:
>> For wireless routers and cable home gateways especially, this research
>> shows that the total un-managed buffers in your system should be less
>> than 32.
>
> Would it be a good thing to start describing these queues not so much in
> terms of packets but in terms of delay (or bandwidth X delay)?
>
The unit of bandwidth is something like Mbps, that of delay can be
second, so bandwidth X delay --> Mb, which is the unit of packet size.
So both packets and delay should have the same effect for sizing buffers.
Tianji
> Constants tend to live longer than they should, no matter how noble in
> birth.
>
> rick jones
>
> _______________________________________________
> Bloat-devel mailing list
> Bloat-devel-JXvr2/1DY2fm6VMwtOF2vx4hnT+Y9+D1@public.gmane.org
> https://lists.bufferbloat.net/listinfo/bloat-devel
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: Mass udp flow reboot linux with RealTek RTL-8169 Gigabit
From: Hans Nieser @ 2011-03-03 19:53 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev, linux-kernel
In-Reply-To: <1298641542.18103.48.camel@krikkit>
On Fri, 2011-02-25 at 14:45 +0100, Hans Nieser wrote:
...
> I've also attempted to bisect the issue I have been having with slow
> transfer speed (I don't know if its related to the hang, but I figure if
> the hang ever gets fixed, this will have to be fixed as well to make
> r8169 usable for me)
...
Just wanted to let you know that after installing a new Intel gbit NIC I
ordered, I sadly still get poor performance, so this is definitely a
separate issue from the r8169 lock up. (lock ups are gone now)
I've given up on getting r8169 working at this point but if you have any
patches you need tested or need more info in the future please do let me
know
^ permalink raw reply
* Re: r8169 disable ASPM patch
From: David Miller @ 2011-03-03 19:54 UTC (permalink / raw)
To: hayeswang; +Cc: romieu, netdev, sgruszka
In-Reply-To: <A671CA7371854B808BAB6DA0BA7B050B@realtek.com.tw>
From: hayeswang <hayeswang@realtek.com>
Date: Thu, 3 Mar 2011 19:35:11 +0800
> Our hardware engineer says that it has an issue indeed for 8111B (that is, rev
> 01) when the aspm is enabled. For the other chips, the aspm would affect the
> performance. We suggest to disable for stablity.
Ok, I will apply Stanislaw's patch, thanks.
^ permalink raw reply
* Re: e1000 - rx misses
From: John Bermudez @ 2011-03-03 20:00 UTC (permalink / raw)
To: Brandeburg, Jesse
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
Ronciak, John
In-Reply-To: <alpine.WNT.2.00.1103011658050.5424@JBRANDEB-DESK2.amr.corp.intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 5701 bytes --]
Jesse,
Thanks for your time.
your answers have pointed me in the right direction
which has let me do hours of positive research
so this leads me to one final question ( I hope ;) )
lspci -v shows that the latency for the Ethernet device(s)
is 0
Is this the default value populated by the e1000 driver??
or who's responsibility is it to populate this value
i.e.
04:00.1 Ethernet controller: Intel Corporation: Unknown device 105e (rev 06)
Subsystem: Intel Corporation: Unknown device 346e
Flags: bus master, fast devsel, latency 0, IRQ 18
Memory at b8920000 (32-bit, non-prefetchable) [size=128K]
Memory at b8900000 (32-bit, non-prefetchable) [size=128K]
I/O ports at 3000 [size=32]
Expansion ROM at fffe0000 [disabled] [size=128K]
Capabilities: [c8] Power Management version 2
Capabilities: [d0] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-
Capabilities: [e0] #10 [0001]
Thank you and have a nice day,
Mr. John Bermudez
NOC Level 3 Engineer
-----Original Message-----
From: Brandeburg, Jesse [mailto:jesse.brandeburg@intel.com]
Sent: Tuesday, March 01, 2011 5:02 PM
To: John Bermudez
Cc: Ronciak, John; Kirsher, Jeffrey T; netdev@vger.kernel.org; e1000-devel@lists.sourceforge.net
Subject: RE: e1000 - rx misses
<removed non-relevant users>
On Tue, 1 Mar 2011, John Bermudez wrote:
> Thanks for your time
> Can you tell me the command to lengthen the input fifo rx queue?
> is this possible
You can try increasing the number of rx buffers via the command
# ethtool -G ethX rx 4096
and if you were really gung ho, you could increase the amount of fifo
allocated to the rx side of the fifo by modifying the source. That said,
I don't think that will buy you anything because it seems from the small
amount of data provided that you are having exceptionally long periods of
time where the data is coming faster than your machine can process (for
whatever reason) and increasing the fifo only will give you a marginal
(4kB or so) increasing in buffering.
>
> -----Original Message-----
> From: Brandeburg, Jesse [mailto:jesse.brandeburg@intel.com]
> Sent: Monday, February 28, 2011 11:05 AM
> To: John Bermudez
> Cc: cramerj; Ronciak, John; Kirsher, Jeffrey T; Kok, Auke-jan H; netdev@vger.kernel.org; e1000-devel@lists.sourceforge.net
> Subject: Re: e1000 - rx misses
>
> added e1000-devel, responses inline...
>
> On Wed, 23 Feb 2011, John Bermudez wrote:
>
> > Hello All,
> > I got your contact info in a forum.
> > maybe you could give me a quick pointer.
> >
> > I have a device that is experiencing RX misses. I tried 1000/full and 100/full
> > it occurs at both speeds. I seem to get a burst of loss so I am assuming I am overrunning the FIFO RX queue.
>
> overrunning at 100Mb/s seems pretty unlikely to be our hardware's fault,
> as your buffer (in time) is increasing by 10x.
>
> >
> > Any known workarounds?
> > Configuration modifications?
> >
> > your time is much appreciated
> >
> >
> >
> > /lib/modules/2.4.31-uc0/kernel/drivers/net/e1000
> > # ls
> > e1000.o
>
> ow, 2.4.31 kernel is pretty much so old as to not be supportable.
>
> > # ethtool -S eth1
> > NIC statistics:
> > rx_packets: 217454512
> > tx_packets: 266698397
> > rx_bytes: 172995819593
> > tx_bytes: 246744709750
> > rx_broadcast: 0
> > tx_broadcast: 528
> <snip>
> > rx_no_buffer_count: 925
>
> This count above indicates that your cpu is not returning buffers to
> hardware fast enough. Do you have NAPI enabled?
>
> > rx_missed_errors: 48206
>
> This error means that for the length of time the fifo was buffering the
> adapter was not able to get any data buffers from the OS, filled the FIFO
> and had to drop this many packets.
>
> > tx_aborted_errors: 0
> > tx_carrier_errors: 0
> > tx_fifo_errors: 0
> > tx_heartbeat_errors: 0
> > tx_window_errors: 0
> > tx_abort_late_coll: 0
> > tx_deferred_ok: 0
> > tx_single_coll_ok: 0
> > tx_multi_coll_ok: 0
> > tx_timeout_count: 0
> > tx_restart_queue: 0
> > rx_long_length_errors: 0
> > rx_short_length_errors: 0
> > rx_align_errors: 0
> > tx_tcp_seg_good: 0
> > tx_tcp_seg_failed: 0
> > rx_flow_control_xon: 0
> > rx_flow_control_xoff: 0
> > tx_flow_control_xon: 0
> > tx_flow_control_xoff: 0
>
> flow control is either not happenning or is disabled, if it is disabled
> you could try enabling it on both ends to get a little more buffering in
> your switch.
>
> > rx_long_byte_count: 172995819593
> > rx_csum_offload_good: 217406235
> > rx_csum_offload_errors: 17
> > rx_header_split: 0
> > alloc_rx_buff_failed: 0
> > tx_smbus: 0
> > rx_smbus: 5262
>
> hm, you have IPMI traffic, could these be related to your stalls?
>
> > dropped_smbus: 0
> > #
> >
> >
> > Thank you and have a nice day,
> >
> > Mr. John Bermudez
> > NOC Level 3 Engineer
> >
> >
>
> You didn't include lots of data we need, like hardware type, adapter/chip,
> ethtool -i output, cat /proc/interrupts, system info, .config, etc.
>
> I suggest that something is running either in interrupt context on your
> system for a very long time (keeping us from running our interrupt
> handler) or that your cpu is underpowered and unable to keep up with
> whatever tasks it is running besides the network driver.
>
> If you wish to continue troubleshooting please file a bug at e1000.sf.net
> and attach the requested info there.
>
> Jesse
>
[-- Attachment #2: Type: text/plain, Size: 429 bytes --]
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* Re: [PATCH] bonding 802.3ad: Fix the state machine locking
From: Jay Vosburgh @ 2011-03-03 20:07 UTC (permalink / raw)
To: Nils Carlson; +Cc: bonding-devel, netdev
In-Reply-To: <1299143159-9754-1-git-send-email-nils.carlson@ericsson.com>
Nils Carlson <nils.carlson@ericsson.com> wrote:
>The current implementation only locked around the rx state machine,
>but the rx state machine reads data touched by other state machines
>as well, so in a very ugly scenario we would see the rx state machine
>reading bad values as data was being overwritten by other state
>machines. This patch moves the bond_3ad locking to protect all the
>state machines from concurrency issues.
This looks pretty obvious on inspection; I'm surprised it hasn't
come up before. I haven't tested it, but it seems clear that at least
the port->sm_vars field needs protection.
I have one suggestion for a comment change, which is below, to
make it cleared what data needs mutexing. I'd also add the following
into the description somewhere:
The ad_rx_machine, ad_periodic_machine and
ad_port_selection_logic functions all inspect and alter common fields
within the port structure. Previous to this patch, only the
ad_rx_machines were mutexed, and the periodic and port_selection could
run unmutexed against an rx_machine trigged by an arriving LACPDU.
I'm a little torn on the change of nomenclature of "rx" to
"state" lock, mostly because it makes the functional change harder to
follow in the patch. Could you split this into two patches, one to fix
the locking problem, and one to change the name?
>Signed-off-by: Nils Carlson <nils.carlson@ericsson.com>
>---
> drivers/net/bonding/bond_3ad.c | 32 +++++++++++++++++++-------------
> drivers/net/bonding/bond_3ad.h | 2 +-
> 2 files changed, 20 insertions(+), 14 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
>index 1024ae1..bbc473b 100644
>--- a/drivers/net/bonding/bond_3ad.c
>+++ b/drivers/net/bonding/bond_3ad.c
>@@ -281,23 +281,23 @@ static inline int __check_agg_selection_timer(struct port *port)
> }
>
> /**
>- * __get_rx_machine_lock - lock the port's RX machine
>+ * __get_state_machine_lock - lock the port's state machine
> * @port: the port we're looking at
> *
> */
>-static inline void __get_rx_machine_lock(struct port *port)
>+static inline void __get_state_machine_lock(struct port *port)
> {
>- spin_lock_bh(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
>+ spin_lock_bh(&(SLAVE_AD_INFO(port->slave).state_machine_lock));
> }
>
> /**
>- * __release_rx_machine_lock - unlock the port's RX machine
>+ * __release_state_machine_lock - unlock the port's state machine
> * @port: the port we're looking at
> *
> */
>-static inline void __release_rx_machine_lock(struct port *port)
>+static inline void __release_state_machine_lock(struct port *port)
> {
>- spin_unlock_bh(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
>+ spin_unlock_bh(&(SLAVE_AD_INFO(port->slave).state_machine_lock));
> }
>
> /**
>@@ -388,14 +388,14 @@ static u8 __get_duplex(struct port *port)
> }
>
> /**
>- * __initialize_port_locks - initialize a port's RX machine spinlock
>+ * __initialize_port_locks - initialize a port's state machine spinlock
> * @port: the port we're looking at
> *
> */
> static inline void __initialize_port_locks(struct port *port)
> {
> // make sure it isn't called twice
>- spin_lock_init(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
>+ spin_lock_init(&(SLAVE_AD_INFO(port->slave).state_machine_lock));
> }
>
> //conversions
>@@ -1025,9 +1025,6 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
> {
> rx_states_t last_state;
>
>- // Lock to prevent 2 instances of this function to run simultaneously(rx interrupt and periodic machine callback)
>- __get_rx_machine_lock(port);
>-
> // keep current State Machine state to compare later if it was changed
> last_state = port->sm_rx_state;
>
>@@ -1133,7 +1130,6 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
> pr_err("%s: An illegal loopback occurred on adapter (%s).\n"
> "Check the configuration to verify that all adapters are connected to 802.3ad compliant switch ports\n",
> port->slave->dev->master->name, port->slave->dev->name);
>- __release_rx_machine_lock(port);
> return;
> }
> __update_selected(lacpdu, port);
>@@ -1153,7 +1149,6 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
> break;
> }
> }
>- __release_rx_machine_lock(port);
> }
>
> /**
>@@ -2155,6 +2150,12 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
> goto re_arm;
> }
>
>+ /* Lock around all the state machines to protect data that may
>+ * be accessed also from the ad_rx_machine running in the
>+ * interrupt handler.
The reference to interrupt handler confused me initially; I think
this comment would be better stated as:
/* Lock around state machines to protect data accessed
* by all (e.g., port->sm_vars). ad_rx_machine may run
* concurrently due to incoming LACPDU.
*/
>+ */
>+ __get_state_machine_lock(port);
>+
> ad_rx_machine(NULL, port);
> ad_periodic_machine(port);
> ad_port_selection_logic(port);
>@@ -2164,6 +2165,8 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
> // turn off the BEGIN bit, since we already handled it
> if (port->sm_vars & AD_PORT_BEGIN)
> port->sm_vars &= ~AD_PORT_BEGIN;
>+
>+ __release_state_machine_lock(port);
> }
>
> re_arm:
>@@ -2200,7 +2203,10 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u
> case AD_TYPE_LACPDU:
> pr_debug("Received LACPDU on port %d\n",
> port->actor_port_number);
>+ /* Protect against concurrent state machines */
>+ __get_state_machine_lock(port);
> ad_rx_machine(lacpdu, port);
>+ __release_state_machine_lock(port);
> break;
>
> case AD_TYPE_MARKER:
>diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
>index 2c46a15..9182506 100644
>--- a/drivers/net/bonding/bond_3ad.h
>+++ b/drivers/net/bonding/bond_3ad.h
>@@ -264,7 +264,7 @@ struct ad_bond_info {
> struct ad_slave_info {
> struct aggregator aggregator; // 802.3ad aggregator structure
> struct port port; // 802.3ad port structure
>- spinlock_t rx_machine_lock; // To avoid race condition between callback and receive interrupt
>+ spinlock_t state_machine_lock; // To avoid race condition between callback and receive interrupt
Perhaps change this comment, also, to "mutex state machine
vs. LACPDU".
-J
> u16 id;
> };
>
>--
>1.7.1
>
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* [PATCH] ipv6: Use ERR_CAST in addrconf_dst_alloc.
From: David Miller @ 2011-03-03 20:11 UTC (permalink / raw)
To: netdev
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv6/route.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 053a92e..59f2a58 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2022,12 +2022,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
if (IS_ERR(neigh)) {
dst_free(&rt->dst);
- /* We are casting this because that is the return
- * value type. But an errno encoded pointer is the
- * same regardless of the underlying pointer type,
- * and that's what we are returning. So this is OK.
- */
- return (struct rt6_info *) neigh;
+ return ERR_CAST(neigh);
}
rt->rt6i_nexthop = neigh;
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH V12 0/4] ptp: IEEE 1588 hardware clock support
From: David Miller @ 2011-03-03 20:13 UTC (permalink / raw)
To: richardcochran-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
alan-qBU/x9rampVanCEyBjwyrvXRex20P6io, arnd-r2nGTMty4D4,
cl-vYTEC60ixJUAvxtiuMwx3w, john.stultz-QSEj5FYQhm4dnm+yROfE0A,
khc-9GfyWEdoJtJmR6Xm/wNWPw, peterz-wEGCiKHe2LqWVfeAwA7xHQ,
giometti-k2GhghHVRtY, tglx-hfZtesqFncYOwBW4kG4KsQ,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
vapier-aBrp7R+bbdUdnm+yROfE0A, paulus-eUNUBHrolfbYtjvyW6yDsg,
linux-lFZ/pmaqli7XmaaqVzeoHQ
In-Reply-To: <cover.1298878618.git.richard.cochran-3mrvs1K0uXizZXS1Dc/lvw@public.gmane.org>
From: Richard Cochran <richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Mon, 28 Feb 2011 08:57:03 +0100
> This really might be the last review of the PTP hardware clock patch
> series. These patches apply on top of the timers/core branch in the
> tip tree.
I'm find with the networking portions so:
Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
I am assuming these will be pushed through the timers/core branch
since there are dependencies.
Thanks.
^ permalink raw reply
* [PATCH 2/2 v2] netlink: kill eff_cap from struct netlink_skb_parms
From: Chris Wright @ 2011-03-03 20:15 UTC (permalink / raw)
To: David Miller
Cc: chrisw, kaber, netdev, dm-devel, linux-security-module, drbd-dev,
Evgeniy Polyakov, linux-fbdev
In-Reply-To: <20110303.105655.189705829.davem@davemloft.net>
* David Miller (davem@davemloft.net) wrote:
> From: Chris Wright <chrisw@sous-sol.org>
> Date: Thu, 3 Mar 2011 09:32:30 -0800
>
> > * Patrick McHardy (kaber@trash.net) wrote:
> >
> >> commit 8ff259625f0ab295fa085b0718eed13093813fbc
> >> Author: Patrick McHardy <kaber@trash.net>
> >> Date: Thu Mar 3 10:17:31 2011 +0100
> >>
> >> netlink: kill eff_cap from struct netlink_skb_parms
> >>
> >> Netlink message processing in the kernel is synchronous these days,
> >> capabilities can be checked directly in security_netlink_recv() from
> >> the current process.
> >>
> >> Signed-off-by: Patrick McHardy <kaber@trash.net>
> >
> > Thanks for doing that Patrick. I looked at this earlier and thought
> > there was still an async path, but I guess that's just to another
> > userspace process.
> >
> > BTW, I think you missed a couple connector based callers:
> >
> > drivers/staging/pohmelfs/config.c: if (!cap_raised(nsp->eff_cap, CAP_SYS_AD
> > drivers/video/uvesafb.c: if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN))
> >
> > Fix those and:
> >
> > Acked-by: Chris Wright <chrisw@sous-sol.org>
>
> Patrick, I'll apply your first patch, please respin this second patch with
> the changes mentioned here.
Here, I respun it so I could work on top of it
thanks,
-chris
---
From: Patrick McHardy <kaber@trash.net>
Subject: [PATCH 2/2 v2] netlink: kill eff_cap from struct netlink_skb_parms
Netlink message processing in the kernel is synchronous these days,
capabilities can be checked directly in security_netlink_recv() from
the current process.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Reviewed-by: James Morris <jmorris@namei.org>
[chrisw: update to include pohmelfs and uvesafb]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
I did not do exhaustive .config compile tests
drivers/block/drbd/drbd_nl.c | 2 +-
drivers/md/dm-log-userspace-transfer.c | 2 +-
drivers/staging/pohmelfs/config.c | 2 +-
drivers/video/uvesafb.c | 2 +-
include/linux/netlink.h | 1 -
net/netlink/af_netlink.c | 6 ------
security/commoncap.c | 3 +--
7 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 8cbfaa6..fe81c85 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -2177,7 +2177,7 @@ static void drbd_connector_callback(struct cn_msg *req, struct netlink_skb_parms
return;
}
- if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN)) {
+ if (!cap_raised(current_cap(), CAP_SYS_ADMIN)) {
retcode = ERR_PERM;
goto fail;
}
diff --git a/drivers/md/dm-log-userspace-transfer.c b/drivers/md/dm-log-userspace-transfer.c
index 049eaf1..1f23e04 100644
--- a/drivers/md/dm-log-userspace-transfer.c
+++ b/drivers/md/dm-log-userspace-transfer.c
@@ -134,7 +134,7 @@ static void cn_ulog_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
{
struct dm_ulog_request *tfr = (struct dm_ulog_request *)(msg + 1);
- if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN))
+ if (!cap_raised(current_cap(), CAP_SYS_ADMIN))
return;
spin_lock(&receiving_list_lock);
diff --git a/drivers/staging/pohmelfs/config.c b/drivers/staging/pohmelfs/config.c
index 89279ba..39413b7 100644
--- a/drivers/staging/pohmelfs/config.c
+++ b/drivers/staging/pohmelfs/config.c
@@ -525,7 +525,7 @@ static void pohmelfs_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *n
{
int err;
- if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN))
+ if (!cap_raised(current_cap(), CAP_SYS_ADMIN))
return;
switch (msg->flags) {
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 52ec095..5180a21 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -73,7 +73,7 @@ static void uvesafb_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *ns
struct uvesafb_task *utask;
struct uvesafb_ktask *task;
- if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN))
+ if (!cap_raised(current_cap(), CAP_SYS_ADMIN))
return;
if (msg->seq >= UVESAFB_TASKS_MAX)
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 66823b8..4c4ac3f 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -160,7 +160,6 @@ struct netlink_skb_parms {
struct ucred creds; /* Skb credentials */
__u32 pid;
__u32 dst_group;
- kernel_cap_t eff_cap;
};
#define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb))
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 97ecd92..a808fb1 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1364,12 +1364,6 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
NETLINK_CB(skb).dst_group = dst_group;
memcpy(NETLINK_CREDS(skb), &siocb->scm->creds, sizeof(struct ucred));
- /* What can I do? Netlink is asynchronous, so that
- we will have to save current capabilities to
- check them, when this message will be delivered
- to corresponding kernel module. --ANK (980802)
- */
-
err = -EFAULT;
if (memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len)) {
kfree_skb(skb);
diff --git a/security/commoncap.c b/security/commoncap.c
index 64c2ed9..a83e607 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -52,13 +52,12 @@ static void warn_setuid_and_fcaps_mixed(const char *fname)
int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
{
- NETLINK_CB(skb).eff_cap = current_cap();
return 0;
}
int cap_netlink_recv(struct sk_buff *skb, int cap)
{
- if (!cap_raised(NETLINK_CB(skb).eff_cap, cap))
+ if (!cap_raised(current_cap(), cap))
return -EPERM;
return 0;
}
--
1.7.1
^ permalink raw reply related
* Re: [PATCH 2/2] netlink: kill eff_cap from struct netlink_skb_parms
From: Chris Wright @ 2011-03-03 20:17 UTC (permalink / raw)
To: Chris Wright
Cc: Patrick McHardy, NetDev, dm-devel, David S. Miller,
linux-security-module@vger.kernel.org, drbd-dev
In-Reply-To: <20110303173230.GP4988@sequoia.sous-sol.org>
* Chris Wright (chrisw@sous-sol.org) wrote:
> Ideally, we'd consolidate those into a variant of security_netlink_recv().
> However the issue is with types. Inside connector callback we only have
> netlink_skb_params (seems inapproriate to cast back out to skb).
>
> We could change the lsm hook to only pass nsp, but SELinux actually
> cares about the netlink type. Any ideas?
Actually I misremembered, it only cares on the send path.
We could completely drop skb from recv lsm hook, will send an RFC
momentarily with example.
thanks,
-chris
^ permalink raw reply
* Re: [PATCH] net: add Faraday FTMAC100 10/100 Ethernet driver
From: David Miller @ 2011-03-03 20:19 UTC (permalink / raw)
To: eric.dumazet
Cc: ratbert.chuang, netdev, linux-kernel, bhutchings, joe, dilinger,
mirqus, ratbert
In-Reply-To: <1298964420.2676.59.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 01 Mar 2011 08:27:00 +0100
> Le mardi 01 mars 2011 à 14:48 +0800, Po-Yu Chuang a écrit :
>> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>>
>> FTMAC100 Ethernet Media Access Controller supports 10/100 Mbps and
>> MII. This driver has been working on some ARM/NDS32 SoC's including
>> Faraday A320 and Andes AG101.
>>
>> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
...
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied to net-next-2.6, thanks.
^ permalink raw reply
* Re: [PATCH 1/3] tun: Convert logging messages to pr_<level> and tun_debug
From: David Miller @ 2011-03-03 20:21 UTC (permalink / raw)
To: joe; +Cc: netdev
In-Reply-To: <7f33dcacd277e127208211d8c3ef11c992408628.1299086044.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Wed, 2 Mar 2011 09:18:10 -0800
> Use the current logging forms with pr_fmt.
> Convert DBG macro to tun_debug, use netdev_printk as well.
> Add printf verification when TUN_DEBUG not defined.
> Miscellaneous comment typo fix.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/3] mii: Convert printks to netdev_info
From: David Miller @ 2011-03-03 20:21 UTC (permalink / raw)
To: joe; +Cc: netdev
In-Reply-To: <1b384ead46d062ba189b64649710a5625b7f6a2b.1299086044.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Wed, 2 Mar 2011 09:18:11 -0800
> Add a bit more data to the output.
> Convert string speeds to integer.
> Object size reduced a tiny bit.
>
> $ size drivers/net/mii.o*
> text data bss dec hex filename
> 4155 56 1000 5211 145b drivers/net/mii.o.new
> 4184 56 1000 5240 1478 drivers/net/mii.o.old
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
* Re: [PATCH 3/3] eql: Convert printks to pr_<level> and netdev_<level>
From: David Miller @ 2011-03-03 20:21 UTC (permalink / raw)
To: joe; +Cc: netdev
In-Reply-To: <90c4322fefc5e2d4778862abd051e6eb12c0284b.1299086044.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Wed, 2 Mar 2011 09:18:12 -0800
> Add pr_fmt
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6] benet: use GFP_KERNEL allocations when possible
From: David Miller @ 2011-03-03 20:23 UTC (permalink / raw)
To: ajit.khaparde; +Cc: eric.dumazet, netdev
In-Reply-To: <20110301174612.GA5927@akhaparde-VBox>
From: Ajit Khaparde <ajit.khaparde@emulex.com>
Date: Tue, 1 Mar 2011 11:46:12 -0600
> Thanks Eric.
>
>> -----Original Message-----
>> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
>> Sent: Tuesday, March 01, 2011 9:48 AM
>> To: Khaparde, Ajit
>> Cc: netdev
>> Subject: [PATCH net-next-2.6] benet: use GFP_KERNEL allocations when
>> possible
>>
>> Extend be_alloc_pages() with a gfp parameter, so that we use GFP_KERNEL
>> allocations instead of GFP_ATOMIC when not running in softirq context.
>>
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Acked-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Applied.
^ permalink raw reply
* Re: [PATCH 1/2] tlan: Remove changelog
From: David Miller @ 2011-03-03 20:25 UTC (permalink / raw)
To: sakari.ailus; +Cc: joe, chessman, netdev, linux-kernel
In-Reply-To: <4D6DEE30.5010905@iki.fi>
From: Sakari Ailus <sakari.ailus@iki.fi>
Date: Wed, 02 Mar 2011 09:13:52 +0200
> Joe Perches wrote:
>> As it isn't necessary nor really useful any longer.
>>
>> Signed-off-by: Joe Perches<joe@perches.com>
>
> Thanks, Joe!
>
> I had your patches still but have had practically no time since you
> sent your last set. So, for both:
>
> Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Both applied, thanks.
^ permalink raw reply
* [RFC PATCH 3/2] security: update security_netlink_recv hook prototype
From: Chris Wright @ 2011-03-03 20:26 UTC (permalink / raw)
To: James Morris, kaber
Cc: David Miller, Chris Wright, netdev, dm-devel,
linux-security-module, drbd-dev, Evgeniy Polyakov, linux-fbdev
We no longer need the skb in security_netlink_recv hook because the
netlink kernel receive path is synchronous. There is no need to inspect
the netlink_skb_params. Eliminating this makes it easy to reuse
the security_netlink_recv hook in connector callbacks.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/scsi/scsi_netlink.c | 2 +-
include/linux/security.h | 14 ++++++--------
kernel/audit.c | 4 ++--
net/core/rtnetlink.c | 2 +-
net/decnet/netfilter/dn_rtmsg.c | 2 +-
net/ipv4/netfilter/ip_queue.c | 2 +-
net/ipv6/netfilter/ip6_queue.c | 2 +-
net/netfilter/nfnetlink.c | 2 +-
net/netlink/genetlink.c | 2 +-
net/xfrm/xfrm_user.c | 2 +-
security/commoncap.c | 2 +-
security/security.c | 4 ++--
security/selinux/hooks.c | 4 ++--
13 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/drivers/scsi/scsi_netlink.c b/drivers/scsi/scsi_netlink.c
index a2ed201..711bdc8 100644
--- a/drivers/scsi/scsi_netlink.c
+++ b/drivers/scsi/scsi_netlink.c
@@ -111,7 +111,7 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
goto next_msg;
}
- if (security_netlink_recv(skb, CAP_SYS_ADMIN)) {
+ if (security_netlink_recv(CAP_SYS_ADMIN)) {
err = -EPERM;
goto next_msg;
}
diff --git a/include/linux/security.h b/include/linux/security.h
index b2b7f97..8f10864 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -93,7 +93,7 @@ struct xfrm_user_sec_ctx;
struct seq_file;
extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
-extern int cap_netlink_recv(struct sk_buff *skb, int cap);
+extern int cap_netlink_recv(int cap);
void reset_security_ops(void);
@@ -784,9 +784,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
* Return 0 if the information was successfully saved and message
* is allowed to be transmitted.
* @netlink_recv:
- * Check permission before processing the received netlink message in
- * @skb.
- * @skb contains the sk_buff structure for the netlink message.
+ * Check permission before processing a received netlink message.
* @cap indicates the capability required
* Return 0 if permission is granted.
*
@@ -1552,7 +1550,7 @@ struct security_operations {
struct sembuf *sops, unsigned nsops, int alter);
int (*netlink_send) (struct sock *sk, struct sk_buff *skb);
- int (*netlink_recv) (struct sk_buff *skb, int cap);
+ int (*netlink_recv) (int cap);
void (*d_instantiate) (struct dentry *dentry, struct inode *inode);
@@ -1798,7 +1796,7 @@ void security_d_instantiate(struct dentry *dentry, struct inode *inode);
int security_getprocattr(struct task_struct *p, char *name, char **value);
int security_setprocattr(struct task_struct *p, char *name, void *value, size_t size);
int security_netlink_send(struct sock *sk, struct sk_buff *skb);
-int security_netlink_recv(struct sk_buff *skb, int cap);
+int security_netlink_recv(int cap);
int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen);
int security_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid);
void security_release_secctx(char *secdata, u32 seclen);
@@ -2493,9 +2491,9 @@ static inline int security_netlink_send(struct sock *sk, struct sk_buff *skb)
return cap_netlink_send(sk, skb);
}
-static inline int security_netlink_recv(struct sk_buff *skb, int cap)
+static inline int security_netlink_recv(int cap)
{
- return cap_netlink_recv(skb, cap);
+ return cap_netlink_recv(cap);
}
static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen)
diff --git a/kernel/audit.c b/kernel/audit.c
index 608347c..ed43e46 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -596,13 +596,13 @@ static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type)
case AUDIT_TTY_SET:
case AUDIT_TRIM:
case AUDIT_MAKE_EQUIV:
- if (security_netlink_recv(skb, CAP_AUDIT_CONTROL))
+ if (security_netlink_recv(CAP_AUDIT_CONTROL))
err = -EPERM;
break;
case AUDIT_USER:
case AUDIT_FIRST_USER_MSG ... AUDIT_LAST_USER_MSG:
case AUDIT_FIRST_USER_MSG2 ... AUDIT_LAST_USER_MSG2:
- if (security_netlink_recv(skb, CAP_AUDIT_WRITE))
+ if (security_netlink_recv(CAP_AUDIT_WRITE))
err = -EPERM;
break;
default: /* bad msg */
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 2d65c6b..0d2dad5 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1819,7 +1819,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
sz_idx = type>>2;
kind = type&3;
- if (kind != 2 && security_netlink_recv(skb, CAP_NET_ADMIN))
+ if (kind != 2 && security_netlink_recv(CAP_NET_ADMIN))
return -EPERM;
if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) {
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c
index 64a7f39..51d9707 100644
--- a/net/decnet/netfilter/dn_rtmsg.c
+++ b/net/decnet/netfilter/dn_rtmsg.c
@@ -108,7 +108,7 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
return;
- if (security_netlink_recv(skb, CAP_NET_ADMIN))
+ if (security_netlink_recv(CAP_NET_ADMIN))
RCV_SKB_FAIL(-EPERM);
/* Eventually we might send routing messages too */
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index d2c1311..f821562 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -430,7 +430,7 @@ __ipq_rcv_skb(struct sk_buff *skb)
if (type <= IPQM_BASE)
return;
- if (security_netlink_recv(skb, CAP_NET_ADMIN))
+ if (security_netlink_recv(CAP_NET_ADMIN))
RCV_SKB_FAIL(-EPERM);
spin_lock_bh(&queue_lock);
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 413ab07..f58cebb 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -431,7 +431,7 @@ __ipq_rcv_skb(struct sk_buff *skb)
if (type <= IPQM_BASE)
return;
- if (security_netlink_recv(skb, CAP_NET_ADMIN))
+ if (security_netlink_recv(CAP_NET_ADMIN))
RCV_SKB_FAIL(-EPERM);
spin_lock_bh(&queue_lock);
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index b4a4532..caca5c6 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -130,7 +130,7 @@ static int nfnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
const struct nfnetlink_subsystem *ss;
int type, err;
- if (security_netlink_recv(skb, CAP_NET_ADMIN))
+ if (security_netlink_recv(CAP_NET_ADMIN))
return -EPERM;
/* All the messages must at least contain nfgenmsg */
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 1781d99..8c47d8f 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -516,7 +516,7 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
return -EOPNOTSUPP;
if ((ops->flags & GENL_ADMIN_PERM) &&
- security_netlink_recv(skb, CAP_NET_ADMIN))
+ security_netlink_recv(CAP_NET_ADMIN))
return -EPERM;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 117a99e..5ad66bf 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -2192,7 +2192,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
link = &xfrm_dispatch[type];
/* All operations require privileges, even GET */
- if (security_netlink_recv(skb, CAP_NET_ADMIN))
+ if (security_netlink_recv(CAP_NET_ADMIN))
return -EPERM;
if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) ||
diff --git a/security/commoncap.c b/security/commoncap.c
index a83e607..a9eefc9 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -55,7 +55,7 @@ int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
return 0;
}
-int cap_netlink_recv(struct sk_buff *skb, int cap)
+int cap_netlink_recv(int cap)
{
if (!cap_raised(current_cap(), cap))
return -EPERM;
diff --git a/security/security.c b/security/security.c
index 7b7308a..1e0879d 100644
--- a/security/security.c
+++ b/security/security.c
@@ -941,9 +941,9 @@ int security_netlink_send(struct sock *sk, struct sk_buff *skb)
return security_ops->netlink_send(sk, skb);
}
-int security_netlink_recv(struct sk_buff *skb, int cap)
+int security_netlink_recv(int cap)
{
- return security_ops->netlink_recv(skb, cap);
+ return security_ops->netlink_recv(cap);
}
EXPORT_SYMBOL(security_netlink_recv);
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index cef42f5..a832d6b 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -4665,13 +4665,13 @@ static int selinux_netlink_send(struct sock *sk, struct sk_buff *skb)
return selinux_nlmsg_perm(sk, skb);
}
-static int selinux_netlink_recv(struct sk_buff *skb, int capability)
+static int selinux_netlink_recv(int capability)
{
int err;
struct common_audit_data ad;
u32 sid;
- err = cap_netlink_recv(skb, capability);
+ err = cap_netlink_recv(capability);
if (err)
return err;
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] mv643xx_eth: Use netdev_<level> and pr_<level>
From: David Miller @ 2011-03-03 20:28 UTC (permalink / raw)
To: buytenh; +Cc: joe, netdev
In-Reply-To: <20110303131834.GL16649@mail.wantstofly.org>
From: Lennert Buytenhek <buytenh@wantstofly.org>
Date: Thu, 3 Mar 2011 14:18:34 +0100
> On Wed, Mar 02, 2011 at 07:50:35PM -0800, Joe Perches wrote:
>
>> Use the current logging styles.
>>
>> Signed-off-by: Joe Perches <joe@perches.com>
>
> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 2/3] mii: Convert printks to netdev_info
From: Joe Perches @ 2011-03-03 20:29 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20110303.122148.245410126.davem@davemloft.net>
On Thu, 2011-03-03 at 12:21 -0800, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> > Add a bit more data to the output.
> > Convert string speeds to integer.
> > Object size reduced a tiny bit.
> > $ size drivers/net/mii.o*
> > text data bss dec hex filename
> > 4155 56 1000 5211 145b drivers/net/mii.o.new
> > 4184 56 1000 5240 1478 drivers/net/mii.o.old
> > Signed-off-by: Joe Perches <joe@perches.com>
> Applied.
David, please don't push this yet.
This change is stuffed up somehow, it's
a reversion of the tun.c change.
Let me send you a new/correct patch right now.
^ permalink raw reply
* Re: bonding...
From: David Miller @ 2011-03-03 20:30 UTC (permalink / raw)
To: fubar; +Cc: andy, nhorman, netdev
In-Reply-To: <6286.1299173065@death>
From: Jay Vosburgh <fubar@us.ibm.com>
Date: Thu, 03 Mar 2011 09:24:25 -0800
> My main problem keeping up at the moment is another demand on my
> time that should run its course in a couple of weeks. My time for
> community activity is somewhat limited until then.
Someone needs to exist who can keep things going when you are too
busy. Unless you're like me and never take a day off, you need
at least one co-maintainer if your subsystem has lots of daily
activity as bonding now does.
> I personally like Stephen's suggestion to hook bonding into a
> netfilter gadget, similar to ebtables for bridge. Done properly, such a
> gadget should handle (or be extended to handle) the niche cases that
> right now end up as new knobs in the driver.
Netfilter has a JIT like matching engine coming soon, that could
be made generic and plugged into.
^ permalink raw reply
* [RFC PATCH 4/2] connector: update callbacks to use security_netlink_recv()
From: Chris Wright @ 2011-03-03 20:30 UTC (permalink / raw)
To: James Morris, kaber
Cc: David Miller, Chris Wright, netdev, dm-devel,
linux-security-module, drbd-dev, Evgeniy Polyakov, linux-fbdev
In-Reply-To: <20110303202626.GV4988@sequoia.sous-sol.org>
This moves callbacks from a raw capabiliity hook to the generic lsm hook
when receiving request from userspace.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/block/drbd/drbd_nl.c | 2 +-
drivers/md/dm-log-userspace-transfer.c | 2 +-
drivers/staging/pohmelfs/config.c | 2 +-
drivers/video/uvesafb.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index fe81c85..8b3301b 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -2177,7 +2177,7 @@ static void drbd_connector_callback(struct cn_msg *req, struct netlink_skb_parms
return;
}
- if (!cap_raised(current_cap(), CAP_SYS_ADMIN)) {
+ if (security_netlink_recv(CAP_SYS_ADMIN)) {
retcode = ERR_PERM;
goto fail;
}
diff --git a/drivers/md/dm-log-userspace-transfer.c b/drivers/md/dm-log-userspace-transfer.c
index 1f23e04..db34a3a 100644
--- a/drivers/md/dm-log-userspace-transfer.c
+++ b/drivers/md/dm-log-userspace-transfer.c
@@ -134,7 +134,7 @@ static void cn_ulog_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
{
struct dm_ulog_request *tfr = (struct dm_ulog_request *)(msg + 1);
- if (!cap_raised(current_cap(), CAP_SYS_ADMIN))
+ if (security_netlink_recv(CAP_SYS_ADMIN))
return;
spin_lock(&receiving_list_lock);
diff --git a/drivers/staging/pohmelfs/config.c b/drivers/staging/pohmelfs/config.c
index 39413b7..123295a 100644
--- a/drivers/staging/pohmelfs/config.c
+++ b/drivers/staging/pohmelfs/config.c
@@ -525,7 +525,7 @@ static void pohmelfs_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *n
{
int err;
- if (!cap_raised(current_cap(), CAP_SYS_ADMIN))
+ if (security_netlink_recv(CAP_SYS_ADMIN))
return;
switch (msg->flags) {
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 5180a21..081463a 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -73,7 +73,7 @@ static void uvesafb_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *ns
struct uvesafb_task *utask;
struct uvesafb_ktask *task;
- if (!cap_raised(current_cap(), CAP_SYS_ADMIN))
+ if (security_netlink_recv(CAP_SYS_ADMIN))
return;
if (msg->seq >= UVESAFB_TASKS_MAX)
--
1.7.1
^ permalink raw reply related
* Re: [PATCH 2/3] mii: Convert printks to netdev_info
From: David Miller @ 2011-03-03 20:32 UTC (permalink / raw)
To: joe; +Cc: netdev
In-Reply-To: <1299184181.4338.152.camel@Joe-Laptop>
From: Joe Perches <joe@perches.com>
Date: Thu, 03 Mar 2011 12:29:41 -0800
> On Thu, 2011-03-03 at 12:21 -0800, David Miller wrote:
>> From: Joe Perches <joe@perches.com>
>> > Add a bit more data to the output.
>> > Convert string speeds to integer.
>> > Object size reduced a tiny bit.
>> > $ size drivers/net/mii.o*
>> > text data bss dec hex filename
>> > 4155 56 1000 5211 145b drivers/net/mii.o.new
>> > 4184 56 1000 5240 1478 drivers/net/mii.o.old
>> > Signed-off-by: Joe Perches <joe@perches.com>
>> Applied.
>
> David, please don't push this yet.
Reverted.
> This change is stuffed up somehow, it's
> a reversion of the tun.c change.
Oops.
> Let me send you a new/correct patch right now.
Ok.
^ permalink raw reply
* Re: bonding...
From: Jay Vosburgh @ 2011-03-03 20:43 UTC (permalink / raw)
To: David Miller; +Cc: andy, nhorman, netdev
In-Reply-To: <20110303.123032.15242274.davem@davemloft.net>
David Miller <davem@davemloft.net> wrote:
>From: Jay Vosburgh <fubar@us.ibm.com>
>Date: Thu, 03 Mar 2011 09:24:25 -0800
>
>> My main problem keeping up at the moment is another demand on my
>> time that should run its course in a couple of weeks. My time for
>> community activity is somewhat limited until then.
>
>Someone needs to exist who can keep things going when you are too
>busy. Unless you're like me and never take a day off, you need
>at least one co-maintainer if your subsystem has lots of daily
>activity as bonding now does.
Agreed. If Andy is amenable, we can make it official:
diff --git a/MAINTAINERS b/MAINTAINERS
index 0d83e58..6402703 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1467,6 +1467,7 @@ F: include/net/bluetooth/
BONDING DRIVER
M: Jay Vosburgh <fubar@us.ibm.com>
+M: Andy Gospodarek <andy@greyhouse.net>
L: netdev@vger.kernel.org
W: http://sourceforge.net/projects/bonding/
S: Supported
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply related
* [PATCH 2/3 v2] mii: Convert printks to netdev_info
From: Joe Perches @ 2011-03-03 20:46 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20110303.123225.242141985.davem@davemloft.net>
Add a bit more data to the output.
Convert string speeds to integer.
Object size reduced a tiny bit.
$ size drivers/net/mii.o*
text data bss dec hex filename
4155 56 1000 5211 145b drivers/net/mii.o.new
4184 56 1000 5240 1478 drivers/net/mii.o.old
Signed-off-by: Joe Perches <joe@perches.com>
---
On Thu, 2011-03-03 at 12:32 -0800, David Miller wrote:
> > This change is stuffed up somehow, it's
> > a reversion of the tun.c change.
> Oops.
> > Let me send you a new/correct patch right now.
> Ok.
Sorry about that. Here's the appropriate patch.
It seems apparent I don't know how to use git properly.
I commited the change, then thought I should see
what the size difference was and add that to the
changelog.
I believe I did this:
<edits drivers/net/mii.c>
make drivers/net/mii.o
git commit -s drivers/net/mii.c
mv drivers/net/mii.o drivers/net/mii.o.new
git checkout master -- drivers/net/mii.c
make drivers/net/mii.o
mv drivers/net/mii.o drivers/net/mii.i.old
git checkout <branch> -- drivers/net/mii.c
size drivers/net/mii.o.*
etc...
git commit --amend drivers/net/mii.c (add etc...)
tun revert? No mii change? huh?
drivers/net/mii.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/mii.c b/drivers/net/mii.c
index 210b2b1..0a6c6a2 100644
--- a/drivers/net/mii.c
+++ b/drivers/net/mii.c
@@ -354,7 +354,7 @@ unsigned int mii_check_media (struct mii_if_info *mii,
if (!new_carrier) {
netif_carrier_off(mii->dev);
if (ok_to_print)
- printk(KERN_INFO "%s: link down\n", mii->dev->name);
+ netdev_info(mii->dev, "link down\n");
return 0; /* duplex did not change */
}
@@ -381,12 +381,12 @@ unsigned int mii_check_media (struct mii_if_info *mii,
duplex = 1;
if (ok_to_print)
- printk(KERN_INFO "%s: link up, %sMbps, %s-duplex, lpa 0x%04X\n",
- mii->dev->name,
- lpa2 & (LPA_1000FULL | LPA_1000HALF) ? "1000" :
- media & (ADVERTISE_100FULL | ADVERTISE_100HALF) ? "100" : "10",
- duplex ? "full" : "half",
- lpa);
+ netdev_info(mii->dev, "link up, %uMbps, %s-duplex, lpa 0x%04X\n",
+ lpa2 & (LPA_1000FULL | LPA_1000HALF) ? 1000 :
+ media & (ADVERTISE_100FULL | ADVERTISE_100HALF) ?
+ 100 : 10,
+ duplex ? "full" : "half",
+ lpa);
if ((init_media) || (mii->full_duplex != duplex)) {
mii->full_duplex = duplex;
^ permalink raw reply related
* Re: [PATCH 2/3 v2] mii: Convert printks to netdev_info
From: David Miller @ 2011-03-03 20:56 UTC (permalink / raw)
To: joe; +Cc: netdev
In-Reply-To: <1299185190.4338.163.camel@Joe-Laptop>
From: Joe Perches <joe@perches.com>
Date: Thu, 03 Mar 2011 12:46:30 -0800
> Add a bit more data to the output.
> Convert string speeds to integer.
> Object size reduced a tiny bit.
> $ size drivers/net/mii.o*
> text data bss dec hex filename
> 4155 56 1000 5211 145b drivers/net/mii.o.new
> 4184 56 1000 5240 1478 drivers/net/mii.o.old
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
> I believe I did this:
>
> <edits drivers/net/mii.c>
> make drivers/net/mii.o
> git commit -s drivers/net/mii.c
> mv drivers/net/mii.o drivers/net/mii.o.new
> git checkout master -- drivers/net/mii.c
> make drivers/net/mii.o
> mv drivers/net/mii.o drivers/net/mii.i.old
> git checkout <branch> -- drivers/net/mii.c
> size drivers/net/mii.o.*
> etc...
> git commit --amend drivers/net/mii.c (add etc...)
>
> tun revert? No mii change? huh?
I think the definition of "last commit" used by --amend might be the
issue in this case.
^ permalink raw reply
* Re: bonding...
From: Andy Gospodarek @ 2011-03-03 20:59 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: Andy Gospodarek, Neil Horman, David Miller, netdev
In-Reply-To: <6286.1299173065@death>
On Thu, Mar 03, 2011 at 09:24:25AM -0800, Jay Vosburgh wrote:
> Andy Gospodarek <andy@greyhouse.net> wrote:
> >
> >I would be willing to do it, but my one of my goals would be to prevent
> >some of the feature creep we are currently seeing with bonding (as Ben
> >has suggested). That doesn't mean I want to stop all new features, but
> >at this point things are starting to get out of control. I suspect this
> >is why Jay has struggled to keep up with the patches.
>
> My main problem keeping up at the moment is another demand on my
> time that should run its course in a couple of weeks. My time for
> community activity is somewhat limited until then.
>
> As far as the features go, yes, I agree that things are getting
> out of hand. The two pending patches for special cases related to
> 802.3ad (Oleg's patch to permit round robining, the other to enable
> spanning aggregators across switches), for example, are fine
> functionality, but there really needs to be a better, generic, way to do
> this sort of niche case activity without adding more knobs.
>
> I personally like Stephen's suggestion to hook bonding into a
> netfilter gadget, similar to ebtables for bridge. Done properly, such a
> gadget should handle (or be extended to handle) the niche cases that
> right now end up as new knobs in the driver.
>
> >I would also want to look at a restructuring of the configuration. The
> >lines are starting to blur between some of the modes and output port
> >selection for other modes and that needs to be cleared up.
>
> What did you have in mind here?
>
This is what I've been thinking about for a while, but it's basically
off the top of my head. Of couse it seems reasonable to me....
As more people try to add functionality that exists in one mode to
another mode it becomes clear that the distinction between some of the
modes isn't clear anymore. If we really want round-robin send on
802.3ad and xor modes, why do we have rr and xor anymore? For that
matter, why not just get rid of active-backup too and add an option for
transmit algorithm to be active-backup. It can get to be a slippery
slope when you start to combine them as it seems like you would just be
changing the language from 'mode' to 'transmit algoritm,' but I still
think it is worth thinking about.
Instead of thinking about the 7 modes of bonding that currently exist,
it makes more sense to me to think of the bond as being dynamic or
static (with 802.3ad being the only mode that is currently dynamic) and
then the user can select the transmit algorithm. Obviously this isn't
totally flushed out since some transmit algorithms will be able to
support arp monitoring and some will not, but I suspect you know where
I'm going.
^ 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