Re: [PATCH 2/6]: powerpc/cell spidernet low watermark patch.

2006-08-20 Thread Benjamin Herrenschmidt
card-low_watermark-next-dmac_cmd_status |= SPIDER_NET_DESCR_TXDESFLG; mb(); card-low_watermark-dmac_cmd_status = ~SPIDER_NET_DESCR_TXDESFLG; card-low_watermark = card-low_watermark-next; when we queue another frame for TX. I would have expected those to be racy vs. the hardware... what if

[PATCH] e1000: e1000_probe resources cleanup

2006-08-20 Thread Vasily Averin
this patch fixes resources cleanup in e1000_probe() Signed-off-by: Vasily Averin [EMAIL PROTECTED] Thank you, Vasily Averin SWsoft Virtuozzo/OpenVZ Linux kernel team --- linux-2.6.18-rc4/drivers/net/e1000/e1000_main.c.eprcln 2006-08-19 23:02:45.0 +0400 +++

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread Andi Kleen
On Sunday 20 August 2006 01:05, Solar Designer wrote: I propose the attached patch (extracted from 2.4.33-ow1) for inclusion into 2.4.34-pre. (2.6 kernels could benefit from the same change, too, but at the moment I am dealing with proper submission of generic changes like this that are a

Re: [PATCH 2/6]: powerpc/cell spidernet low watermark patch.

2006-08-20 Thread Arnd Bergmann
On Sunday 20 August 2006 08:31, Benjamin Herrenschmidt wrote: card-low_watermark-next-dmac_cmd_status |= SPIDER_NET_DESCR_TXDESFLG; mb(); card-low_watermark-dmac_cmd_status = ~SPIDER_NET_DESCR_TXDESFLG; card-low_watermark = card-low_watermark-next; when we queue another frame for TX.

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread Willy Tarreau
On Sun, Aug 20, 2006 at 10:34:43AM +0200, Andi Kleen wrote: On Sunday 20 August 2006 01:05, Solar Designer wrote: I propose the attached patch (extracted from 2.4.33-ow1) for inclusion into 2.4.34-pre. (2.6 kernels could benefit from the same change, too, but at the moment I am dealing

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread YOSHIFUJI Hideaki / 吉藤英明
Hello. In article [EMAIL PROTECTED] (at Sun, 20 Aug 2006 12:15:28 +0200), Willy Tarreau [EMAIL PROTECTED] says: But I don't want to induce such large changes in this kernel. The goal of this test is a preventive measure to catch easily exploitable errors that might have remained undetected.

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread Solar Designer
On Sun, Aug 20, 2006 at 10:34:43AM +0200, Andi Kleen wrote: In general I don't think it makes sense to submit stuff for 2.4 that isn't in 2.6. In general I agree, however right now I had the choice between submitting these changes for 2.4 first and not submitting them at all (at least for some

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread Arjan van de Ven
We're on UP. sys_getsockopt() does get_user() (due to the patch) and makes sure that the passed *optlen is sane. Even if this get_user() sleeps, the value it returns in len is what's currently in memory at the time of the get_user() return (correct?) Then an underlying *getsockopt()

800+ byte inlines in include/net/pkt_act.h

2006-08-20 Thread Denis Vlasenko
Hi, include/net/pkt_act.h plays a game of inlines which are kind of templatized, like this: act_ipt.c: /* ovewrride the defaults */ #define tcf_st tcf_ipt #define tcf_t_lock ipt_lock #define tcf_ht tcf_ipt_ht #define CONFIG_NET_ACT_INIT #include net/pkt_act.h This

[RFC v2] HOWTO use NAPI to reduce TX interrupts

2006-08-20 Thread Arnd Bergmann
A recent discussion about the spidernet driver resulted in the dicovery that network drivers are supposed to use NAPI for both their receive and transmit paths, but this is documented nowhere. In order to help the next person writing a NAPI based driver, I wrote down what I found missing about

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread Alan Cox
Ar Sul, 2006-08-20 am 03:05 +0400, ysgrifennodd Solar Designer: The patch makes getsockopt(2) sanity-check the value pointed to by the optlen argument early on. This is a security hardening measure intended to prevent exploitation of certain potential vulnerabilities in socket type specific

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread Andi Kleen
On Sunday 20 August 2006 18:16, Solar Designer wrote: On Sun, Aug 20, 2006 at 10:34:43AM +0200, Andi Kleen wrote: In general I don't think it makes sense to submit stuff for 2.4 that isn't in 2.6. In general I agree, however right now I had the choice between submitting these changes for

Re: [RFC] nl80211 + packet injection with it and d80211

2006-08-20 Thread Jiri Benc
Johannes, thanks a lot for your work on nl80211! New netlink interface is one of the most important things regarding 802.11 stack now. Fri, 18 Aug 2006 16:49:25 +0200, Johannes Berg wrote: [...] +/** + * struct nl80211_driver - backend description for wireless configuration + * + * This

Re: PATCH Fix bonding active-backup behavior for VLAN interfaces

2006-08-20 Thread Christophe Devriese
This fixes my issue. Thanks. On Tuesday 15 August 2006 02:09, you wrote: From: Jay Vosburgh [EMAIL PROTECTED] Date: Thu, 03 Aug 2006 18:01:35 -0700 In this case (bond0.555 above bond0 above eth0,eth1,etc), skb_bond doesn't suppress duplicates because skb_bond is called with the

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread David Miller
From: Willy Tarreau [EMAIL PROTECTED] Date: Sun, 20 Aug 2006 02:43:07 +0200 On Sun, Aug 20, 2006 at 02:05:20AM +0200, Michael Buesch wrote: Not to me. It heavily violates codingstyle and screws brains ^^^ little exageration detected here. with the non-indented else

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread David Miller
From: Andi Kleen [EMAIL PROTECTED] Date: Sun, 20 Aug 2006 10:34:43 +0200 Doing a check that is inherently racy everywhere doesn't seem like a security improvement to me. If there is really a length checking bug somewhere it needs to be fixed in a race-free way. If not then there is no need

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread David Miller
From: Arjan van de Ven [EMAIL PROTECTED] Date: Sun, 20 Aug 2006 18:30:51 +0200 this reasoning goes out the window with kernel preemption of course ;) Yes and even though this thing is for 2.4.x, it just shows that this is a hack and we shouldn't eat two userspace accesses for a hack. Instead

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread David Miller
From: Willy Tarreau [EMAIL PROTECTED] Date: Sun, 20 Aug 2006 12:15:28 +0200 Others will consider it totally useless because it does not cover all cases, but I think it is against the general principle of precaution we try to apply in security. Reading in a value from userspace twice for

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread Solar Designer
On Sun, Aug 20, 2006 at 08:38:34PM +0200, Andi Kleen wrote: On Sunday 20 August 2006 18:16, Solar Designer wrote: On Sun, Aug 20, 2006 at 10:34:43AM +0200, Andi Kleen wrote: In general I don't think it makes sense to submit stuff for 2.4 that isn't in 2.6. In general I agree,

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread Willy Tarreau
Hi David, On Sun, Aug 20, 2006 at 12:44:27PM -0700, David Miller wrote: From: Willy Tarreau [EMAIL PROTECTED] Date: Sun, 20 Aug 2006 02:43:07 +0200 On Sun, Aug 20, 2006 at 02:05:20AM +0200, Michael Buesch wrote: Not to me. It heavily violates codingstyle and screws brains

[PATCH] xirc2ps_cs: Cannot reset card in atomic context

2006-08-20 Thread Daniel Drake
From: Joerg Ahrens [EMAIL PROTECTED] I am using a Xircom CEM33 pcmcia NIC which has occasional hardware problems. If the netdev watchdog detects a transmit timeout, do_reset is called which msleeps - this is illegal in atomic context. This patch schedules the timeout handling as a workqueue

Re: [PATCH] getsockopt() early argument sanity checking

2006-08-20 Thread Arjan van de Ven
We're not assuming they're broken. When some code is maintained by many people and when conventions differ between similar functions (eg: setsockopt does the check at top level and getsockopt in the leaves), thats not something you want to fix in 2.4 though ;) it may be worth considering for

Re: [PATCH,RFC] Re: r8169 driver problem with RTL8110SB chip (on iop3xx ARM board)

2006-08-20 Thread Francois Romieu
Lennert Buytenhek [EMAIL PROTECTED] : [...] The hack patch below makes it work. There's two issues here: 1. Writing zero to the upper part of the TxDescStartAddr register (via the MMIO region) somehow also clears the lower part, and writing the upper and lower halves the other way

[2.6 patch] net/atm/: proper prototypes

2006-08-20 Thread Adrian Bunk
This patch adds proper prototypes in net/atm/mpc.h for two global functions in net/atm/mpoa_proc.c Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- net/atm/mpc.c |5 - net/atm/mpc.h |3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) ---

[PATCH] Make struct in_addr::s_addr __be32

2006-08-20 Thread Alexey Dobriyan
There will be relatively small increase in sparse endian warnings, but this (and sin_port) patch is a first step to make networking code endian clean. Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED] --- include/linux/in.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---

[PATCH] Make struct sockaddr_in::sin_port __be16

2006-08-20 Thread Alexey Dobriyan
Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED] --- include/linux/in.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/in.h +++ b/include/linux/in.h @@ -177,7 +177,7 @@ struct in_pktinfo #define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */

SNMPv2 ipv6IfStatsInAddrErrors counter error

2006-08-20 Thread Lv Liangying
Hi, All When I tested Linux kernel 2.6.17.7 about statistics ipv6IfStatsInAddrErrors, found that this counter couldn't increase correctly. The criteria is RFC2465: ipv6IfStatsInAddrErrors OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current

Re: [PATCH 5/7] ip1000: Modify coding style of ipg_config_autoneg()

2006-08-20 Thread Jesse Huang
Hi : Ok, I will remove the Mixed case variables. Thanks. Jesse - Original Message - From: Francois Romieu [EMAIL PROTECTED] To: Jesse Huang [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; linux-kernel@vger.kernel.org; netdev@vger.kernel.org; [EMAIL

Re: [PATCH 1/6] IP100A, add end of pci id table

2006-08-20 Thread Jesse Huang
Hi Jeff: Ok, I see. I will resend all of the patches after I finish modify. Thanks. Jesse - Original Message - From: Jeff Garzik [EMAIL PROTECTED] To: Jesse Huang [EMAIL PROTECTED] Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; [EMAIL PROTECTED] Sent: Friday, August 18, 2006

[PATCH 1/7] ieee80211: Fix header-qos_ctl endian issue

2006-08-20 Thread Zhu Yi
Signed-off-by: Jackie Wu [EMAIL PROTECTED] Signed-off-by: Zhu Yi [EMAIL PROTECTED] --- net/ieee80211/ieee80211_crypt_tkip.c |2 +- net/ieee80211/ieee80211_tx.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 5f71dc4d20e5be8004f547d32012fec28d38cff6 diff --git

[PATCH 3/7] ieee80211: TKIP and CCMP replay check rework

2006-08-20 Thread Zhu Yi
Use time_after() to handle jiffies wrapping. Signed-off-by: Hong Liu [EMAIL PROTECTED] Signed-off-by: Zhu Yi [EMAIL PROTECTED] --- net/ieee80211/ieee80211_crypt_ccmp.c | 23 ++- net/ieee80211/ieee80211_crypt_tkip.c | 16 ++-- 2 files changed, 36

ipw2200 driver updates

2006-08-20 Thread Zhu Yi
Hi, Below are some ieee80211 patches I'd like to submit upstream. Please apply. [PATCH 1/7] ieee80211: Fix header-qos_ctl endian issue [PATCH 2/7] ieee80211: remove ieee80211_tx() is_queue_full warning [PATCH 3/7] ieee80211: TKIP and CCMP replay check rework [PATCH 4/7] ieee80211: Add

[PATCH 2/7] ieee80211: remove ieee80211_tx() is_queue_full warning

2006-08-20 Thread Zhu Yi
Signed-off-by: Zhu Yi [EMAIL PROTECTED] --- net/ieee80211/ieee80211_tx.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) 2890239696cb57c3fbf6b948042cfeac70de561e diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c index f2e6131..ae25449 100644 ---

[PATCH 4/7] ieee80211: Add IEEE80211_API_VERSION macro

2006-08-20 Thread Zhu Yi
Add IEEE80211_API_VERSION macro so that drivers are able to check it during compile time. This feature is useful to make backward IEEE80211 compatibilities for wireless drivers. Signed-off-by: Zhu Yi [EMAIL PROTECTED] --- include/net/ieee80211.h | 12 +++- 1 files changed, 11

[PATCH 6/7] ieee80211: Fix TKIP and WEP decryption error on SMP machines

2006-08-20 Thread Zhu Yi
The IEEE80211 TKIP and WEP Tx and Rx paths use the same crypto_tfm to encrypt and decrypt data. During the encrypt and decrypt process, both of them will set a new key to crypto_tfm. If they happen on the same time, it will corrupt the crypto_tfm. Thus users will receive an ICV error or Michael

[PATCH 02/14] ipw2200: SIOCGIWFREQ ioctl returns frequency rather than channel

2006-08-20 Thread Zhu Yi
The SIOCGIWFREQ ioctl fills the request structure's freq field by setting the exponent to 0 and the mantissa to the current channel number. The iwconfig tool works around this behaviour by looking up the frequency from the channel table if a frequency below 1kHz is returned, other tools (e.g.

[PATCH 7/7] ieee80211: Workaround malformed 802.11 frames from AP

2006-08-20 Thread Zhu Yi
Stop processing further but return success when we receive a malformed packet from the AP. We need this patch to workaround some AP bugs. For example, the beacon frames from the Orinoco AP1000 contains an IE (value = 128) with length equals to 8 but the actual frame length is only 7.

[PATCH 05/14] ipw2200: remove unused struct ipw_rx_buffer

2006-08-20 Thread Zhu Yi
Signed-off-by: Zhu Yi [EMAIL PROTECTED] --- drivers/net/wireless/ipw2200.c |1 - drivers/net/wireless/ipw2200.h |1 - 2 files changed, 0 insertions(+), 2 deletions(-) 03c243ef92ce7b04edb74b8a97bd112d06dafd86 diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c

ipw2200 driver updates

2006-08-20 Thread Zhu Yi
Hi, Here are some patches for ipw2100 and ipw2200 driver. Please apply. [PATCH 01/14] ipw2200: always enable frequently used debugging code [PATCH 02/14] ipw2200: SIOCGIWFREQ ioctl returns frequency rather than channel [PATCH 03/14] ipw2200: ipw_wx_set_essid fix [PATCH 04/14] ipw2200:

[PATCH 03/14] ipw2200: ipw_wx_set_essid fix

2006-08-20 Thread Zhu Yi
This patch cleanups the ipw_wx_set_essid code and forces a reassociation when setting the essid to any. I have tested this patch with iwconfig. It makes ipw2200 compliant with all the cases mentioned in the iwconfig man page. The commands iwconfig iface essid any iwconfig iface essid -- any

[PATCH 5/7] ieee80211: export symbol ieee80211_api_version

2006-08-20 Thread Zhu Yi
Export this symbol so that wireless drivers can check the running IEEE80211 API version dynamically. Signed-off-by: Zhu Yi [EMAIL PROTECTED] --- include/net/ieee80211.h |2 ++ net/ieee80211/ieee80211_module.c |3 +++ 2 files changed, 5 insertions(+), 0 deletions(-)

[PATCH 04/14] ipw2200: Reassociate even if set the same essid.

2006-08-20 Thread Zhu Yi
This patch traps the case when the essid is being set to its current value. If the essid is being set again and we are already associated, chances are some other parameters have also been altered. I think it is safer to do the re-association for this case. Signed-off-by: Bill Moss [EMAIL

[PATCH 01/14] ipw2200: always enable frequently used debugging code

2006-08-20 Thread Zhu Yi
Moving part of the debugging code from IPW_DEBUG to IPW_LL_DEBUG (low level debugging) and make IPW_DEBUG be always enabled. IPW_LL_DEBUG still needs to be enabled by selecting CONFIG_IPW2200_DEBUG. But it is highly deprecated for normal users since it adds higher debug verbosity in driver hot

[PATCH 06/14] ipw2100: Make ipw2100 depends on known working platforms

2006-08-20 Thread Zhu Yi
ipw2100 driver doesn't support big endian by now. Signed-off-by: Karol Lewandowski [EMAIL PROTECTED] Signed-off-by: Zhu Yi [EMAIL PROTECTED] --- drivers/net/wireless/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 97b35942893f7999dadcd18d8801ac460f65ce67 diff --git

[PATCH 10/14] ipw2200: Fix kernel Oops if cmdlog debug is enabled

2006-08-20 Thread Zhu Yi
When command error log debug is enabled, we write every host command and parameters into a buffer. But we didn't alloc the parameter buffer for this case. The patch adds struct cmdlog_host_cmd so that the buffer is allocated from the stack. Signed-off-by: Zhu Yi [EMAIL PROTECTED] ---

[PATCH 07/14] ipw2200: Fix ipw2200 QOS parameters endian issue

2006-08-20 Thread Zhu Yi
Signed-off-by: Jackie Wu [EMAIL PROTECTED] Signed-off-by: Zhu Yi [EMAIL PROTECTED] --- drivers/net/wireless/ipw2200.c | 52 1 files changed, 31 insertions(+), 21 deletions(-) fc32e5f014ca92fd000ffefc02326e2ed3890e11 diff --git

[PATCH 13/14] ipw2200: enable wireless extension passive scan

2006-08-20 Thread Zhu Yi
This patch enables the ipw2200 driver to support passive scanning as offered by the wireless extensions. For this, I enhanced the ipw_wx_set_scan function in such a way that it differentiates between a passive and an active scan request. Additionally, I added a new function called

[PATCH 12/14] ipw2100: Fix deadlock detected by lockdep

2006-08-20 Thread Zhu Yi
Fix by removing dependency between priv-action_sem and rtnl semaphore. Signed-off-by: Zhu Yi [EMAIL PROTECTED] --- drivers/net/wireless/ipw2100.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) fcf4f163e01e6c5128e578fdbe1e778bc16fa1c0 diff --git a/drivers/net/wireless/ipw2100.c

[PATCH 14/14] Update version ipw2200 stamp to 1.1.4

2006-08-20 Thread Zhu Yi
--- drivers/net/wireless/ipw2200.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) d93ef0e734bdd43b02b9dbd0f030aa622ed69583 diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index ea14b55..750c25d 100644 --- a/drivers/net/wireless/ipw2200.c +++

[PATCH 11/14] ipw2200: Add pci .shutdown handler

2006-08-20 Thread Zhu Yi
If we don't disable the card in the pci .shutdown method, there might be pending interrupts still in the interrupt line after a reboot on some platform. This patch fixes the problem by disable the hardware in the pci .shutdown method. Signed-off-by: Zhu Yi [EMAIL PROTECTED] ---

[PATCH 08/14] ipw2200: remove the MAC timestamp present field from radiotap head

2006-08-20 Thread Zhu Yi
IEEE80211_RADIOTAP_TSFT is defined as the Value in microseconds of the MAC's 64-bit 802.11 Time Synchronization Function timer when the first bit of the MPDU arrived at the MAC. Since ipw2200 hardware doesn't provide this value, we disable this feature from the radiotap header present flag.

[PATCH 09/14] ipw2200: mark iwconfig retry 255 as invalid

2006-08-20 Thread Zhu Yi
The ipw2200 firmware/ucode only support values from 0 to 254. So mark 255 as invalid. Signed-off-by: Zhu Yi [EMAIL PROTECTED] --- drivers/net/wireless/ipw2200.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 3ac6f33083c5f2e8900b06a29b124afd7b6e064f diff --git

Re: ipw2200 driver updates

2006-08-20 Thread Zhu Yi
On Mon, 2006-08-21 at 11:32 +0800, Zhu Yi wrote: Mail subject error. Should be ieee80211 updates :( Thanks, -yi - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 5/6] IP100A correct init and close step

2006-08-20 Thread Jesse Huang
Hi Jeff: (3)Yes, This is a bug, I will correct it. Thanks. (4)This will halt TxDMA and RxDMA, after that will let reseting safely. Should I add description in source code or in change log? Thanks! Jesse - Original Message - From: Jeff Garzik [EMAIL PROTECTED] To: Jesse Huang [EMAIL

Re: [PATCH 6/6] IP100A Solve host error problem when in low performance embedded

2006-08-20 Thread Jesse Huang
Hi Jeff: I will follow those suggestions. Thanks. Jesse - Original Message - From: Jeff Garzik [EMAIL PROTECTED] To: Jesse Huang [EMAIL PROTECTED] Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; [EMAIL PROTECTED] Sent: Friday, August 18, 2006 7:17 PM Subject: Re: [PATCH

Bug in order of multiple IPv6 addresses per interface? Newest added one is preferred in difference to IPv4

2006-08-20 Thread Peter Bieringer
Hi, if I add an additional IPv4 address of the same subnet (IP aliasing, used for virtual hosting), it's added after the first one and also get the flag secondary: # ip -4 addr show dev eth0 | grep -w inet inet 192.0.2.11/24 brd 192.0.2.255 scope global eth0 # ip -4 addr add 192.0.2.253/24

Re: [PATCH 4/6] IP100A Change search phy addr start form 0

2006-08-20 Thread Jesse Huang
Hi Jeff: In IP100A, phy address is 0. Because IP100A is a single chip, the in chip phy address is 0. so, we must search phy address for 0. Jesse - Original Message - From: Jeff Garzik [EMAIL PROTECTED] To: Jesse Huang [EMAIL PROTECTED] Cc: linux-kernel@vger.kernel.org;