* Re: [PATCH] bridge: dont send notification when skb->len == 0 in rtnl_bridge_notify
From: roopa @ 2015-01-28 13:37 UTC (permalink / raw)
To: David Miller; +Cc: netdev, stephen, rami.rosen
In-Reply-To: <20150127.230511.1131199235284204820.davem@davemloft.net>
On 1/27/15, 11:05 PM, David Miller wrote:
> From: roopa@cumulusnetworks.com
> Date: Tue, 27 Jan 2015 21:46:24 -0800
>
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> Reported in: https://bugzilla.kernel.org/show_bug.cgi?id=92081
>>
>> This patch avoids calling rtnl_notify if the device ndo_bridge_getlink
>> handler does not return any bytes in the skb.
>>
>> Alternately, the skb->len check can be moved inside rtnl_notify.
>>
>> For the bridge vlan case described in 92081, there is also a fix needed
>> in bridge driver to generate a proper notification. Will fix that in
>> subsequent patch.
>>
>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
> This doesn't apply to the 'net' tree, is there something I missed?
sorry, that's me. This should be net-next. Resubmitting with net-next in
the PATCH line.
thanks.
^ permalink raw reply
* Re: [PATCH bluetooth-next v2] ieee802154: fix netns settings
From: Alexander Aring @ 2015-01-28 20:36 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: netdev, davem, linux-wpan, marcel
In-Reply-To: <1422457112-4377-1-git-send-email-nicolas.dichtel@6wind.com>
On Wed, Jan 28, 2015 at 03:58:32PM +0100, Nicolas Dichtel wrote:
> 6LoWPAN currently doesn't supports x-netns and works only in init_net.
>
> With this patch, we ensure that:
> - the wpan interface cannot be moved to another netns;
> - the 6lowpan interface cannot be moved to another netns;
> - the wpan interface is in the same netns than the 6lowpan interface;
> - the 6lowpan interface is in init_net.
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Marcel, can you please queue this for bluetooth-next?
Thanks.
- Alex
^ permalink raw reply
* [kernel] [iwlwifi] problem with Centrino Advanced-N 6200
From: kichawa23 @ 2015-01-28 14:19 UTC (permalink / raw)
To: linux-wireless, netdev
[-- Attachment #1: Type: text/plain, Size: 532 bytes --]
My kernel:
Linux x61s 3.18.2-2-ARCH #1 SMP PREEMPT Fri Jan 9 07:23:08 CET 2015 i686 GNU/Linux
Linux x61s 3.18.4-1-ARCH #1 SMP PREEMPT Tue Jan 27 21:01:00 CET 2015 i686 GNU/Linux
My network controller:
02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)
My connection randomly disconnects. [iwlwifi.log]
[Symptom was the same about a year ago.]
I cannot turn off and turn on the wlan0 interface [ifconfig wlan0 up]
More details: https://bugzilla.kernel.org/show_bug.cgi?id=92231
Thank in advance
[-- Attachment #2: ifconfig_wlan0_up --]
[-- Type: text/plain, Size: 3038 bytes --]
[ 1091.345765] [<c106c253>] kthread+0xb3/0xd0
[ 1091.345771] [<c1479f41>] ret_from_kernel_thread+0x21/0x30
[ 1091.345774] [<c106c1a0>] ? kthread_create_on_node+0x130/0x130
[ 1091.345778] ---[ end trace 0c7129685113d084 ]---
[ 1091.346187] cfg80211: Calling CRDA to update world regulatory domain
[ 1091.347266] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1092.152886] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1092.953799] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1110.559529] thinkpad_acpi: EC reports that Thermal Table has changed
[ 1110.647118] EXT4-fs (sda5): re-mounted. Opts: data=ordered,commit=600
[ 1111.251256] EXT4-fs (sda1): re-mounted. Opts: (null)
[ 1111.276142] EXT4-fs (sda6): re-mounted. Opts: data=ordered,commit=600
[ 1111.357783] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1112.158623] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1112.959585] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1113.760724] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1114.561713] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1115.362895] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1116.164144] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1116.965222] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1117.766201] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1118.567244] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1196.936806] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 1197.006316] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 1202.642017] iwlwifi 0000:02:00.0: Failed to load firmware chunk!
[ 1202.642029] iwlwifi 0000:02:00.0: Could not load the [0] uCode section
[ 1202.642037] iwlwifi 0000:02:00.0: Failed to start RT ucode: -110
[ 1204.435533] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1206.246198] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1208.092369] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1209.903953] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1211.668061] iwlwifi 0000:02:00.0: Unable to initialize device.
[ 1220.413655] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 1220.483357] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 1226.118549] iwlwifi 0000:02:00.0: Failed to load firmware chunk!
[ 1226.118558] iwlwifi 0000:02:00.0: Could not load the [0] uCode section
[ 1226.118567] iwlwifi 0000:02:00.0: Failed to start RT ucode: -110
[ 1227.911330] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1229.721430] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1231.566820] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1233.377219] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1235.140838] iwlwifi 0000:02:00.0: Unable to initialize device.
[-- Attachment #3: tained --]
[-- Type: text/plain, Size: 5 bytes --]
4096
[-- Attachment #4: lsmod_modinfo --]
[-- Type: text/plain, Size: 7633 bytes --]
filename: /lib/modules/3.18.4-1-ARCH/kernel/fs/fuse/fuse.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/bluetooth/bnep/bnep.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/bluetooth/btusb.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/bluetooth/bluetooth.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/hwmon/coretemp.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/thermal/intel_powerclamp.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/kvm/kvm.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/joydev.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/mousedev.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec-hdmi.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/platform/x86/thinkpad_acpi.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/crc32-pclmul.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/crc32c-intel.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec-conexant.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec-generic.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/arc4.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/aesni-intel.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/net/wireless/iwlwifi/dvm/iwldvm.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/nvram.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/watchdog/iTCO_wdt.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/watchdog/iTCO_vendor_support.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-intel.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-controller.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd-hwdep.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/aes-i586.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd-pcm.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/xts.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/leds/led-class.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/mac80211/mac80211.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/i2c/busses/i2c-i801.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/hwmon/hwmon.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd-timer.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/soundcore.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/lrw.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/mouse/psmouse.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/tpm/tpm_tis.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/gf128mul.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/wireless/cfg80211.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/platform/x86/intel_ips.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/ablk_helper.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/thermal.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/agp/intel-agp.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/mfd/lpc_ich.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/serio_raw.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/cryptd.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/ptp/ptp.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/tpm/tpm.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/pps/pps_core.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/platform/x86/wmi.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/rfkill/rfkill.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/ac.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/pci/hotplug/shpchp.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/misc/mei/mei-me.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/misc/mei/mei.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/battery.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/evdev.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/macintosh/mac_hid.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/sched/sch_fq_codel.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/cpufreq/cpufreq_powersave.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/cpufreq/acpi-cpufreq.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/processor.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/extramodules/vboxnetflt.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/extramodules/vboxdrv.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/fs/ext4/ext4.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/lib/crc16.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/fs/mbcache.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/fs/jbd2/jbd2.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/scsi/sd_mod.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/hid/hid-generic.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/hid/usbhid/usbhid.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/hid/hid.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/keyboard/atkbd.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/libps2.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/ata/ahci.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/ata/libahci.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/ata/libata.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/host/ehci-pci.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/host/ehci-hcd.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/core/usbcore.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/common/usb-common.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/i8042.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/serio.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/gpu/drm/i915/i915.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/button.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/agp/intel-gtt.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/i2c/algos/i2c-algo-bit.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/video.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/gpu/drm/drm_kms_helper.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/gpu/drm/drm.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/agp/agpgart.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/i2c/i2c-core.ko.gz
[-- Attachment #5: iwlwifi.log --]
[-- Type: text/plain, Size: 41189 bytes --]
[ 2.240667] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[ 2.241652] ata1.00: configured for UDMA/100
[ 2.242013] scsi 0:0:0:0: Direct-Access ATA WDC WD1600BEKT-6 1A03 PQ: 0 ANSI: 5
[ 2.314986] hub 1-1:1.0: USB hub found
[ 2.315167] hub 1-1:1.0: 6 ports detected
[ 2.328133] hub 2-1:1.0: USB hub found
[ 2.328242] hub 2-1:1.0: 8 ports detected
[ 2.560325] ata2: SATA link down (SStatus 0 SControl 300)
[ 2.580464] usb 1-1.1: new full-speed USB device number 3 using ehci-pci
[ 2.593803] Switched to clocksource tsc
[ 2.667065] hub 1-1.1:1.0: USB hub found
[ 2.667195] hub 1-1.1:1.0: 3 ports detected
[ 2.733763] usb 1-1.3: new full-speed USB device number 4 using ehci-pci
[ 2.880123] ata5: SATA link down (SStatus 0 SControl 300)
[ 2.933614] usb 1-1.1.1: new full-speed USB device number 5 using ehci-pci
[ 3.021913] hidraw: raw HID events driver (C) Jiri Kosina
[ 3.023672] usbcore: registered new interface driver usbhid
[ 3.023677] usbhid: USB HID core driver
[ 3.024340] input: HID 0a5c:4502 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/0003:0A5C:4502.0001/input/input6
[ 3.024425] hid-generic 0003:0A5C:4502.0001: input,hidraw0: USB HID v1.11 Keyboard [HID 0a5c:4502] on usb-0000:00:1a.0-1.1.1/input0
[ 3.086962] usb 1-1.1.2: new full-speed USB device number 6 using ehci-pci
[ 3.176844] input: HID 0a5c:4503 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:0A5C:4503.0002/input/input7
[ 3.176968] hid-generic 0003:0A5C:4503.0002: input,hidraw1: USB HID v1.11 Mouse [HID 0a5c:4503] on usb-0000:00:1a.0-1.1.2/input0
[ 3.199924] ata6: SATA link down (SStatus 0 SControl 300)
[ 3.204317] sd 0:0:0:0: [sda] 312581808 512-byte logical blocks: (160 GB/149 GiB)
[ 3.204418] sd 0:0:0:0: [sda] Write Protect is off
[ 3.204426] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 3.204471] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3.243409] usb 1-1.1.3: new full-speed USB device number 7 using ehci-pci
[ 3.256658] sda: sda1 sda2 sda3 < sda5 sda6 >
[ 3.257293] sd 0:0:0:0: [sda] Attached SCSI disk
[ 3.708516] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[ 4.773097] random: nonblocking pool is initialized
[ 4.788760] systemd[1]: RTC configured in localtime, applying delta of 60 minutes to system time.
[ 6.009083] systemd[1]: [/usr/lib/systemd/system/mpd.service:17] Unknown lvalue 'ControlGroup' in section 'Service'
[ 6.009110] systemd[1]: [/usr/lib/systemd/system/mpd.service:20] Unknown lvalue 'ControlGroupAttribute' in section 'Service'
[ 6.466663] thinkpad_ec: thinkpad_ec 0.41 loaded.
[ 6.469279] tp_smapi 0.41 loading...
[ 6.469487] tp_smapi successfully loaded (smapi_port=0xb2).
[ 6.566841] vboxdrv: Found 4 processor cores.
[ 6.567257] vboxdrv: fAsync=0 offMin=0x3ea offMax=0x2588
[ 6.567395] vboxdrv: TSC mode is 'synchronous', kernel timer mode is 'normal'.
[ 6.567397] vboxdrv: Successfully loaded version 4.3.20_OSE (interface 0x001a0008).
[ 6.568897] EXT4-fs (sda5): re-mounted. Opts: (null)
[ 9.856787] ACPI: Battery Slot [BAT0] (battery present)
[ 9.909078] agpgart: Erk, registering with no pci_dev!
[ 9.909083] agpgart-intel: probe of 0000:00:00.0 failed with error -22
[ 9.923847] tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78)
[ 9.927300] pps_core: LinuxPPS API ver. 1 registered
[ 9.927302] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 9.941411] PTP clock support registered
[ 9.972841] tpm_tis 00:05: TPM is disabled/deactivated (0x6)
[ 10.045646] ACPI Warning: SystemIO range 0x00001028-0x0000102f conflicts with OpRegion 0x00001000-0x0000107f (\_SB_.PCI0.LPC_.PMIO) (20140926/utaddress-258)
[ 10.045652] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 10.045656] ACPI Warning: SystemIO range 0x000011c0-0x000011cf conflicts with OpRegion 0x00001180-0x000011ff (\_SB_.PCI0.LPC_.LPIO) (20140926/utaddress-258)
[ 10.045659] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 10.045660] ACPI Warning: SystemIO range 0x000011b0-0x000011bf conflicts with OpRegion 0x00001180-0x000011ff (\_SB_.PCI0.LPC_.LPIO) (20140926/utaddress-258)
[ 10.045662] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 10.045663] ACPI Warning: SystemIO range 0x00001180-0x000011af conflicts with OpRegion 0x00001180-0x000011ff (\_SB_.PCI0.LPC_.LPIO) (20140926/utaddress-258)
[ 10.045666] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 10.045667] lpc_ich: Resource conflict(s) found affecting gpio_ich
[ 10.058335] thermal LNXTHERM:00: registered as thermal_zone0
[ 10.058339] ACPI: Thermal Zone [THM0] (60 C)
[ 10.068941] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 10.081236] i801_smbus 0000:00:1f.3: SMBus using PCI Interrupt
[ 10.122734] intel ips 0000:00:1f.6: CPU TDP doesn't match expected value (found 25, expected 29)
[ 10.123420] wmi: Mapper loaded
[ 10.126066] intel ips 0000:00:1f.6: IPS driver initialized, MCP temp limit 90
[ 10.134364] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
[ 10.134367] e1000e: Copyright(c) 1999 - 2014 Intel Corporation.
[ 10.134526] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 10.134548] e1000e 0000:00:19.0: irq 26 for MSI/MSI-X
[ 10.310987] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) f0:de:f1:08:57:de
[ 10.310995] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[ 10.311040] e1000e 0000:00:19.0 eth0: MAC: 9, PHY: 10, PBA No: C5C0FF-0FF
[ 10.311193] mei_me 0000:00:16.0: irq 27 for MSI/MSI-X
[ 10.315956] ACPI: AC Adapter [AC] (on-line)
[ 10.420470] cfg80211: Calling CRDA to update world regulatory domain
[ 10.504483] Intel(R) Wireless WiFi driver for Linux, in-tree:
[ 10.504486] Copyright(c) 2003- 2014 Intel Corporation
[ 10.504652] iwlwifi 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 10.504801] iwlwifi 0000:02:00.0: irq 28 for MSI/MSI-X
[ 10.589711] Non-volatile memory driver v1.3
[ 10.667220] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-6000-6.ucode failed with error -2
[ 10.667255] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-6000-5.ucode failed with error -2
[ 10.679529] iwlwifi 0000:02:00.0: loaded firmware version 9.221.4.1 build 25532 op_mode iwldvm
[ 10.819241] thinkpad_acpi: ThinkPad ACPI Extras v0.25
[ 10.819245] thinkpad_acpi: http://ibm-acpi.sf.net/
[ 10.819246] thinkpad_acpi: ThinkPad BIOS 6QET46WW (1.16 ), EC 6QHT28WW-1.09
[ 10.819248] thinkpad_acpi: Lenovo ThinkPad X201, model 3680BR4
[ 10.819694] thinkpad_acpi: detected a 16-level brightness capable ThinkPad
[ 10.819868] thinkpad_acpi: radio switch found; radios are enabled
[ 10.820047] thinkpad_acpi: possible tablet mode switch found; ThinkPad in laptop mode
[ 10.820059] thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
[ 10.820060] thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
[ 10.823954] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one
[ 10.824030] thinkpad_acpi: Console audio control enabled, mode: override (read/write)
[ 10.825218] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input9
[ 10.848234] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUG disabled
[ 10.848238] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
[ 10.848240] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled
[ 10.848242] iwlwifi 0000:02:00.0: Detected Intel(R) Centrino(R) Advanced-N 6200 AGN, REV=0x74
[ 10.848392] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 10.889301] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[ 10.907788] iTCO_vendor_support: vendor-support=0
[ 10.913764] snd_hda_intel 0000:00:1b.0: irq 29 for MSI/MSI-X
[ 10.993037] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
[ 10.993085] iTCO_wdt: Found a QM57 TCO device (Version=2, TCOBASE=0x1060)
[ 10.993158] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
[ 11.048503] sound hdaudioC0D0: CX20585: BIOS auto-probing.
[ 11.049003] sound hdaudioC0D0: autoconfig: line_outs=1 (0x1f/0x0/0x0/0x0/0x0) type:speaker
[ 11.049006] sound hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 11.049007] sound hdaudioC0D0: hp_outs=2 (0x1c/0x19/0x0/0x0/0x0)
[ 11.049009] sound hdaudioC0D0: mono: mono_out=0x0
[ 11.049010] sound hdaudioC0D0: inputs:
[ 11.049012] sound hdaudioC0D0: Internal Mic=0x23
[ 11.049014] sound hdaudioC0D0: Mic=0x1b
[ 11.049015] sound hdaudioC0D0: Dock Mic=0x1a
[ 11.050092] sound hdaudioC0D0: Enable sync_write for stable communication
[ 11.247477] psmouse serio1: synaptics: Touchpad model: 1, fw: 7.4, id: 0x1e0b1, caps: 0xd047b3/0xb40000/0xa0000, board id: 71, fw id: 615624
[ 11.247490] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0
[ 11.300794] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input8
[ 11.325149] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card0/hdaudioC0D0/input10
[ 11.325557] input: HDA Intel MID Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[ 11.325647] input: HDA Intel MID Dock Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[ 11.325734] input: HDA Intel MID Dock Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14
[ 11.325815] input: HDA Intel MID Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input15
[ 11.325899] input: HDA Intel MID HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input16
[ 11.430883] mousedev: PS/2 mouse device common for all mice
[ 11.718985] kvm: disabled by bios
[ 11.735951] kvm: disabled by bios
[ 12.032924] systemd-journald[144]: Received request to flush runtime journal from PID 1
[ 13.513457] Adding 249000k swap on /dev/sda2. Priority:-1 extents:1 across:249000k FS
[ 14.084971] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[ 14.254685] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[ 14.919322] Bluetooth: Core ver 2.19
[ 14.919341] NET: Registered protocol family 31
[ 14.919342] Bluetooth: HCI device and connection manager initialized
[ 14.919350] Bluetooth: HCI socket layer initialized
[ 14.919353] Bluetooth: L2CAP socket layer initialized
[ 14.919359] Bluetooth: SCO socket layer initialized
[ 14.976084] usbcore: registered new interface driver btusb
[ 15.236769] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
[ 15.285941] psmouse serio2: hgpk: ID: 10 00 64
[ 16.923655] psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 3/3
[ 17.188937] input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/serio2/input/input11
[ 19.248504] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 19.248508] Bluetooth: BNEP filters: protocol multicast
[ 19.248514] Bluetooth: BNEP socket layer initialized
[ 22.488952] e1000e 0000:00:19.0: irq 26 for MSI/MSI-X
[ 22.589181] e1000e 0000:00:19.0: irq 26 for MSI/MSI-X
[ 22.589351] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 24.021487] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 24.028356] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 24.238338] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 24.245153] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 24.320319] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 26.332454] wlan0: authenticate with 00:25:9c:3d:11:92
[ 26.333774] wlan0: send auth to 00:25:9c:3d:11:92 (try 1/3)
[ 26.339122] wlan0: authenticated
[ 26.339351] iwlwifi 0000:02:00.0 wlan0: disabling HT/VHT due to WEP/TKIP use
[ 26.339360] wlan0: waiting for beacon from 00:25:9c:3d:11:92
[ 26.413651] wlan0: associate with 00:25:9c:3d:11:92 (try 1/3)
[ 26.417375] wlan0: RX AssocResp from 00:25:9c:3d:11:92 (capab=0x411 status=0 aid=2)
[ 26.427487] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 26.427671] wlan0: associated
[ 54.181665] cfg80211: Calling CRDA to update world regulatory domain
[ 90.496163] cfg80211: Calling CRDA to update world regulatory domain
[ 124.726421] fuse init (API version 7.23)
[ 163.182366] cfg80211: Calling CRDA to update world regulatory domain
[ 549.484387] perf interrupt took too long (2523 > 2495), lowering kernel.perf_event_max_sample_rate to 50100
[ 1207.499667] perf interrupt took too long (4991 > 4960), lowering kernel.perf_event_max_sample_rate to 25200
[ 1536.295554] iwlwifi 0000:02:00.0: Error sending REPLY_TXFIFO_FLUSH: time out after 2000ms.
[ 1536.295561] iwlwifi 0000:02:00.0: Current CMD queue read_ptr 222 write_ptr 226
[ 1536.312697] ------------[ cut here ]------------
[ 1536.312716] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/pcie/trans.c:1269 iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]()
[ 1536.312718] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff)
[ 1536.312720] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1536.312771] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.312783] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G O 3.18.2-2-ARCH #1
[ 1536.312785] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.312801] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.312803] 00000000 9454c866 00000000 ce1b1cbc c1474f33 ce1b1d00 ce1b1cf0 c10527f2
[ 1536.312808] f84405d0 ce1b1d20 000009e2 f84405a4 000004f5 f8430f34 000004f5 f8430f34
[ 1536.312812] f843ba80 ce1b1d58 f43aa000 ce1b1d0c c105284e 00000009 ce1b1d00 f84405d0
[ 1536.312816] Call Trace:
[ 1536.312825] [<c1474f33>] dump_stack+0x48/0x69
[ 1536.312832] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.312837] [<f8430f34>] ? iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]
[ 1536.312840] [<f8430f34>] ? iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]
[ 1536.312843] [<c105284e>] warn_slowpath_fmt+0x3e/0x60
[ 1536.312847] [<f8430f34>] iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]
[ 1536.312852] [<f842447c>] iwl_write_prph+0x2c/0x60 [iwlwifi]
[ 1536.312856] [<f84244d6>] iwl_force_nmi+0x26/0x50 [iwlwifi]
[ 1536.312860] [<f842fcc0>] iwl_trans_pcie_send_hcmd+0x5a0/0x620 [iwlwifi]
[ 1536.312865] [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.312872] [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.312876] [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.312880] [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.312884] [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.312894] [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.312904] [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.312913] [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.312924] [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.312934] [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.312939] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.312942] [<c1067a63>] process_one_work+0x113/0x380
[ 1536.312945] [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.312948] [<c1067f59>] worker_thread+0x39/0x440
[ 1536.312951] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.312954] [<c106c173>] kthread+0xb3/0xd0
[ 1536.312958] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.312960] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.312963] ---[ end trace a5b5252fd3fa22c1 ]---
[ 1536.312993] iwlwifi 0000:02:00.0: Loaded firmware version: 9.221.4.1 build 25532
[ 1536.330191] iwlwifi 0000:02:00.0: Start IWL Error Log Dump:
[ 1536.330198] iwlwifi 0000:02:00.0: Status: 0x0000004C, count: -197484544
[ 1536.330201] iwlwifi 0000:02:00.0: 0xCE1B1CBC | ADVANCED_SYSASSERT
[ 1536.330202] iwlwifi 0000:02:00.0: 0xC10564D3 | uPc
[ 1536.330204] iwlwifi 0000:02:00.0: 0xCE1B1CC8 | branchlink1
[ 1536.330206] iwlwifi 0000:02:00.0: 0xC147AD98 | branchlink2
[ 1536.330208] iwlwifi 0000:02:00.0: 0x9454C866 | interruptlink1
[ 1536.330210] iwlwifi 0000:02:00.0: 0xF5303B20 | interruptlink2
[ 1536.330212] iwlwifi 0000:02:00.0: 0xC1538797 | data1
[ 1536.330213] iwlwifi 0000:02:00.0: 0xCE1B1E08 | data2
[ 1536.330216] iwlwifi 0000:02:00.0: 0xCE1B1CE0 | line
[ 1536.330217] iwlwifi 0000:02:00.0: 0xC131754F | beacon time
[ 1536.330219] iwlwifi 0000:02:00.0: 0xCE1B1CF4 | tsf low
[ 1536.330221] iwlwifi 0000:02:00.0: 0xCE1B1D10 | tsf hi
[ 1536.330223] iwlwifi 0000:02:00.0: 0xC13175AA | time gp1
[ 1536.330224] iwlwifi 0000:02:00.0: 0x00000003 | time gp2
[ 1536.330226] iwlwifi 0000:02:00.0: 0xF533E064 | time gp3
[ 1536.330228] iwlwifi 0000:02:00.0: 0xC156A6F8 | uCode version
[ 1536.330230] iwlwifi 0000:02:00.0: 0xF843E569 | hw version
[ 1536.330231] iwlwifi 0000:02:00.0: 0xF5303B20 | board version
[ 1536.330233] iwlwifi 0000:02:00.0: 0xF2C49084 | hcmd
[ 1536.330235] iwlwifi 0000:02:00.0: 0xCE1B1D40 | isr0
[ 1536.330237] iwlwifi 0000:02:00.0: 0xCE1B1D28 | isr1
[ 1536.330239] iwlwifi 0000:02:00.0: 0xC1317768 | isr2
[ 1536.330241] iwlwifi 0000:02:00.0: 0xCE1B1D38 | isr3
[ 1536.330242] iwlwifi 0000:02:00.0: 0xF843E2DA | isr4
[ 1536.330244] iwlwifi 0000:02:00.0: 0xCE1B1D18 | isr_pref
[ 1536.330246] iwlwifi 0000:02:00.0: 0x9454C866 | wait_event
[ 1536.330248] iwlwifi 0000:02:00.0: 0xCE1B1D54 | l2p_control
[ 1536.330250] iwlwifi 0000:02:00.0: 0xF8426340 | l2p_duration
[ 1536.330252] iwlwifi 0000:02:00.0: 0xF533E064 | l2p_mhvalid
[ 1536.330253] iwlwifi 0000:02:00.0: 0xF843E2DA | l2p_addr_match
[ 1536.330255] iwlwifi 0000:02:00.0: 0xCE1B1D40 | lmpm_pmg_sel
[ 1536.330256] iwlwifi 0000:02:00.0: 0xCE1B1D6C | timestamp
[ 1536.330258] iwlwifi 0000:02:00.0: 0xF895A0B1 | flow_handler
[ 1536.347419] ------------[ cut here ]------------
[ 1536.347434] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]()
[ 1536.347436] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1536.347476] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.347486] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G W O 3.18.2-2-ARCH #1
[ 1536.347487] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.347499] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.347501] 00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.347504] c15468cc 00000000 000009e2 f895c488 0000037b f893c867 0000037b f893c867
[ 1536.347507] 00800914 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.347510] Call Trace:
[ 1536.347520] [<c1474f33>] dump_stack+0x48/0x69
[ 1536.347526] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.347530] [<f893c867>] ? iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]
[ 1536.347533] [<f893c867>] ? iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]
[ 1536.347536] [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.347539] [<f893c867>] iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]
[ 1536.347544] [<c1317768>] ? dev_err+0x38/0x50
[ 1536.347548] [<f8426340>] ? __iwl_err+0xd0/0xe0 [iwlwifi]
[ 1536.347551] [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.347555] [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.347560] [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.347565] [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.347569] [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.347573] [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.347576] [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.347584] [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.347592] [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.347600] [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.347607] [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.347615] [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.347619] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.347621] [<c1067a63>] process_one_work+0x113/0x380
[ 1536.347623] [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.347625] [<c1067f59>] worker_thread+0x39/0x440
[ 1536.347627] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.347629] [<c106c173>] kthread+0xb3/0xd0
[ 1536.347632] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.347634] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.347635] ---[ end trace a5b5252fd3fa22c2 ]---
[ 1536.364779] ------------[ cut here ]------------
[ 1536.364797] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]()
[ 1536.364798] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1536.364838] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.364848] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G W O 3.18.2-2-ARCH #1
[ 1536.364850] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.364862] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.364864] 00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.364867] c15468cc 00000000 000009e2 f895c488 0000037b f893c827 0000037b f893c827
[ 1536.364870] 00800914 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.364874] Call Trace:
[ 1536.364882] [<c1474f33>] dump_stack+0x48/0x69
[ 1536.364887] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.364891] [<f893c827>] ? iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]
[ 1536.364894] [<f893c827>] ? iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]
[ 1536.364897] [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.364900] [<f893c827>] iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]
[ 1536.364904] [<c1317768>] ? dev_err+0x38/0x50
[ 1536.364908] [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.364912] [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.364917] [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.364922] [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.364926] [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.364929] [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.364933] [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.364941] [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.364949] [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.364956] [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.364964] [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.364972] [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.364975] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.364977] [<c1067a63>] process_one_work+0x113/0x380
[ 1536.364979] [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.364981] [<c1067f59>] worker_thread+0x39/0x440
[ 1536.364983] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.364985] [<c106c173>] kthread+0xb3/0xd0
[ 1536.364988] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.364989] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.364991] ---[ end trace a5b5252fd3fa22c3 ]---
[ 1536.382167] ------------[ cut here ]------------
[ 1536.382186] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]()
[ 1536.382187] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1536.382227] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.382237] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G W O 3.18.2-2-ARCH #1
[ 1536.382239] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.382251] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.382253] 00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.382256] c15468cc 00000000 000009e2 f895c488 0000037b f893c847 0000037b f893c847
[ 1536.382259] 00800914 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.382263] Call Trace:
[ 1536.382271] [<c1474f33>] dump_stack+0x48/0x69
[ 1536.382277] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.382281] [<f893c847>] ? iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]
[ 1536.382284] [<f893c847>] ? iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]
[ 1536.382286] [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.382289] [<f893c847>] iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]
[ 1536.382294] [<c1317768>] ? dev_err+0x38/0x50
[ 1536.382298] [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.382303] [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.382307] [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.382312] [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.382316] [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.382319] [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.382323] [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.382331] [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.382339] [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.382346] [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.382354] [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.382362] [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.382365] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.382367] [<c1067a63>] process_one_work+0x113/0x380
[ 1536.382369] [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.382371] [<c1067f59>] worker_thread+0x39/0x440
[ 1536.382373] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.382375] [<c106c173>] kthread+0xb3/0xd0
[ 1536.382378] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.382380] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.382382] ---[ end trace a5b5252fd3fa22c4 ]---
[ 1536.399578] ------------[ cut here ]------------
[ 1536.399596] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]()
[ 1536.399598] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1536.399638] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.399648] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G W O 3.18.2-2-ARCH #1
[ 1536.399649] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.399662] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.399664] 00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.399667] c15468cc 00000000 000009e2 f895c488 0000037b f893c80c 0000037b f893c80c
[ 1536.399670] a5a5a5a5 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.399673] Call Trace:
[ 1536.399681] [<c1474f33>] dump_stack+0x48/0x69
[ 1536.399686] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.399690] [<f893c80c>] ? iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]
[ 1536.399693] [<f893c80c>] ? iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]
[ 1536.399695] [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.399698] [<f893c80c>] iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]
[ 1536.399703] [<c1317768>] ? dev_err+0x38/0x50
[ 1536.399707] [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.399712] [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.399716] [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.399721] [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.399725] [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.399729] [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.399732] [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.399741] [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.399749] [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.399756] [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.399764] [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.399771] [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.399775] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.399777] [<c1067a63>] process_one_work+0x113/0x380
[ 1536.399780] [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.399782] [<c1067f59>] worker_thread+0x39/0x440
[ 1536.399784] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.399786] [<c106c173>] kthread+0xb3/0xd0
[ 1536.399789] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.399791] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.399792] ---[ end trace a5b5252fd3fa22c5 ]---
[ 1536.399797] iwlwifi 0000:02:00.0: Log capacity -1515870811 is bogus, limit to 512 entries
[ 1536.399800] iwlwifi 0000:02:00.0: Log write index -1515870811 is bogus, limit to 512
[ 1536.399802] iwlwifi 0000:02:00.0: Start IWL Event Log Dump: display last 20 entries
[ 1536.416951] iwlwifi 0000:02:00.0: flush request fail
[ 1538.194457] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1539.990896] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1541.827348] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1543.625376] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1545.380698] ieee80211 phy0: Hardware restart was requested
[ 1545.380786] iwlwifi 0000:02:00.0: Fw not loaded - dropping CMD: 1e
[ 1545.380791] iwlwifi 0000:02:00.0: flush request fail
[ 1545.397083] iwlwifi 0000:02:00.0: Fw not loaded - dropping CMD: 20
[ 1545.397095] wlan0: failed to remove key (0, ff:ff:ff:ff:ff:ff) from hardware (-5)
[ 1545.397218] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 1545.466236] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 1551.100485] iwlwifi 0000:02:00.0: Failed to load firmware chunk!
[ 1551.100495] iwlwifi 0000:02:00.0: Could not load the [0] uCode section
[ 1551.100504] iwlwifi 0000:02:00.0: Failed to start RT ucode: -110
[ 1552.878783] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1554.675102] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1556.505200] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1558.301091] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1558.301103] sched: RT throttling activated
[ 1560.060161] iwlwifi 0000:02:00.0: Unable to initialize device.
[ 1560.060170] ------------[ cut here ]------------
[ 1560.060197] WARNING: CPU: 2 PID: 149 at net/mac80211/util.c:1686 ieee80211_reconfig+0x12f2/0x16a0 [mac80211]()
[ 1560.060200] Hardware became unavailable during restart.
[ 1560.060202] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1560.060273] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1560.060288] CPU: 2 PID: 149 Comm: kworker/2:2 Tainted: G W O 3.18.2-2-ARCH #1
[ 1560.060291] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1560.060303] Workqueue: events ieee80211_restart_work [mac80211]
[ 1560.060305] 00000000 24cb9ba5 00000000 f4bf1e40 c1474f33 f4bf1e84 f4bf1e74 c10527f2
[ 1560.060312] f920951c f4bf1ea4 00000095 f920b4e9 00000696 f91d2512 00000696 f91d2512
[ 1560.060318] f2c48fe4 ffffff92 f4ad1900 f4bf1e90 c105284e 00000009 f4bf1e84 f920951c
[ 1560.060325] Call Trace:
[ 1560.060337] [<c1474f33>] dump_stack+0x48/0x69
[ 1560.060345] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1560.060362] [<f91d2512>] ? ieee80211_reconfig+0x12f2/0x16a0 [mac80211]
[ 1560.060378] [<f91d2512>] ? ieee80211_reconfig+0x12f2/0x16a0 [mac80211]
[ 1560.060383] [<c105284e>] warn_slowpath_fmt+0x3e/0x60
[ 1560.060399] [<f91d2512>] ieee80211_reconfig+0x12f2/0x16a0 [mac80211]
[ 1560.060404] [<c1477bd4>] ? __mutex_lock_slowpath+0x34/0x120
[ 1560.060415] [<f91a42ed>] ieee80211_restart_work+0x3d/0x80 [mac80211]
[ 1560.060421] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1560.060425] [<c1067a63>] process_one_work+0x113/0x380
[ 1560.060429] [<c14767d6>] ? preempt_schedule+0x36/0x50
[ 1560.060433] [<c1067f59>] worker_thread+0x39/0x440
[ 1560.060437] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1560.060441] [<c106c173>] kthread+0xb3/0xd0
[ 1560.060447] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1560.060450] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1560.060454] ---[ end trace a5b5252fd3fa22c6 ]---
[ 1560.060533] ------------[ cut here ]------------
[ 1560.060551] WARNING: CPU: 2 PID: 149 at net/mac80211/driver-ops.h:12 ieee80211_do_stop+0x872/0x890 [mac80211]()
[ 1560.060553] wlan0: Failed check-sdata-in-driver check, flags: 0x4
[ 1560.060555] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1560.060615] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1560.060627] CPU: 2 PID: 149 Comm: kworker/2:2 Tainted: G W O 3.18.2-2-ARCH #1
[ 1560.060630] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1560.060640] Workqueue: events ieee80211_restart_work [mac80211]
[ 1560.060642] 00000000 24cb9ba5 00000000 f4bf1d54 c1474f33 f4bf1d98 f4bf1d88 c10527f2
[ 1560.060648] f9208e60 f4bf1db8 00000095 f920b267 0000000c f91b8e82 0000000c f91b8e82
[ 1560.060655] f2c48cd8 00000000 f40dbcf8 f4bf1da4 c105284e 00000009 f4bf1d98 f9208e60
[ 1560.060661] Call Trace:
[ 1560.060667] [<c1474f33>] dump_stack+0x48/0x69
[ 1560.060672] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1560.060687] [<f91b8e82>] ? ieee80211_do_stop+0x872/0x890 [mac80211]
[ 1560.060701] [<f91b8e82>] ? ieee80211_do_stop+0x872/0x890 [mac80211]
[ 1560.060705] [<c105284e>] warn_slowpath_fmt+0x3e/0x60
[ 1560.060720] [<f91b8e82>] ieee80211_do_stop+0x872/0x890 [mac80211]
[ 1560.060727] [<c13b8699>] ? dev_deactivate_many+0x1a9/0x1f0
[ 1560.060741] [<f91b8eb7>] ieee80211_stop+0x17/0x20 [mac80211]
[ 1560.060748] [<c1395059>] __dev_close_many+0x79/0xe0
[ 1560.060752] [<c139512d>] dev_close_many+0x6d/0xf0
[ 1560.060757] [<c1398c90>] dev_close.part.77+0x30/0x50
[ 1560.060761] [<c1398cc6>] dev_close+0x16/0x20
[ 1560.060772] [<f85627b5>] cfg80211_shutdown_all_interfaces+0x45/0xb0 [cfg80211]
[ 1560.060776] [<c105284e>] ? warn_slowpath_fmt+0x3e/0x60
[ 1560.060793] [<f91d14ec>] ieee80211_reconfig+0x2cc/0x16a0 [mac80211]
[ 1560.060798] [<c1477bd4>] ? __mutex_lock_slowpath+0x34/0x120
[ 1560.060809] [<f91a42ed>] ieee80211_restart_work+0x3d/0x80 [mac80211]
[ 1560.060813] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1560.060817] [<c1067a63>] process_one_work+0x113/0x380
[ 1560.060821] [<c14767d6>] ? preempt_schedule+0x36/0x50
[ 1560.060825] [<c1067f59>] worker_thread+0x39/0x440
[ 1560.060829] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1560.060832] [<c106c173>] kthread+0xb3/0xd0
[ 1560.060837] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1560.060840] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1560.060843] ---[ end trace a5b5252fd3fa22c7 ]---
[ 1560.061547] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1560.062625] cfg80211: Calling CRDA to update world regulatory domain
^ permalink raw reply
* Re: [PATCH net 1/2] caif: remove wrong dev_net_set() call
From: Nicolas Dichtel @ 2015-01-28 15:07 UTC (permalink / raw)
To: netdev; +Cc: davem, arvid.brodin, alex.aring, linux-wpan, Dmitry Tarnyagin
In-Reply-To: <1422307694-10079-2-git-send-email-nicolas.dichtel@6wind.com>
Removing bouncing email addresses (dmitry.tarnyagin@lockless.no and
sjur.brandeland@stericsson.com)
CC: Dmitry Tarnyagin <abi.dmitryt@gmail.com>
Dmitry, please also have a look to
http://permalink.gmane.org/gmane.linux.network/347942
Thank you,
Nicolas
Le 26/01/2015 22:28, Nicolas Dichtel a écrit :
> src_net points to the netns where the netlink message has been received. This
> netns may be different from the netns where the interface is created (because
> the user may add IFLA_NET_NS_[PID|FD]). In this case, src_net is the link netns.
>
> It seems wrong to override the netns in the newlink() handler because if it
> was not already src_net, it means that the user explicitly asks to create the
> netdevice in another netns.
>
> CC: Sjur Brændeland <sjur.brandeland@stericsson.com>
> CC: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
> Fixes: 8391c4aab1aa ("caif: Bugfixes in CAIF netdevice for close and flow control")
> Fixes: c41254006377 ("caif-hsi: Add rtnl support")
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> drivers/net/caif/caif_hsi.c | 1 -
> net/caif/chnl_net.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
> index 5e40a8b68cbe..b3b922adc0e4 100644
> --- a/drivers/net/caif/caif_hsi.c
> +++ b/drivers/net/caif/caif_hsi.c
> @@ -1415,7 +1415,6 @@ static int caif_hsi_newlink(struct net *src_net, struct net_device *dev,
>
> cfhsi = netdev_priv(dev);
> cfhsi_netlink_parms(data, cfhsi);
> - dev_net_set(cfhsi->ndev, src_net);
>
> get_ops = symbol_get(cfhsi_get_ops);
> if (!get_ops) {
> diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
> index 4589ff67bfa9..67a4a36febd1 100644
> --- a/net/caif/chnl_net.c
> +++ b/net/caif/chnl_net.c
> @@ -470,7 +470,6 @@ static int ipcaif_newlink(struct net *src_net, struct net_device *dev,
> ASSERT_RTNL();
> caifdev = netdev_priv(dev);
> caif_netlink_parms(data, &caifdev->conn_req);
> - dev_net_set(caifdev->netdev, src_net);
>
> ret = register_netdevice(dev);
> if (ret)
>
^ permalink raw reply
* NetDev 0.1 Schedule delay update
From: Jamal Hadi Salim @ 2015-01-28 13:24 UTC (permalink / raw)
To: netdev, linux-wireless, lwn, netdev01, lartc, netfilter,
netfilter-devel
Cc: info, speakers, attendees
Fellow netheads,
On behalf of rgb and the tech committee:
Schedule update
----------------
We apologize, the schedule will not be ready until Thursday.
The content is so good we are having a hard time coming up
with a schedule which is not going to conflict with anybody's interest.
We have finalized all the technical content. Every accepted proposal is
now listed at:
https://www.netdev01.org/sessions
To help you plan your trip it should be understood that we are planning
to have the first two days to be tutorial, workshop and BOF days. The
next two days to be talks. There are some non-technical BOFs which
are still in the pipeline - watch the RSS feed or twitter.
New talks since last time:
--------------------------
John Fastabend - Flow API: An abstraction for hardware flow tables
https://www.netdev01.org/news/50
New Tutorials since last time:
------------------------------
1) Cong Wang, Jamal Hadi Salim - Linux Traffic Control (TC) tutorial
https://www.netdev01.org/news/48
2) Jon Maloy - Introduction to basics of TIPC
https://www.netdev01.org/news/49
And as rgb already posted,Hotel update:
The hotel has agreed, on a best effort basis to extend the
netdev01 rate of $159.00 or $179.00 (depending on the type of room
required). Please dont procastinate and book now. We are competing
against a few tourist activities for hotel rooms going on around the
area at the same time (example:
http://www.ottawafestivals.ca/events/winterlude-2/).
Do your reservations at:
https://www.starwoodmeeting.com/StarGroupsWeb/res?id=1412035802&key=1AC9C1F8
If you dont succeed getting the reservation, send us email at
info at netdev01.org; we will try to bat for you but we cant guarantee
results.
conference registration at:
https://onlineregistrations.ca/netdev01/
Sponsors:
=========
NetDev 0.1 would like to gratefully acknowledge all our sponsors:
https://netdev01.org/sponsors
CENGN http://www.cengn.ca/
Google https://www.google.ca
Qualcomm https://www.qualcomm.com/
Verizon http://www.verizon.com/
Cumulus Networks http://cumulusnetworks.com/
Mojatatu Networks http://mojatatu.com/
Important Dates:
==========================
December 2, 2014 Call for Papers opens
December 10, 2014 Registration opens
January 23, 2015 Hotel discount rates deadline
January 24, 2015 Call for sessions deadline
February 12, 2015 On-line registration closes
February 14-17, 2015 Conference days
-------------------------------------------------------------------------------
THE Technical Conference on Linux Networking, February 14-17, 2015,
Ottawa, Canada
https://netdev01.org/
Contact: info@xxxxxxxxxxxxx
Main site: https://www.netdev01.org/
Announcement: https://www.netdev01.org/announce
CFP: https://www.netdev01.org/cfp
Travel/hotel/weather/clothing: https://www.netdev01.org/travel
RSS feed: https://netdev01.org/atom
Follow us on Twitter: @netdev01 https://twitter.com/netdev01
cheers,
jamal
^ permalink raw reply
* Re: [PATCH net-next 06/10] net/mlx4_core: Fix struct mlx4_vhcr_cmd to make implicit padding explicit
From: Jack Morgenstein @ 2015-01-28 15:16 UTC (permalink / raw)
To: David Miller; +Cc: David.Laight, amirv, netdev, ogerlitz, yevgenyp
In-Reply-To: <20150127.111334.501141232585900738.davem@davemloft.net>
>>On Tue, 27 Jan 2015 11:13:34 -0800 (PST)
>>David Miller <davem@davemloft.net> wrote:
>> Indeed, I'm really sick of seeing these packed structures being
>> created all over the place.
>>
>> They are to be used in absolutely extreme cases where no other
>> solution is possible.
>The V2 of this patch does not have "packed".
I meant the **V1** version of the patch, does not have "packed".
-Jack
^ permalink raw reply
* Re: [RFC PATCH] net: ipv6: Make address flushing on ifdown optional
From: Hannes Frederic Sowa @ 2015-01-28 8:25 UTC (permalink / raw)
To: David Ahern; +Cc: Andy Gospodarek, Stephen Hemminger, netdev
In-Reply-To: <54C855D6.7050500@gmail.com>
On Di, 2015-01-27 at 20:21 -0700, David Ahern wrote:
> On 01/27/2015 08:28 AM, Hannes Frederic Sowa wrote:
> >> From the discussion a second patch is needed to make sure DAD is done
> >> on a link up if there is an address configured.
> >
> > Thank you!
> >
> > Let's see if the DAD patch isn't complex, maybe it is a candidate for
> > stable?
>
> Actually, DAD is done on a link up; you can see the notifications go out
> when the link is brought up:
Oh, cool, sorry I did not check and misunderstood you in the other mail.
> 18:46:28.519907 IP6 :: > ff02::1:ff00:10: ICMP6, neighbor solicitation,
> who has 2001:1::10, length 24
> 18:46:28.607650 IP6 :: > ff02::1:ff03:402: ICMP6, neighbor solicitation,
> who has fe80::1:2ff:fe03:402, length 24
>
> So current top of tree works fine wrt DAD on addresses added when a link
> is down and then the link is brought up.
>
> But, my previous patch does not re-send notifications on the up in a
> down-up cycle. I believe it is because the IFA_F_TENTATIVE flag is not
> set for the global address configured. I will address that in the
> revised patch.
Sounds good, I don't see any more problems with this patch then.
Thanks!
^ permalink raw reply
* [PATCH 2/2] string_helpers: Change semantics of string_escape_mem
From: Rasmus Villemoes @ 2015-01-28 13:25 UTC (permalink / raw)
To: Andy Shevchenko, Andrew Morton, Trond Myklebust, J. Bruce Fields,
David S. Miller
Cc: Rasmus Villemoes, linux-kernel, linux-nfs, netdev
In-Reply-To: <1422451543-12401-1-git-send-email-linux@rasmusvillemoes.dk>
The current semantics of string_escape_mem are inadequate for one of
its two current users, vsnprintf(). If that is to honour its contract,
it must know how much space would be needed for the entire escaped
buffer, and string_escape_mem provides no way of obtaining that (short
of allocating a large enough buffer (~4 times input string) to let it
play with, and that's definitely a big no-no inside vsnprintf).
So change the semantics for string_escape_mem to be more
snprintf-like: Return the size of the output that would be generated
if the destination buffer was big enough, but of course still only
write to the part of dst it is allowed to, and don't do
'\0'-termination. It is then up to the caller to detect whether output
was truncated and to append a '\0' if desired.
This also fixes a bug in the escaped_string() helper function, which
used to unconditionally pass a length of "end-buf" to
string_escape_mem(); since the latter doesn't check osz for being
insanely large, it would happily write to dst. For example,
kasprintf(GFP_KERNEL, "something and then %pE", ...); is an easy way
to trigger an oops.
The patch is somewhat larger than I'd like, but I couldn't find a way
of splitting it into smaller pieces. Implementation-wise, I changed
the various escape_* helpers to return true if they handled the
character, updating dst appropriately, false otherwise. Maybe there's
a more elegant way, but this seems to work.
In test-string_helpers.c, I removed the now meaningless -ENOMEM test,
and replaced it with testing for getting the expected return value
even if the buffer is too small. Also ensure that nothing is written
when osz==0.
In net/sunrpc/cache.c, I think qword_add still has the same
semantics. Someone should definitely double-check this.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
include/linux/string_helpers.h | 10 +--
lib/string_helpers.c | 195 ++++++++++++++++-------------------------
lib/test-string_helpers.c | 37 ++++----
lib/vsprintf.c | 2 +-
net/sunrpc/cache.c | 8 +-
5 files changed, 101 insertions(+), 151 deletions(-)
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h
index 6eb567ac56bc..7a082aa183a8 100644
--- a/include/linux/string_helpers.h
+++ b/include/linux/string_helpers.h
@@ -47,22 +47,22 @@ static inline int string_unescape_any_inplace(char *buf)
#define ESCAPE_ANY_NP (ESCAPE_ANY | ESCAPE_NP)
#define ESCAPE_HEX 0x20
-int string_escape_mem(const char *src, size_t isz, char **dst, size_t osz,
+size_t string_escape_mem(const char *src, size_t isz, char *dst, size_t osz,
unsigned int flags, const char *esc);
-static inline int string_escape_mem_any_np(const char *src, size_t isz,
- char **dst, size_t osz, const char *esc)
+static inline size_t string_escape_mem_any_np(const char *src, size_t isz,
+ char *dst, size_t osz, const char *esc)
{
return string_escape_mem(src, isz, dst, osz, ESCAPE_ANY_NP, esc);
}
-static inline int string_escape_str(const char *src, char **dst, size_t sz,
+static inline size_t string_escape_str(const char *src, char *dst, size_t sz,
unsigned int flags, const char *esc)
{
return string_escape_mem(src, strlen(src), dst, sz, flags, esc);
}
-static inline int string_escape_str_any_np(const char *src, char **dst,
+static inline size_t string_escape_str_any_np(const char *src, char *dst,
size_t sz, const char *esc)
{
return string_escape_str(src, dst, sz, ESCAPE_ANY_NP, esc);
diff --git a/lib/string_helpers.c b/lib/string_helpers.c
index 58b78ba57439..288bacca74aa 100644
--- a/lib/string_helpers.c
+++ b/lib/string_helpers.c
@@ -243,28 +243,20 @@ int string_unescape(char *src, char *dst, size_t size, unsigned int flags)
}
EXPORT_SYMBOL(string_unescape);
-static int escape_passthrough(unsigned char c, char **dst, size_t *osz)
+static bool escape_passthrough(unsigned char c, char **dst, char *end)
{
char *out = *dst;
- if (*osz < 1)
- return -ENOMEM;
-
- *out++ = c;
-
- *dst = out;
- *osz -= 1;
-
- return 1;
+ if (out < end)
+ *out = c;
+ *dst = out + 1;
+ return true;
}
-static int escape_space(unsigned char c, char **dst, size_t *osz)
+static bool escape_space(unsigned char c, char **dst, char *end)
{
- char *out = *dst;
unsigned char to;
-
- if (*osz < 2)
- return -ENOMEM;
+ char *out = *dst;
switch (c) {
case '\n':
@@ -283,25 +275,22 @@ static int escape_space(unsigned char c, char **dst, size_t *osz)
to = 'f';
break;
default:
- return 0;
+ return false;
}
- *out++ = '\\';
- *out++ = to;
-
- *dst = out;
- *osz -= 2;
+ if (out + 0 < end)
+ out[0] = '\\';
+ if (out + 1 < end)
+ out[1] = to;
- return 1;
+ *dst = out + 2;
+ return true;
}
-static int escape_special(unsigned char c, char **dst, size_t *osz)
+static bool escape_special(unsigned char c, char **dst, char *end)
{
- char *out = *dst;
unsigned char to;
-
- if (*osz < 2)
- return -ENOMEM;
+ char *out = *dst;
switch (c) {
case '\\':
@@ -314,71 +303,66 @@ static int escape_special(unsigned char c, char **dst, size_t *osz)
to = 'e';
break;
default:
- return 0;
+ return false;
}
- *out++ = '\\';
- *out++ = to;
+ if (out + 0 < end)
+ out[0] = '\\';
+ if (out + 1 < end)
+ out[1] = to;
- *dst = out;
- *osz -= 2;
-
- return 1;
+ *dst = out + 2;
+ return true;
}
-static int escape_null(unsigned char c, char **dst, size_t *osz)
+static bool escape_null(unsigned char c, char **dst, char *end)
{
char *out = *dst;
- if (*osz < 2)
- return -ENOMEM;
-
if (c)
- return 0;
-
- *out++ = '\\';
- *out++ = '0';
+ return false;
- *dst = out;
- *osz -= 2;
+ if (out + 0 < end)
+ out[0] = '\\';
+ if (out + 1 < end)
+ out[1] = '0';
- return 1;
+ *dst = out + 2;
+ return true;
}
-static int escape_octal(unsigned char c, char **dst, size_t *osz)
+static bool escape_octal(unsigned char c, char **dst, char *end)
{
char *out = *dst;
- if (*osz < 4)
- return -ENOMEM;
-
- *out++ = '\\';
- *out++ = ((c >> 6) & 0x07) + '0';
- *out++ = ((c >> 3) & 0x07) + '0';
- *out++ = ((c >> 0) & 0x07) + '0';
+ if (out + 0 < end)
+ out[0] = '\\';
+ if (out + 1 < end)
+ out[1] = ((c >> 6) & 0x07) + '0';
+ if (out + 2 < end)
+ out[2] = ((c >> 3) & 0x07) + '0';
+ if (out + 3 < end)
+ out[3] = ((c >> 0) & 0x07) + '0';
- *dst = out;
- *osz -= 4;
-
- return 1;
+ *dst = out + 4;
+ return true;
}
-static int escape_hex(unsigned char c, char **dst, size_t *osz)
+static bool escape_hex(unsigned char c, char **dst, char *end)
{
char *out = *dst;
- if (*osz < 4)
- return -ENOMEM;
+ if (out + 0 < end)
+ out[0] = '\\';
+ if (out + 1 < end)
+ out[1] = 'x';
+ if (out + 2 < end)
+ out[2] = hex_asc_hi(c);
+ if (out + 3 < end)
+ out[3] = hex_asc_lo(c);
- *out++ = '\\';
- *out++ = 'x';
- *out++ = hex_asc_hi(c);
- *out++ = hex_asc_lo(c);
-
- *dst = out;
- *osz -= 4;
-
- return 1;
+ *dst = out + 4;
+ return true;
}
/**
@@ -430,19 +414,17 @@ static int escape_hex(unsigned char c, char **dst, size_t *osz)
* it if needs.
*
* Return:
- * The amount of the characters processed to the destination buffer, or
- * %-ENOMEM if the size of buffer is not enough to put an escaped character is
- * returned.
- *
- * Even in the case of error @dst pointer will be updated to point to the byte
- * after the last processed character.
+ * The total size of the escaped output that would be generated for
+ * the given input and flags. To check whether the output was
+ * truncated, compare the return value to osz. There is room left in
+ * dst for a '\0' terminator if and only if ret < osz.
*/
-int string_escape_mem(const char *src, size_t isz, char **dst, size_t osz,
- unsigned int flags, const char *esc)
+size_t string_escape_mem(const char *src, size_t isz, char *dst, size_t osz,
+ unsigned int flags, const char *esc)
{
- char *out = *dst, *p = out;
+ char *p = dst;
+ char *end = dst + osz;
bool is_dict = esc && *esc;
- int ret = 0;
while (isz--) {
unsigned char c = *src++;
@@ -462,55 +444,26 @@ int string_escape_mem(const char *src, size_t isz, char **dst, size_t osz,
(is_dict && !strchr(esc, c))) {
/* do nothing */
} else {
- if (flags & ESCAPE_SPACE) {
- ret = escape_space(c, &p, &osz);
- if (ret < 0)
- break;
- if (ret > 0)
- continue;
- }
-
- if (flags & ESCAPE_SPECIAL) {
- ret = escape_special(c, &p, &osz);
- if (ret < 0)
- break;
- if (ret > 0)
- continue;
- }
-
- if (flags & ESCAPE_NULL) {
- ret = escape_null(c, &p, &osz);
- if (ret < 0)
- break;
- if (ret > 0)
- continue;
- }
+ if (flags & ESCAPE_SPACE && escape_space(c, &p, end))
+ continue;
+
+ if (flags & ESCAPE_SPECIAL && escape_special(c, &p, end))
+ continue;
+
+ if (flags & ESCAPE_NULL && escape_null(c, &p, end))
+ continue;
/* ESCAPE_OCTAL and ESCAPE_HEX always go last */
- if (flags & ESCAPE_OCTAL) {
- ret = escape_octal(c, &p, &osz);
- if (ret < 0)
- break;
+ if (flags & ESCAPE_OCTAL && escape_octal(c, &p, end))
continue;
- }
- if (flags & ESCAPE_HEX) {
- ret = escape_hex(c, &p, &osz);
- if (ret < 0)
- break;
+
+ if (flags & ESCAPE_HEX && escape_hex(c, &p, end))
continue;
- }
}
- ret = escape_passthrough(c, &p, &osz);
- if (ret < 0)
- break;
+ escape_passthrough(c, &p, end);
}
- *dst = p;
-
- if (ret < 0)
- return ret;
-
- return p - out;
+ return p - dst;
}
EXPORT_SYMBOL(string_escape_mem);
diff --git a/lib/test-string_helpers.c b/lib/test-string_helpers.c
index ab0d30e1e18f..5f95114a2f86 100644
--- a/lib/test-string_helpers.c
+++ b/lib/test-string_helpers.c
@@ -264,12 +264,12 @@ static __init void test_string_escape(const char *name,
const struct test_string_2 *s2,
unsigned int flags, const char *esc)
{
- int q_real = 512;
- char *out_test = kmalloc(q_real, GFP_KERNEL);
- char *out_real = kmalloc(q_real, GFP_KERNEL);
+ size_t out_size = 512;
+ char *out_test = kmalloc(out_size, GFP_KERNEL);
+ char *out_real = kmalloc(out_size, GFP_KERNEL);
char *in = kmalloc(256, GFP_KERNEL);
- char *buf = out_real;
- int p = 0, q_test = 0;
+ size_t p = 0, q_test = 0;
+ size_t q_real;
if (!out_test || !out_real || !in)
goto out;
@@ -301,29 +301,26 @@ static __init void test_string_escape(const char *name,
q_test += len;
}
- q_real = string_escape_mem(in, p, &buf, q_real, flags, esc);
+ q_real = string_escape_mem(in, p, out_real, out_size, flags, esc);
test_string_check_buf(name, flags, in, p, out_real, q_real, out_test,
q_test);
+
+ memset(out_real, 'Z', out_size);
+ q_real = string_escape_mem(in, p, out_real, 0, flags, esc);
+ if (q_real != q_test)
+ pr_warn("Test '%s' failed: flags = %u, osz = 0, expected %zu, got %zu\n",
+ name, flags, q_test, q_real);
+ if (memchr_inv(out_real, 'Z', out_size))
+ pr_warn("Test '%s' failed: osz = 0 but string_escape_mem wrote to the buffer\n",
+ name);
+
out:
kfree(in);
kfree(out_real);
kfree(out_test);
}
-static __init void test_string_escape_nomem(void)
-{
- char *in = "\eb \\C\007\"\x90\r]";
- char out[64], *buf = out;
- int rc = -ENOMEM, ret;
-
- ret = string_escape_str_any_np(in, &buf, strlen(in), NULL);
- if (ret == rc)
- return;
-
- pr_err("Test 'escape nomem' failed: got %d instead of %d\n", ret, rc);
-}
-
static int __init test_string_helpers_init(void)
{
unsigned int i;
@@ -342,8 +339,6 @@ static int __init test_string_helpers_init(void)
for (i = 0; i < (ESCAPE_ANY_NP | ESCAPE_HEX) + 1; i++)
test_string_escape("escape 1", escape1, i, TEST_STRING_2_DICT_1);
- test_string_escape_nomem();
-
return -EINVAL;
}
module_init(test_string_helpers_init);
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 0d57be58448f..a3e474f9957f 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1165,7 +1165,7 @@ char *escaped_string(char *buf, char *end, u8 *addr, struct printf_spec spec,
len = spec.field_width < 0 ? 1 : spec.field_width;
/* Ignore the error. We print as many characters as we can */
- string_escape_mem(addr, len, &buf, end - buf, flags, NULL);
+ buf += string_escape_mem(addr, len, buf, buf < end ? end - buf : 0, flags, NULL);
return buf;
}
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 33fb105d4352..22c4418057f4 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -1068,12 +1068,14 @@ void qword_add(char **bpp, int *lp, char *str)
{
char *bp = *bpp;
int len = *lp;
- int ret;
+ int ret, written;
if (len < 0) return;
- ret = string_escape_str(str, &bp, len, ESCAPE_OCTAL, "\\ \n\t");
- if (ret < 0 || ret == len)
+ ret = string_escape_str(str, bp, len, ESCAPE_OCTAL, "\\ \n\t");
+ written = min(ret, len);
+ bp += written;
+ if (ret >= len)
len = -1;
else {
len -= ret;
--
2.1.3
^ permalink raw reply related
* Re: A problem about ICMP packet-too-big message handler
From: Yang Yingliang @ 2015-01-28 10:07 UTC (permalink / raw)
To: Hannes Frederic Sowa; +Cc: netdev, David S. Miller
In-Reply-To: <1422434574.4678.21.camel@redhat.com>
On 2015/1/28 16:42, Hannes Frederic Sowa wrote:
> On Di, 2015-01-27 at 20:58 +0800, Yang Yingliang wrote:
>> Hi,
>>
>> My kernel is 3.10 LTS.
>>
>> I got a problem here about handling ICMP packet-too-big message.
>>
>> Before sending a packet-too-big packet :
>>
>> # ip -6 route list table local
>> local ::1 dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80::1 dev lo metric 0 //It does not have expire value
>
> Did you just add a local route or do you also have a corresponding IPv6
> address bound to loopback?
I just set a IPv6 linklocal address and the route was added automatic.
I do not add any other route by hand.
Regards,
Yang
^ permalink raw reply
* [PATCH v2 iproute2-next 3/4] iplink: add support of IFLA_LINK_NETNSID attribute
From: Nicolas Dichtel @ 2015-01-28 14:15 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
In-Reply-To: <1422454550-32222-1-git-send-email-nicolas.dichtel@6wind.com>
This new attribute is now advertised by the kernel for x-netns interfaces.
It's also possible to set it when an interface is created (and thus creating a
x-netns interface with one single message).
Example:
$ ip netns add foo
$ ip netns add bar
$ ip -n foo netns set bar 15
$ ip -n foo link add ipip1 link-netnsid 15 type ipip remote 10.16.0.121 local 10.16.0.249
$ ip -n foo link ls ipip1
3: ipip1@NONE: <POINTOPOINT,NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default
link/ipip 10.16.0.249 peer 10.16.0.121 link-netnsid 15
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
v2: don't try to convert IFLA_LINK to the devname when IFLA_LINK_NETNSID is set
ip/ipaddress.c | 20 +++++++++++++++++---
ip/iplink.c | 10 ++++++++++
2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index d5e863dd1f12..8bc28b8a12c8 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -28,6 +28,7 @@
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/sockios.h>
+#include <linux/net_namespace.h>
#include "rt_names.h"
#include "utils.h"
@@ -614,9 +615,13 @@ int print_linkinfo(const struct sockaddr_nl *who,
if (iflink == 0)
fprintf(fp, "@NONE: ");
else {
- fprintf(fp, "@%s: ", ll_idx_n2a(iflink, b1));
- m_flag = ll_index_to_flags(iflink);
- m_flag = !(m_flag & IFF_UP);
+ if (tb[IFLA_LINK_NETNSID])
+ fprintf(fp, "@if%d: ", iflink);
+ else {
+ fprintf(fp, "@%s: ", ll_idx_n2a(iflink, b1));
+ m_flag = ll_index_to_flags(iflink);
+ m_flag = !(m_flag & IFF_UP);
+ }
}
} else {
fprintf(fp, ": ");
@@ -678,6 +683,15 @@ int print_linkinfo(const struct sockaddr_nl *who,
}
}
+ if (tb[IFLA_LINK_NETNSID]) {
+ int id = *(int*)RTA_DATA(tb[IFLA_LINK_NETNSID]);
+
+ if (id >= 0)
+ fprintf(fp, " link-netnsid %d", id);
+ else
+ fprintf(fp, " link-netnsid unknown");
+ }
+
if (tb[IFLA_PROMISCUITY] && show_details)
fprintf(fp, " promiscuity %u ",
*(int*)RTA_DATA(tb[IFLA_PROMISCUITY]));
diff --git a/ip/iplink.c b/ip/iplink.c
index c93d1dc3d5f6..5893ee401cf9 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -72,6 +72,7 @@ void iplink_usage(void)
fprintf(stderr, " [ mtu MTU ]\n");
fprintf(stderr, " [ netns PID ]\n");
fprintf(stderr, " [ netns NAME ]\n");
+ fprintf(stderr, " [ link-netnsid ID ]\n");
fprintf(stderr, " [ alias NAME ]\n");
fprintf(stderr, " [ vf NUM [ mac LLADDR ]\n");
fprintf(stderr, " [ vlan VLANID [ qos VLAN-QOS ] ]\n");
@@ -386,6 +387,7 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
int numtxqueues = -1;
int numrxqueues = -1;
int dev_index = 0;
+ int link_netnsid = -1;
*group = -1;
ret = argc;
@@ -588,6 +590,14 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
addattr8(&req->n, sizeof(*req), IFLA_INET6_ADDR_GEN_MODE, mode);
addattr_nest_end(&req->n, afs6);
addattr_nest_end(&req->n, afs);
+ } else if (matches(*argv, "link-netnsid") == 0) {
+ NEXT_ARG();
+ if (link_netnsid != -1)
+ duparg("link-netnsid", *argv);
+ if (get_integer(&link_netnsid, *argv, 0))
+ invarg("Invalid \"link-netnsid\" value\n", *argv);
+ addattr32(&req->n, sizeof(*req), IFLA_LINK_NETNSID,
+ link_netnsid);
} else {
if (strcmp(*argv, "dev") == 0) {
NEXT_ARG();
--
2.2.2
^ permalink raw reply related
* [PATCH v2 iproute2-next 1/4] include: update headers
From: Nicolas Dichtel @ 2015-01-28 14:15 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
In-Reply-To: <54C8E3EB.8050904@6wind.com>
Copy from sanitized headers.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
v2: took last headers from net-next
include/linux/if_link.h | 4 ++++
include/linux/neighbour.h | 1 +
include/linux/net_namespace.h | 23 +++++++++++++++++++++++
include/linux/rtnetlink.h | 5 +++++
4 files changed, 33 insertions(+)
create mode 100644 include/linux/net_namespace.h
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 167ec34bab73..ac64724c9425 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -146,6 +146,7 @@ enum {
IFLA_PHYS_PORT_ID,
IFLA_CARRIER_CHANGES,
IFLA_PHYS_SWITCH_ID,
+ IFLA_LINK_NETNSID,
__IFLA_MAX
};
@@ -368,6 +369,9 @@ enum {
IFLA_VXLAN_UDP_CSUM,
IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
+ IFLA_VXLAN_REMCSUM_TX,
+ IFLA_VXLAN_REMCSUM_RX,
+ IFLA_VXLAN_GBP,
__IFLA_VXLAN_MAX
};
#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
diff --git a/include/linux/neighbour.h b/include/linux/neighbour.h
index f3d77f9f1e0b..3873a35509aa 100644
--- a/include/linux/neighbour.h
+++ b/include/linux/neighbour.h
@@ -25,6 +25,7 @@ enum {
NDA_VNI,
NDA_IFINDEX,
NDA_MASTER,
+ NDA_LINK_NETNSID,
__NDA_MAX
};
diff --git a/include/linux/net_namespace.h b/include/linux/net_namespace.h
new file mode 100644
index 000000000000..9a92b7e14a19
--- /dev/null
+++ b/include/linux/net_namespace.h
@@ -0,0 +1,23 @@
+/* Copyright (c) 2015 6WIND S.A.
+ * Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ */
+#ifndef _LINUX_NET_NAMESPACE_H_
+#define _LINUX_NET_NAMESPACE_H_
+
+/* Attributes of RTM_NEWNSID/RTM_GETNSID messages */
+enum {
+ NETNSA_NONE,
+#define NETNSA_NSID_NOT_ASSIGNED -1
+ NETNSA_NSID,
+ NETNSA_PID,
+ NETNSA_FD,
+ __NETNSA_MAX,
+};
+
+#define NETNSA_MAX (__NETNSA_MAX - 1)
+
+#endif /* _LINUX_NET_NAMESPACE_H_ */
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 9111053f2250..3eb78105399b 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -132,6 +132,11 @@ enum {
RTM_GETMDB = 86,
#define RTM_GETMDB RTM_GETMDB
+ RTM_NEWNSID = 88,
+#define RTM_NEWNSID RTM_NEWNSID
+ RTM_GETNSID = 90,
+#define RTM_GETNSID RTM_GETNSID
+
__RTM_MAX,
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
};
--
2.2.2
^ permalink raw reply related
* [PATCH v2 iproute2-next 2/4] ipnetns: allow to get and set netns ids
From: Nicolas Dichtel @ 2015-01-28 14:15 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
In-Reply-To: <1422454550-32222-1-git-send-email-nicolas.dichtel@6wind.com>
The kernel now provides ids for peer netns. This patch implements a new command
'set' to assign an id.
When netns are listed, if an id is assigned, it is now displayed.
Example:
$ ip netns add foo
$ ip netns set foo 1
$ ip netns
foo (id: 1)
init_net
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
v2: no change
include/libnetlink.h | 8 ++++
ip/ipnetns.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++-
man/man8/ip-netns.8 | 14 +++++++
3 files changed, 134 insertions(+), 1 deletion(-)
diff --git a/include/libnetlink.h b/include/libnetlink.h
index d081e54210ea..898275b824d4 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -158,6 +158,14 @@ extern int rtnl_from_file(FILE *, rtnl_filter_t handler,
#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
#endif
+#ifndef NETNS_RTA
+#define NETNS_RTA(r) \
+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtgenmsg))))
+#endif
+#ifndef NETNS_PAYLOAD
+#define NETNS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtgenmsg))
+#endif
+
/* User defined nlmsg_type which is used mostly for logging netlink
* messages from dump file */
#define NLMSG_TSTAMP 15
diff --git a/ip/ipnetns.c b/ip/ipnetns.c
index 123318eb6adf..8c86673db581 100644
--- a/ip/ipnetns.c
+++ b/ip/ipnetns.c
@@ -15,6 +15,8 @@
#include <unistd.h>
#include <ctype.h>
+#include <linux/net_namespace.h>
+
#include "utils.h"
#include "ip_common.h"
#include "namespace.h"
@@ -23,6 +25,7 @@ static int usage(void)
{
fprintf(stderr, "Usage: ip netns list\n");
fprintf(stderr, " ip netns add NAME\n");
+ fprintf(stderr, " ip netns set NAME NETNSID\n");
fprintf(stderr, " ip netns delete NAME\n");
fprintf(stderr, " ip netns identify [PID]\n");
fprintf(stderr, " ip netns pids NAME\n");
@@ -31,10 +34,56 @@ static int usage(void)
exit(-1);
}
+static int get_netnsid_from_name(const char *name)
+{
+ struct {
+ struct nlmsghdr n;
+ struct rtgenmsg g;
+ char buf[1024];
+ } req, answer;
+ struct rtattr *tb[NETNSA_MAX + 1];
+ struct rtgenmsg *rthdr;
+ int len, fd;
+
+ memset(&req, 0, sizeof(req));
+ req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg));
+ req.n.nlmsg_flags = NLM_F_REQUEST;
+ req.n.nlmsg_type = RTM_GETNSID;
+ req.g.rtgen_family = AF_UNSPEC;
+
+ fd = netns_get_fd(name);
+ if (fd < 0)
+ return fd;
+
+ addattr32(&req.n, 1024, NETNSA_FD, fd);
+ if (rtnl_talk(&rth, &req.n, 0, 0, &answer.n) < 0) {
+ close(fd);
+ return -2;
+ }
+ close(fd);
+
+ /* Validate message and parse attributes */
+ if (answer.n.nlmsg_type == NLMSG_ERROR)
+ return -1;
+
+ rthdr = NLMSG_DATA(&answer.n);
+ len = answer.n.nlmsg_len - NLMSG_SPACE(sizeof(*rthdr));
+ if (len < 0)
+ return -1;
+
+ parse_rtattr(tb, NETNSA_MAX, NETNS_RTA(rthdr), len);
+
+ if (tb[NETNSA_NSID])
+ return rta_getattr_u32(tb[NETNSA_NSID]);
+
+ return -1;
+}
+
static int netns_list(int argc, char **argv)
{
struct dirent *entry;
DIR *dir;
+ int id;
dir = opendir(NETNS_RUN_DIR);
if (!dir)
@@ -45,7 +94,11 @@ static int netns_list(int argc, char **argv)
continue;
if (strcmp(entry->d_name, "..") == 0)
continue;
- printf("%s\n", entry->d_name);
+ printf("%s", entry->d_name);
+ id = get_netnsid_from_name(entry->d_name);
+ if (id >= 0)
+ printf(" (id: %d)", id);
+ printf("\n");
}
closedir(dir);
return 0;
@@ -355,6 +408,61 @@ out_delete:
return -1;
}
+static int set_netnsid_from_name(const char *name, int nsid)
+{
+ struct {
+ struct nlmsghdr n;
+ struct rtgenmsg g;
+ char buf[1024];
+ } req;
+ int fd, err = 0;
+
+ memset(&req, 0, sizeof(req));
+ req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg));
+ req.n.nlmsg_flags = NLM_F_REQUEST;
+ req.n.nlmsg_type = RTM_NEWNSID;
+ req.g.rtgen_family = AF_UNSPEC;
+
+ fd = netns_get_fd(name);
+ if (fd < 0)
+ return fd;
+
+ addattr32(&req.n, 1024, NETNSA_FD, fd);
+ addattr32(&req.n, 1024, NETNSA_NSID, nsid);
+ if (rtnl_talk(&rth, &req.n, 0, 0, NULL) < 0)
+ err = -2;
+
+ close(fd);
+ return err;
+}
+
+static int netns_set(int argc, char **argv)
+{
+ char netns_path[MAXPATHLEN];
+ const char *name;
+ int netns, nsid;
+
+ if (argc < 1) {
+ fprintf(stderr, "No netns name specified\n");
+ return -1;
+ }
+ if (argc < 2) {
+ fprintf(stderr, "No nsid specified\n");
+ return -1;
+ }
+ name = argv[0];
+ nsid = atoi(argv[1]);
+
+ snprintf(netns_path, sizeof(netns_path), "%s/%s", NETNS_RUN_DIR, name);
+ netns = open(netns_path, O_RDONLY | O_CLOEXEC);
+ if (netns < 0) {
+ fprintf(stderr, "Cannot open network namespace \"%s\": %s\n",
+ name, strerror(errno));
+ return -1;
+ }
+
+ return set_netnsid_from_name(name, nsid);
+}
static int netns_monitor(int argc, char **argv)
{
@@ -410,6 +518,9 @@ int do_netns(int argc, char **argv)
if (matches(*argv, "add") == 0)
return netns_add(argc-1, argv+1);
+ if (matches(*argv, "set") == 0)
+ return netns_set(argc-1, argv+1);
+
if (matches(*argv, "delete") == 0)
return netns_delete(argc-1, argv+1);
diff --git a/man/man8/ip-netns.8 b/man/man8/ip-netns.8
index 74343ed6b640..95fc5e6b8a45 100644
--- a/man/man8/ip-netns.8
+++ b/man/man8/ip-netns.8
@@ -20,6 +20,10 @@ ip-netns \- process network namespace management
.I NETNSNAME
.ti -8
+.BR "ip netns" " { " set " } "
+.I NETNSNAME NETNSID
+
+.ti -8
.BR "ip netns identify"
.RI "[ " PID " ]"
@@ -85,6 +89,16 @@ persists until it has no more users. ip netns delete may fail if
the mount point is in use in another mount namespace.
.TP
+.B ip netns set NAME NETNSID - assign an id to a peer network namespace
+.sp
+This command assigns a id to a peer network namespace. This id is valid
+only in the current network namespace.
+This id will be used by the kernel in some netlink messages. If no id is
+assigned when the kernel needs it, it will be automatically assigned by
+the kernel.
+Once it is assigned, it's not possible to change it.
+
+.TP
.B ip netns identify [PID] - Report network namespaces names for process
.sp
This command walks through /var/run/netns and finds all the network
--
2.2.2
^ permalink raw reply related
* [PATCH v2 iproute2-next 4/4] bridge/fdb: display link netns id
From: Nicolas Dichtel @ 2015-01-28 14:15 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
In-Reply-To: <1422454550-32222-1-git-send-email-nicolas.dichtel@6wind.com>
When this attribute is set, it means that the i/o part of the related netdevice
is in another netns.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
v2: new in the series
bridge/fdb.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/bridge/fdb.c b/bridge/fdb.c
index c01a5020de63..6941edd90f90 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -131,12 +131,16 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
if (ifindex) {
char ifname[IF_NAMESIZE];
- if (if_indextoname(ifindex, ifname))
+ if (!tb[NDA_LINK_NETNSID] &&
+ if_indextoname(ifindex, ifname))
fprintf(fp, "via %s ", ifname);
else
fprintf(fp, "via ifindex %u ", ifindex);
}
}
+ if (tb[NDA_LINK_NETNSID])
+ fprintf(fp, "link-netnsid %d ",
+ rta_getattr_u32(tb[NDA_LINK_NETNSID]));
if (show_stats && tb[NDA_CACHEINFO]) {
struct nda_cacheinfo *ci = RTA_DATA(tb[NDA_CACHEINFO]);
--
2.2.2
^ permalink raw reply related
* [PATCH 1/3] net: cpsw: Add a minimal cpsw-common module for shared code
From: Tony Lindgren @ 2015-01-28 19:33 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-omap, Brian Hutchinson, Felipe Balbi
In-Reply-To: <1422473586-18100-1-git-send-email-tony@atomide.com>
Looks like davinci_emac and cpsw can share some code although the
device registers have a different layout.
At least the code for getting the MAC address using syscon can
be shared by passing the register offset. Let's start with that
and set up a minimal shared cpsw-shared.c.
Cc: Brian Hutchinson <b.hutchman@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/net/ethernet/ti/Makefile | 3 ++
drivers/net/ethernet/ti/cpsw-common.c | 53 +++++++++++++++++++++++++++++++++++
drivers/net/ethernet/ti/cpsw.c | 35 ++---------------------
drivers/net/ethernet/ti/cpsw.h | 2 ++
4 files changed, 60 insertions(+), 33 deletions(-)
create mode 100644 drivers/net/ethernet/ti/cpsw-common.c
diff --git a/drivers/net/ethernet/ti/Makefile b/drivers/net/ethernet/ti/Makefile
index 465d03d..7fa47f6 100644
--- a/drivers/net/ethernet/ti/Makefile
+++ b/drivers/net/ethernet/ti/Makefile
@@ -2,6 +2,9 @@
# Makefile for the TI network device drivers.
#
+obj-$(CONFIG_TI_CPSW) += cpsw-common.o
+obj-$(CONFIG_TI_DAVINCI_EMAC) += cpsw-common.o
+
obj-$(CONFIG_TLAN) += tlan.o
obj-$(CONFIG_CPMAC) += cpmac.o
obj-$(CONFIG_TI_DAVINCI_EMAC) += davinci_emac.o
diff --git a/drivers/net/ethernet/ti/cpsw-common.c b/drivers/net/ethernet/ti/cpsw-common.c
new file mode 100644
index 0000000..763ada1
--- /dev/null
+++ b/drivers/net/ethernet/ti/cpsw-common.c
@@ -0,0 +1,53 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/regmap.h>
+#include <linux/mfd/syscon.h>
+
+#define AM33XX_CTRL_MAC_LO_REG(offset, id) ((offset) + 0x8 * (id))
+#define AM33XX_CTRL_MAC_HI_REG(offset, id) ((offset) + 0x8 * (id) + 0x4)
+
+int cpsw_am33xx_cm_get_macid(struct device *dev, u16 offset, int slave,
+ u8 *mac_addr)
+{
+ u32 macid_lo;
+ u32 macid_hi;
+ struct regmap *syscon;
+
+ syscon = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon");
+ if (IS_ERR(syscon)) {
+ if (PTR_ERR(syscon) == -ENODEV)
+ return 0;
+ return PTR_ERR(syscon);
+ }
+
+ regmap_read(syscon, AM33XX_CTRL_MAC_LO_REG(offset, slave),
+ &macid_lo);
+ regmap_read(syscon, AM33XX_CTRL_MAC_HI_REG(offset, slave),
+ &macid_hi);
+
+ mac_addr[5] = (macid_lo >> 8) & 0xff;
+ mac_addr[4] = macid_lo & 0xff;
+ mac_addr[3] = (macid_hi >> 24) & 0xff;
+ mac_addr[2] = (macid_hi >> 16) & 0xff;
+ mac_addr[1] = (macid_hi >> 8) & 0xff;
+ mac_addr[0] = macid_hi & 0xff;
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(cpsw_am33xx_cm_get_macid);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 2b9d404..7d8dd0d 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -33,8 +33,6 @@
#include <linux/of_net.h>
#include <linux/of_device.h>
#include <linux/if_vlan.h>
-#include <linux/mfd/syscon.h>
-#include <linux/regmap.h>
#include <linux/pinctrl/consumer.h>
@@ -1936,36 +1934,6 @@ static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv,
slave->port_vlan = data->dual_emac_res_vlan;
}
-#define AM33XX_CTRL_MAC_LO_REG(id) (0x630 + 0x8 * id)
-#define AM33XX_CTRL_MAC_HI_REG(id) (0x630 + 0x8 * id + 0x4)
-
-static int cpsw_am33xx_cm_get_macid(struct device *dev, int slave,
- u8 *mac_addr)
-{
- u32 macid_lo;
- u32 macid_hi;
- struct regmap *syscon;
-
- syscon = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon");
- if (IS_ERR(syscon)) {
- if (PTR_ERR(syscon) == -ENODEV)
- return 0;
- return PTR_ERR(syscon);
- }
-
- regmap_read(syscon, AM33XX_CTRL_MAC_LO_REG(slave), &macid_lo);
- regmap_read(syscon, AM33XX_CTRL_MAC_HI_REG(slave), &macid_hi);
-
- mac_addr[5] = (macid_lo >> 8) & 0xff;
- mac_addr[4] = macid_lo & 0xff;
- mac_addr[3] = (macid_hi >> 24) & 0xff;
- mac_addr[2] = (macid_hi >> 16) & 0xff;
- mac_addr[1] = (macid_hi >> 8) & 0xff;
- mac_addr[0] = macid_hi & 0xff;
-
- return 0;
-}
-
static int cpsw_probe_dt(struct cpsw_platform_data *data,
struct platform_device *pdev)
{
@@ -2090,7 +2058,8 @@ no_phy_slave:
memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN);
} else {
if (of_machine_is_compatible("ti,am33xx")) {
- ret = cpsw_am33xx_cm_get_macid(&pdev->dev, i,
+ ret = cpsw_am33xx_cm_get_macid(&pdev->dev,
+ 0x630, i,
slave_data->mac_addr);
if (ret)
return ret;
diff --git a/drivers/net/ethernet/ti/cpsw.h b/drivers/net/ethernet/ti/cpsw.h
index 1b71067..ca90efa 100644
--- a/drivers/net/ethernet/ti/cpsw.h
+++ b/drivers/net/ethernet/ti/cpsw.h
@@ -41,5 +41,7 @@ struct cpsw_platform_data {
};
void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave);
+int cpsw_am33xx_cm_get_macid(struct device *dev, u16 offset, int slave,
+ u8 *mac_addr);
#endif /* __CPSW_H__ */
--
2.1.4
^ permalink raw reply related
* [PATCH 0/3] Changes to cpsw and davinci_emac for getting MAC address
From: Tony Lindgren @ 2015-01-28 19:33 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-omap
Hi all,
Here are a few patches to add common code for cpsw and davinci_emac for
getting the MAC address. Looks like we can also now add code to get the
MAC address on 3517 but in a slightly different way.
Regards,
Tony
Tony Lindgren (3):
net: cpsw: Add a minimal cpsw-common module for shared code
net: davinci_emac: Get device dm816x MAC address using the cpsw code
net: davinci_emac: Get device MAC on 3517
arch/arm/boot/dts/am3517.dtsi | 1 +
drivers/net/ethernet/ti/Makefile | 3 ++
drivers/net/ethernet/ti/cpsw-common.c | 53 ++++++++++++++++++++++++++++++++
drivers/net/ethernet/ti/cpsw.c | 35 ++-------------------
drivers/net/ethernet/ti/cpsw.h | 2 ++
drivers/net/ethernet/ti/davinci_emac.c | 56 +++++++++++++++++++++++++++++++++-
6 files changed, 116 insertions(+), 34 deletions(-)
create mode 100644 drivers/net/ethernet/ti/cpsw-common.c
--
2.1.4
^ permalink raw reply
* Re: [PATCH 1/2] rhashtable: Introduce rhashtable_walk_*
From: Patrick McHardy @ 2015-01-28 19:07 UTC (permalink / raw)
To: Herbert Xu
Cc: Thomas Graf, David Miller, David.Laight, ying.xue, paulmck,
netdev, netfilter-devel
In-Reply-To: <20150127203657.GA9061@gondor.apana.org.au>
On 28.01, Herbert Xu wrote:
> On Tue, Jan 27, 2015 at 01:09:50PM +0000, Patrick McHardy wrote:
> >
> > Actually I have a patchset queued that adds runtime additions and
> > removals, both active and timeout based. So netfilter won't have
> > pure synchronous behaviour anymore.
>
> Can you show us the patchset?
Sure, will send it over tomorrow.
^ permalink raw reply
* [patch net-next] hisilicon: add some missing curly braces
From: Dan Carpenter @ 2015-01-28 18:58 UTC (permalink / raw)
To: dingtianhong
Cc: Zhangfei Gao, David S. Miller, Arnd Bergmann, netdev,
kernel-janitors
The if block was supposed to have curly braces. In the current code we
complain about dropped rx packets when we shouldn't.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
index 525214e..c02b81b 100644
--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
+++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
@@ -567,10 +567,11 @@ static irqreturn_t hip04_mac_interrupt(int irq, void *dev_id)
writel_relaxed(DEF_INT_MASK, priv->base + PPE_RINT);
if (unlikely(ists & DEF_INT_ERR)) {
- if (ists & (RCV_NOBUF | RCV_DROP))
+ if (ists & (RCV_NOBUF | RCV_DROP)) {
stats->rx_errors++;
stats->rx_dropped++;
netdev_err(ndev, "rx drop\n");
+ }
if (ists & TX_DROP) {
stats->tx_dropped++;
netdev_err(ndev, "tx drop\n");
^ permalink raw reply related
* [tip:irq/core PATCH] genirq: fix null pointer reference in irq_set_affinity_hint()
From: Jesse Brandeburg @ 2015-01-28 18:57 UTC (permalink / raw)
To: tglx; +Cc: mingo, netdev, yinghai, linux-kernel, hpa
The recent set_affinity commit by me introduced some null
pointer dereferences on driver unload, because some drivers
call this function with a NULL argument. This fixes the issue
by just checking for null before setting the affinity mask.
Fixes: e2e64a932556 ("genirq: Set initial affinity in irq_set_affinity_hint()")
Reported-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: netdev@vger.kernel.org
---
kernel/irq/manage.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index f038e58..196a06f 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -244,7 +244,8 @@ int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
desc->affinity_hint = m;
irq_put_desc_unlock(desc, flags);
/* set the initial affinity to prevent every interrupt being on CPU0 */
- __irq_set_affinity(irq, m, false);
+ if (m)
+ __irq_set_affinity(irq, m, false);
return 0;
}
EXPORT_SYMBOL_GPL(irq_set_affinity_hint);
^ permalink raw reply related
* Re: [PATCH net-next v8 0/4] net: Add Keystone NetCP ethernet driver support
From: Murali Karicheri @ 2015-01-28 18:20 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: David Miller, devicetree, linux-kernel, netdev
In-Reply-To: <54C91FDD.1000009@ti.com>
On 01/28/2015 12:43 PM, Murali Karicheri wrote:
> On 01/28/2015 11:49 AM, Murali Karicheri wrote:
>> On 01/27/2015 05:28 PM, Arnd Bergmann wrote:
>>> On Tuesday 20 January 2015 10:53:36 Murali Karicheri wrote:
>>>> On 01/19/2015 03:11 PM, David Miller wrote:
>>>>> From: Murali Karicheri<m-karicheri2@ti.com>
>>>>> Date: Thu, 15 Jan 2015 19:10:03 -0500
>>>>>
>>>>>> The Network Coprocessor (NetCP) is a hardware accelerator that
>>>>>> processes
>>>>>> Ethernet packets. NetCP has a gigabit Ethernet (GbE) subsystem with
>>>>>> a ethernet
>>>>>> switch sub-module to send and receive packets. NetCP also includes
>>>>>> a packet
>>>>>> accelerator (PA) module to perform packet classification operations
>>>>>> such as
>>>>>> header matching, and packet modification operations such as checksum
>>>>>> generation. NetCP can also optionally include a Security
>>>>>> Accelerator(SA)
>>>>>> capable of performing IPSec operations on ingress/egress packets.
>>>>>>
>>>>>> Keystone SoC's also have a 10 Gigabit Ethernet Subsystem (XGbE) which
>>>>>> includes a 3-port Ethernet switch sub-module capable of 10Gb/s and
>>>>>> 1Gb/s rates per Ethernet port.
>>>>>>
>>>>>> Both GBE and XGBE network processors supported using common
>>>>>> driver. It
>>>>>> is also designed to handle future variants of NetCP.
>>>>>
>>>>> Series applied to net-next, thanks.
>>>> David,
>>>>
>>>> Thanks a lot for applying this series. This helps us move forward to
>>>> work on the next set of patches.
>>>
>>> Hi Murali,
>>>
>>> Building an ARM 'allmodconfig' kernel now runs into two separate
>>> problems
>>> from your driver:
>>>
>>> - you have two module_init() instances in one module, which conflict.
>>>
>>> - you have two files that are linked into more than one module, so
>>> building
>>> both TI_CPSW and TI_KEYSTONE_NETCP in the same kernel fails.
>>>
>>> The answer to both of these is probably to have separate loadable
>>> modules,
>>> but you might be able to come up with a different solution.
>> Arnd,
>>
>> Thanks for letting us know. We will look into this.
>>
>> How do I reproduce this? Is there a defconfig used for allmodconfig? I
>> am unable to find one. Any details to reproduce this will be useful.
>>
> Ok I think I found it.
>
> I did this with next-next branch and it seems to work. I will make
> kernel build to reproduce this.
>
> make ARCH=arm allmodconfig
> make uImage;
>
> I am building it now.
Arnd,
I see allmodconfig configure NetCP driver as module. My uImage build
from net-next branch went through fine. I am building modules right now
and should show error as you have pointed out. Let me know if you any
issues on how I am working to reproduce the issue (wrong branch, wrong
/incomplete commands etc. I have my CROSS_COMPILE and ARCH set in my
env). Want to reproduce this so as to make sure my fix is addressing
this. Hope I am on the right track.
Thanks
Murali
>
> Murali
>> Thanks.
>>
>> Murali
>>>
>>> Arnd
>>
>>
>
>
--
Murali Karicheri
Linux Kernel, Texas Instruments
^ permalink raw reply
* Re: [PATCH net-next v8 0/4] net: Add Keystone NetCP ethernet driver support
From: Murali Karicheri @ 2015-01-28 17:43 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: David Miller, devicetree, linux-kernel, netdev
In-Reply-To: <54C91328.6030208@ti.com>
On 01/28/2015 11:49 AM, Murali Karicheri wrote:
> On 01/27/2015 05:28 PM, Arnd Bergmann wrote:
>> On Tuesday 20 January 2015 10:53:36 Murali Karicheri wrote:
>>> On 01/19/2015 03:11 PM, David Miller wrote:
>>>> From: Murali Karicheri<m-karicheri2@ti.com>
>>>> Date: Thu, 15 Jan 2015 19:10:03 -0500
>>>>
>>>>> The Network Coprocessor (NetCP) is a hardware accelerator that
>>>>> processes
>>>>> Ethernet packets. NetCP has a gigabit Ethernet (GbE) subsystem with
>>>>> a ethernet
>>>>> switch sub-module to send and receive packets. NetCP also includes
>>>>> a packet
>>>>> accelerator (PA) module to perform packet classification operations
>>>>> such as
>>>>> header matching, and packet modification operations such as checksum
>>>>> generation. NetCP can also optionally include a Security
>>>>> Accelerator(SA)
>>>>> capable of performing IPSec operations on ingress/egress packets.
>>>>>
>>>>> Keystone SoC's also have a 10 Gigabit Ethernet Subsystem (XGbE) which
>>>>> includes a 3-port Ethernet switch sub-module capable of 10Gb/s and
>>>>> 1Gb/s rates per Ethernet port.
>>>>>
>>>>> Both GBE and XGBE network processors supported using common driver. It
>>>>> is also designed to handle future variants of NetCP.
>>>>
>>>> Series applied to net-next, thanks.
>>> David,
>>>
>>> Thanks a lot for applying this series. This helps us move forward to
>>> work on the next set of patches.
>>
>> Hi Murali,
>>
>> Building an ARM 'allmodconfig' kernel now runs into two separate problems
>> from your driver:
>>
>> - you have two module_init() instances in one module, which conflict.
>>
>> - you have two files that are linked into more than one module, so
>> building
>> both TI_CPSW and TI_KEYSTONE_NETCP in the same kernel fails.
>>
>> The answer to both of these is probably to have separate loadable
>> modules,
>> but you might be able to come up with a different solution.
> Arnd,
>
> Thanks for letting us know. We will look into this.
>
> How do I reproduce this? Is there a defconfig used for allmodconfig? I
> am unable to find one. Any details to reproduce this will be useful.
>
Ok I think I found it.
I did this with next-next branch and it seems to work. I will make
kernel build to reproduce this.
make ARCH=arm allmodconfig
make uImage;
I am building it now.
Murali
> Thanks.
>
> Murali
>>
>> Arnd
>
>
--
Murali Karicheri
Linux Kernel, Texas Instruments
^ permalink raw reply
* Re: make allyesconfig i386 build failure with next-20150122 (caused by fb_agm1264k-fl driver)
From: Greg Kroah-Hartman @ 2015-01-28 17:36 UTC (permalink / raw)
To: Guenter Roeck
Cc: devel, Stephen Rothwell, isdn, netdev, linux-kernel, linux-next,
Jim Davis
In-Reply-To: <20150126215959.GA9853@roeck-us.net>
On Mon, Jan 26, 2015 at 01:59:59PM -0800, Guenter Roeck wrote:
> On Thu, Jan 22, 2015 at 12:10:33PM -0700, Jim Davis wrote:
> > make ARCH=i386 allyesconfig fails with
> >
> > drivers/staging/built-in.o: In function `reset':
> > (.text+0x2ae89d): multiple definition of `reset'
> > drivers/isdn/built-in.o:(.text+0x185dc2): first defined here
> > make[1]: *** [drivers/built-in.o] Error 1
>
> Culprit:
>
> commit b2ebd4be6fa1d2329b63531b044f9e25474981cb
> Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Date: Wed Dec 31 10:11:10 2014 +0100
>
> staging: fbtft: add fb_agm1264k-fl driver
>
> A global function named 'reset' isn't really a good idea.
>
> Not that the global function with the same name in the isdn code
> is better ;-).
It's been fixed in my tree for a while now :)
^ permalink raw reply
* Re: [PATCH 1/3] ipv6: Select fragment id during UFO/GSO segmentation if not set.
From: Hannes Frederic Sowa @ 2015-01-28 17:34 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: netdev, Vladislav Yasevich, virtualization, edumazet,
Ben Hutchings
In-Reply-To: <20150128164853.GA2963@redhat.com>
On Mi, 2015-01-28 at 18:48 +0200, Michael S. Tsirkin wrote:
> On Wed, Jan 28, 2015 at 05:15:49PM +0100, Hannes Frederic Sowa wrote:
> > Hi,
> >
> > On Mi, 2015-01-28 at 18:00 +0200, Michael S. Tsirkin wrote:
> > > On Wed, Jan 28, 2015 at 11:34:02AM +0100, Hannes Frederic Sowa wrote:
> > > > Hi,
> > > >
> > > > On Mi, 2015-01-28 at 11:46 +0200, Michael S. Tsirkin wrote:
> > > > > On Wed, Jan 28, 2015 at 09:25:08AM +0100, Hannes Frederic Sowa wrote:
> > > > > > Hello,
> > > > > >
> > > > > > On Di, 2015-01-27 at 18:08 +0200, Michael S. Tsirkin wrote:
> > > > > > > On Tue, Jan 27, 2015 at 05:02:31PM +0100, Hannes Frederic Sowa wrote:
> > > > > > > > On Di, 2015-01-27 at 09:26 -0500, Vlad Yasevich wrote:
> > > > > > > > > On 01/27/2015 08:47 AM, Hannes Frederic Sowa wrote:
> > > > > > > > > > On Di, 2015-01-27 at 10:42 +0200, Michael S. Tsirkin wrote:
> > > > > > > > > >> On Tue, Jan 27, 2015 at 02:47:54AM +0000, Ben Hutchings wrote:
> > > > > > > > > >>> On Mon, 2015-01-26 at 09:37 -0500, Vladislav Yasevich wrote:
> > > > > > > > > >>>> If the IPv6 fragment id has not been set and we perform
> > > > > > > > > >>>> fragmentation due to UFO, select a new fragment id.
> > > > > > > > > >>>> When we store the fragment id into skb_shinfo, set the bit
> > > > > > > > > >>>> in the skb so we can re-use the selected id.
> > > > > > > > > >>>> This preserves the behavior of UFO packets generated on the
> > > > > > > > > >>>> host and solves the issue of id generation for packet sockets
> > > > > > > > > >>>> and tap/macvtap devices.
> > > > > > > > > >>>>
> > > > > > > > > >>>> This patch moves ipv6_select_ident() back in to the header file.
> > > > > > > > > >>>> It also provides the helper function that sets skb_shinfo() frag
> > > > > > > > > >>>> id and sets the bit.
> > > > > > > > > >>>>
> > > > > > > > > >>>> It also makes sure that we select the fragment id when doing
> > > > > > > > > >>>> just gso validation, since it's possible for the packet to
> > > > > > > > > >>>> come from an untrusted source (VM) and be forwarded through
> > > > > > > > > >>>> a UFO enabled device which will expect the fragment id.
> > > > > > > > > >>>>
> > > > > > > > > >>>> CC: Eric Dumazet <edumazet@google.com>
> > > > > > > > > >>>> Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
> > > > > > > > > >>>> ---
> > > > > > > > > >>>> include/linux/skbuff.h | 3 ++-
> > > > > > > > > >>>> include/net/ipv6.h | 2 ++
> > > > > > > > > >>>> net/ipv6/ip6_output.c | 4 ++--
> > > > > > > > > >>>> net/ipv6/output_core.c | 9 ++++++++-
> > > > > > > > > >>>> net/ipv6/udp_offload.c | 10 +++++++++-
> > > > > > > > > >>>> 5 files changed, 23 insertions(+), 5 deletions(-)
> > > > > > > > > >>>>
> > > > > > > > > >>>> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> > > > > > > > > >>>> index 85ab7d7..3ad5203 100644
> > > > > > > > > >>>> --- a/include/linux/skbuff.h
> > > > > > > > > >>>> +++ b/include/linux/skbuff.h
> > > > > > > > > >>>> @@ -605,7 +605,8 @@ struct sk_buff {
> > > > > > > > > >>>> __u8 ipvs_property:1;
> > > > > > > > > >>>> __u8 inner_protocol_type:1;
> > > > > > > > > >>>> __u8 remcsum_offload:1;
> > > > > > > > > >>>> - /* 3 or 5 bit hole */
> > > > > > > > > >>>> + __u8 ufo_fragid_set:1;
> > > > > > > > > >>> [...]
> > > > > > > > > >>>
> > > > > > > > > >>> Doesn't the flag belong in struct skb_shared_info, rather than struct
> > > > > > > > > >>> sk_buff? Otherwise this looks fine.
> > > > > > > > > >>>
> > > > > > > > > >>> Ben.
> > > > > > > > > >>
> > > > > > > > > >> Hmm we seem to be out of tx flags.
> > > > > > > > > >> Maybe ip6_frag_id == 0 should mean "not set".
> > > > > > > > > >
> > > > > > > > > > Maybe that is the best idea. Definitely the ufo_fragid_set bit should
> > > > > > > > > > move into the skb_shared_info area.
> > > > > > > > >
> > > > > > > > > That's what I originally wanted to do, but had to move and grow txflags thus
> > > > > > > > > skb_shinfo ended up growing. I wanted to avoid that, so stole an skb flag.
> > > > > > > > >
> > > > > > > > > I considered treating fragid == 0 as unset, but a 0 fragid is perfectly valid
> > > > > > > > > from the protocol perspective and could actually be generated by the id generator
> > > > > > > > > functions. This may cause us to call the id generation multiple times.
> > > > > > > >
> > > > > > > > Are there plans in the long run to let virtio_net transmit auxiliary
> > > > > > > > data to the other end so we can clean all of this this up one day?
> > > > > > > >
> > > > > > > > I don't like the whole situation: looking into the virtio_net headers
> > > > > > > > just adding a field for ipv6 fragmentation ids to those small structs
> > > > > > > > seems bloated, not doing it feels incorrect. :/
> > > > > > > >
> > > > > > > > Thoughts?
> > > > > > > >
> > > > > > > > Bye,
> > > > > > > > Hannes
> > > > > > >
> > > > > > > I'm not sure - what will be achieved by generating the IDs guest side as
> > > > > > > opposed to host side? It's certainly harder to get hold of entropy
> > > > > > > guest-side.
> > > > > >
> > > > > > It is not only about entropy but about uniqueness. Also fragmentation
> > > > > > ids should not be discoverable,
> > > > >
> > > > > I belive "predictable" is the language used by the IETF draft.
> > > > >
> > > > > > so there are several aspects:
> > > > > >
> > > > > > I see fragmentation id generation still as security critical:
> > > > > > When Eric patched the frag id generator in 04ca6973f7c1a0d ("ip: make IP
> > > > > > identifiers less predictable") I could patch my kernels and use the
> > > > > > patch regardless of the machine being virtualized or not. It was not
> > > > > > dependent on the hypervisor.
> > > > >
> > > > > And now it's even easier - just patch the hypervisor, and all VMs
> > > > > automatically benefit.
> > > >
> > > > Sometimes the hypervisor is not under my control.
> > >
> > > In that case doing things like extending virtio
> > > is out of the question too, isn't it?
> > > It needs hypervisor changes.
> >
> > Sure, but I would like to have the fragmentation id generator to reside
> > inside the end-host kernel. Hypervisor needs to carry the frag id along,
> > sure, and needs to be changed accordingly.
> >
> > So in either case we need to change both kernels. ;)
> >
> > >
> > > > You would need to
> > > > patch both kernels in your case - non gso frames would still get the
> > > > fragmentation id generated in the host kernel.
> > > >
> > > > > > I think that is the same reasoning why we
> > > > > > don't support TOE.
> > > > > > If we use one generator in the hypervisor in an openstack alike setting,
> > > > > > the host deals with quite a lot of overlay networks. A lot of default
> > > > > > configurations use the same addresses internally, so on the hypervisor
> > > > > > the frag id generators would interfere by design.
> > > > > > I could come up with an attack scenario for DNS servers (again :) ):
> > > > > >
> > > > > > You are sitting next to a DNS server on the same hypervisor and can send
> > > > > > packets without source validation (because that is handled later on in
> > > > > > case of openvswitch when the packet is put into the corresponding
> > > > > > overlay network). You emit a gso packet with the same source and
> > > > > > destination addresses as the DNS server would do and would get an
> > > > > > fragmentation id which is linearly (+ time delta) incremented depending
> > > > > > on the source and destination address. With such a leak you could start
> > > > > > trying attack and spoof DNS responses (fragmentation attacks etc.).
> > > > > > See also details on such kind of attacks in the description of commit
> > > > > > 04ca6973f7c1a0d.
> > > > > >
> > > > > > AFAIK IETF tried with IPv6 to push fragmentation id generation to the
> > > > > > end hosts, that's also the reason for the introduction of atomic
> > > > > > fragments (which are now being rolled back ;) ).
> > > > > >
> > > > > > Still it is better to generate a frag id on the hypervisor than just
> > > > > > sending a 0, so I am ok with this change, albeit not happy.
> > > > > >
> > > > > > Thanks,
> > > > > > Hannes
> > > > > >
> > > > >
> > > > > OK so to summarize, identifiers are only re-randomized once per jiffy,
> > > > > so you worry that within this window, an external observer can discover
> > > > > past fragment ID values and so predict the future ones.
> > > > > All that's required is that two paths go through the same box performing
> > > > > fragmentation.
> > > > >
> > > > > Is that a fair summary?
> > >
> > > No answer here?
> >
> > Ups, sorry.
> >
> > It is not re-randomized but only biased by a time delta (note the
> > prandom_u32_max). So even after such an increment happens you can still
> > guess the range of the current fragmentation ids for a longer time.
> >
> > Otherwise it is a fair summary.
> >
> > >
> > > > > If yes, we can make this a bit harder by mixing in some
> > > > > data per input and/or output devices.
> > > > >
> > > > > For example, just to give you the idea:
> > > > >
> > > > > diff --git a/net/core/dev.c b/net/core/dev.c
> > > > > index 683d493..4faa7ef 100644
> > > > > --- a/net/core/dev.c
> > > > > +++ b/net/core/dev.c
> > > > > @@ -3625,6 +3625,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc)
> > > > > trace_netif_receive_skb(skb);
> > > > >
> > > > > orig_dev = skb->dev;
> > > > > + skb_shinfo(skb)->ip6_frag_id = skb->dev->ifindex;
> > > > >
> > > > > skb_reset_network_header(skb);
> > > > > if (!skb_transport_header_was_set(skb))
> > > > > diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> > > > > index ce69a12..819a821 100644
> > > > > --- a/net/ipv6/ip6_output.c
> > > > > +++ b/net/ipv6/ip6_output.c
> > > > > @@ -1092,7 +1092,8 @@ static inline int ip6_ufo_append_data(struct sock *sk,
> > > > > sizeof(struct frag_hdr)) & ~7;
> > > > > skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
> > > > > ipv6_select_ident(&fhdr, rt);
> > > > > - skb_shinfo(skb)->ip6_frag_id = fhdr.identification;
> > > > > + skb_shinfo(skb)->ip6_frag_id = jhash_1word(skb_shinfo(skb)->ip6_frag_id,
> > > > > + fhdr.identification);
> > > > >
> > > > > append:
> > > > > return skb_append_datato_frags(sk, skb, getfrag, from,
> > > > >
> > > >
> > > > I thought about mixing in the incoming interface identifier into the
> > > > frag id generation, but that could hurt us badly as soon as a VM has
> > > > more than one interface to the outside world and uses e.g. ECMP.
> > > > We need
> > > > to make sure that those frag ids are unique and the kernel needs to be
> > > > better than just using a random number generator.
> > > >
> > > > Bye,
> > > > Hannes
> > >
> > > OK then. Like this:
> > >
> > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> > > index 679e6e9..1ee9a3a 100644
> > > --- a/include/linux/netdevice.h
> > > +++ b/include/linux/netdevice.h
> > > @@ -1508,6 +1508,9 @@ struct net_device {
> > > * part of the usual set specified in Space.c.
> > > */
> > >
> > > + /* Extra hash to mix into IPv6 frag ID on packets received from here. */
> > > + unsigned int frag_id_hash;
> > > +
> > > unsigned long state;
> > >
> > > struct list_head dev_list;
> > > diff --git a/net/core/dev.c b/net/core/dev.c
> > > index 683d493..56f1898 100644
> > > --- a/net/core/dev.c
> > > +++ b/net/core/dev.c
> > > @@ -3625,6 +3625,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc)
> > > trace_netif_receive_skb(skb);
> > >
> > > orig_dev = skb->dev;
> > > + skb_shinfo(skb)->ip6_frag_id = skb->dev->frag_id_hash;
> > >
> > > skb_reset_network_header(skb);
> > > if (!skb_transport_header_was_set(skb))
> > > diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> > > index ce69a12..819a821 100644
> > > --- a/net/ipv6/ip6_output.c
> > > +++ b/net/ipv6/ip6_output.c
> > > @@ -1092,7 +1092,8 @@ static inline int ip6_ufo_append_data(struct sock *sk,
> > > sizeof(struct frag_hdr)) & ~7;
> > > skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
> > > ipv6_select_ident(&fhdr, rt);
> > > - skb_shinfo(skb)->ip6_frag_id = fhdr.identification;
> > > + skb_shinfo(skb)->ip6_frag_id = jhash_1word(skb_shinfo(skb)->ip6_frag_id,
> > > + fhdr.identification);
> > >
> > > append:
> > > return skb_append_datato_frags(sk, skb, getfrag, from,
> > >
> > >
> > > Add to this a netlink/sysfs API to set the frag_id_hash for
> > > devices.
> > >
> > > Now, user can set identical frag id hash for all devices
> > > for a given VM.
> > >
> > > We can even expose this to guests: each guest would generate
> > > the ID on boot and send it to host, host would set it
> > > in sysfs.
> >
> > jhash_1word shouldn't be a bijection, so we are randomizing here and are
> > increasing the probability of collisions.
> > Instead of jhash_1word you
> > would need to take a simple block cipher with the hash as key.
> >
> > Bye,
> > Hannes
>
> fhdr.identification is coming from jhash_3word itself, how is this
> different?
>
Sorry, I currently cannot follow. Does it? We hash the ipv6 addresses
and the hash is used as an index into the ip_idents array.
Sorry, maybe I have overlooked something?
Bye,
Hannes
^ permalink raw reply
* Re: [PATCH 1/3] ipv6: Select fragment id during UFO/GSO segmentation if not set.
From: Ben Hutchings @ 2015-01-28 17:24 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: netdev, Vladislav Yasevich, virtualization, edumazet,
Hannes Frederic Sowa
In-Reply-To: <20150128094658.GB16775@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1094 bytes --]
On Wed, 2015-01-28 at 11:46 +0200, Michael S. Tsirkin wrote:
> On Wed, Jan 28, 2015 at 09:25:08AM +0100, Hannes Frederic Sowa wrote:
[...]
> > I see fragmentation id generation still as security critical:
> > When Eric patched the frag id generator in 04ca6973f7c1a0d ("ip: make IP
> > identifiers less predictable") I could patch my kernels and use the
> > patch regardless of the machine being virtualized or not. It was not
> > dependent on the hypervisor.
>
> And now it's even easier - just patch the hypervisor, and all VMs
> automatically benefit.
[...]
You are advocating that the hypervisor should continue to act as a
middle-box that quietly modifies packets. This may be useful to protect
guests that have poor fragment ID generation, but then that should be an
optional netfilter module and *not* the default. The default should be
that UFO has no effect on the packet headers on the wire, and therefore
that the fragment ID is chosen by the IPv6 stack in the guest.
Ben.
--
Ben Hutchings
Teamwork is essential - it allows you to blame someone else.
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply
* Re: [PATCH net-next v8 0/4] net: Add Keystone NetCP ethernet driver support
From: Murali Karicheri @ 2015-01-28 16:49 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: David Miller, devicetree, linux-kernel, netdev
In-Reply-To: <25883654.BLFxICW9P0@wuerfel>
On 01/27/2015 05:28 PM, Arnd Bergmann wrote:
> On Tuesday 20 January 2015 10:53:36 Murali Karicheri wrote:
>> On 01/19/2015 03:11 PM, David Miller wrote:
>>> From: Murali Karicheri<m-karicheri2@ti.com>
>>> Date: Thu, 15 Jan 2015 19:10:03 -0500
>>>
>>>> The Network Coprocessor (NetCP) is a hardware accelerator that processes
>>>> Ethernet packets. NetCP has a gigabit Ethernet (GbE) subsystem with a ethernet
>>>> switch sub-module to send and receive packets. NetCP also includes a packet
>>>> accelerator (PA) module to perform packet classification operations such as
>>>> header matching, and packet modification operations such as checksum
>>>> generation. NetCP can also optionally include a Security Accelerator(SA)
>>>> capable of performing IPSec operations on ingress/egress packets.
>>>>
>>>> Keystone SoC's also have a 10 Gigabit Ethernet Subsystem (XGbE) which
>>>> includes a 3-port Ethernet switch sub-module capable of 10Gb/s and
>>>> 1Gb/s rates per Ethernet port.
>>>>
>>>> Both GBE and XGBE network processors supported using common driver. It
>>>> is also designed to handle future variants of NetCP.
>>>
>>> Series applied to net-next, thanks.
>> David,
>>
>> Thanks a lot for applying this series. This helps us move forward to
>> work on the next set of patches.
>
> Hi Murali,
>
> Building an ARM 'allmodconfig' kernel now runs into two separate problems
> from your driver:
>
> - you have two module_init() instances in one module, which conflict.
>
> - you have two files that are linked into more than one module, so building
> both TI_CPSW and TI_KEYSTONE_NETCP in the same kernel fails.
>
> The answer to both of these is probably to have separate loadable modules,
> but you might be able to come up with a different solution.
Arnd,
Thanks for letting us know. We will look into this.
How do I reproduce this? Is there a defconfig used for allmodconfig? I
am unable to find one. Any details to reproduce this will be useful.
Thanks.
Murali
>
> Arnd
--
Murali Karicheri
Linux Kernel, Texas Instruments
^ permalink raw reply
* Re: [PATCH 1/3] ipv6: Select fragment id during UFO/GSO segmentation if not set.
From: Michael S. Tsirkin @ 2015-01-28 16:48 UTC (permalink / raw)
To: Hannes Frederic Sowa
Cc: netdev, Vladislav Yasevich, virtualization, edumazet,
Ben Hutchings
In-Reply-To: <1422461749.4678.110.camel@stressinduktion.org>
On Wed, Jan 28, 2015 at 05:15:49PM +0100, Hannes Frederic Sowa wrote:
> Hi,
>
> On Mi, 2015-01-28 at 18:00 +0200, Michael S. Tsirkin wrote:
> > On Wed, Jan 28, 2015 at 11:34:02AM +0100, Hannes Frederic Sowa wrote:
> > > Hi,
> > >
> > > On Mi, 2015-01-28 at 11:46 +0200, Michael S. Tsirkin wrote:
> > > > On Wed, Jan 28, 2015 at 09:25:08AM +0100, Hannes Frederic Sowa wrote:
> > > > > Hello,
> > > > >
> > > > > On Di, 2015-01-27 at 18:08 +0200, Michael S. Tsirkin wrote:
> > > > > > On Tue, Jan 27, 2015 at 05:02:31PM +0100, Hannes Frederic Sowa wrote:
> > > > > > > On Di, 2015-01-27 at 09:26 -0500, Vlad Yasevich wrote:
> > > > > > > > On 01/27/2015 08:47 AM, Hannes Frederic Sowa wrote:
> > > > > > > > > On Di, 2015-01-27 at 10:42 +0200, Michael S. Tsirkin wrote:
> > > > > > > > >> On Tue, Jan 27, 2015 at 02:47:54AM +0000, Ben Hutchings wrote:
> > > > > > > > >>> On Mon, 2015-01-26 at 09:37 -0500, Vladislav Yasevich wrote:
> > > > > > > > >>>> If the IPv6 fragment id has not been set and we perform
> > > > > > > > >>>> fragmentation due to UFO, select a new fragment id.
> > > > > > > > >>>> When we store the fragment id into skb_shinfo, set the bit
> > > > > > > > >>>> in the skb so we can re-use the selected id.
> > > > > > > > >>>> This preserves the behavior of UFO packets generated on the
> > > > > > > > >>>> host and solves the issue of id generation for packet sockets
> > > > > > > > >>>> and tap/macvtap devices.
> > > > > > > > >>>>
> > > > > > > > >>>> This patch moves ipv6_select_ident() back in to the header file.
> > > > > > > > >>>> It also provides the helper function that sets skb_shinfo() frag
> > > > > > > > >>>> id and sets the bit.
> > > > > > > > >>>>
> > > > > > > > >>>> It also makes sure that we select the fragment id when doing
> > > > > > > > >>>> just gso validation, since it's possible for the packet to
> > > > > > > > >>>> come from an untrusted source (VM) and be forwarded through
> > > > > > > > >>>> a UFO enabled device which will expect the fragment id.
> > > > > > > > >>>>
> > > > > > > > >>>> CC: Eric Dumazet <edumazet@google.com>
> > > > > > > > >>>> Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
> > > > > > > > >>>> ---
> > > > > > > > >>>> include/linux/skbuff.h | 3 ++-
> > > > > > > > >>>> include/net/ipv6.h | 2 ++
> > > > > > > > >>>> net/ipv6/ip6_output.c | 4 ++--
> > > > > > > > >>>> net/ipv6/output_core.c | 9 ++++++++-
> > > > > > > > >>>> net/ipv6/udp_offload.c | 10 +++++++++-
> > > > > > > > >>>> 5 files changed, 23 insertions(+), 5 deletions(-)
> > > > > > > > >>>>
> > > > > > > > >>>> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> > > > > > > > >>>> index 85ab7d7..3ad5203 100644
> > > > > > > > >>>> --- a/include/linux/skbuff.h
> > > > > > > > >>>> +++ b/include/linux/skbuff.h
> > > > > > > > >>>> @@ -605,7 +605,8 @@ struct sk_buff {
> > > > > > > > >>>> __u8 ipvs_property:1;
> > > > > > > > >>>> __u8 inner_protocol_type:1;
> > > > > > > > >>>> __u8 remcsum_offload:1;
> > > > > > > > >>>> - /* 3 or 5 bit hole */
> > > > > > > > >>>> + __u8 ufo_fragid_set:1;
> > > > > > > > >>> [...]
> > > > > > > > >>>
> > > > > > > > >>> Doesn't the flag belong in struct skb_shared_info, rather than struct
> > > > > > > > >>> sk_buff? Otherwise this looks fine.
> > > > > > > > >>>
> > > > > > > > >>> Ben.
> > > > > > > > >>
> > > > > > > > >> Hmm we seem to be out of tx flags.
> > > > > > > > >> Maybe ip6_frag_id == 0 should mean "not set".
> > > > > > > > >
> > > > > > > > > Maybe that is the best idea. Definitely the ufo_fragid_set bit should
> > > > > > > > > move into the skb_shared_info area.
> > > > > > > >
> > > > > > > > That's what I originally wanted to do, but had to move and grow txflags thus
> > > > > > > > skb_shinfo ended up growing. I wanted to avoid that, so stole an skb flag.
> > > > > > > >
> > > > > > > > I considered treating fragid == 0 as unset, but a 0 fragid is perfectly valid
> > > > > > > > from the protocol perspective and could actually be generated by the id generator
> > > > > > > > functions. This may cause us to call the id generation multiple times.
> > > > > > >
> > > > > > > Are there plans in the long run to let virtio_net transmit auxiliary
> > > > > > > data to the other end so we can clean all of this this up one day?
> > > > > > >
> > > > > > > I don't like the whole situation: looking into the virtio_net headers
> > > > > > > just adding a field for ipv6 fragmentation ids to those small structs
> > > > > > > seems bloated, not doing it feels incorrect. :/
> > > > > > >
> > > > > > > Thoughts?
> > > > > > >
> > > > > > > Bye,
> > > > > > > Hannes
> > > > > >
> > > > > > I'm not sure - what will be achieved by generating the IDs guest side as
> > > > > > opposed to host side? It's certainly harder to get hold of entropy
> > > > > > guest-side.
> > > > >
> > > > > It is not only about entropy but about uniqueness. Also fragmentation
> > > > > ids should not be discoverable,
> > > >
> > > > I belive "predictable" is the language used by the IETF draft.
> > > >
> > > > > so there are several aspects:
> > > > >
> > > > > I see fragmentation id generation still as security critical:
> > > > > When Eric patched the frag id generator in 04ca6973f7c1a0d ("ip: make IP
> > > > > identifiers less predictable") I could patch my kernels and use the
> > > > > patch regardless of the machine being virtualized or not. It was not
> > > > > dependent on the hypervisor.
> > > >
> > > > And now it's even easier - just patch the hypervisor, and all VMs
> > > > automatically benefit.
> > >
> > > Sometimes the hypervisor is not under my control.
> >
> > In that case doing things like extending virtio
> > is out of the question too, isn't it?
> > It needs hypervisor changes.
>
> Sure, but I would like to have the fragmentation id generator to reside
> inside the end-host kernel. Hypervisor needs to carry the frag id along,
> sure, and needs to be changed accordingly.
>
> So in either case we need to change both kernels. ;)
>
> >
> > > You would need to
> > > patch both kernels in your case - non gso frames would still get the
> > > fragmentation id generated in the host kernel.
> > >
> > > > > I think that is the same reasoning why we
> > > > > don't support TOE.
> > > > > If we use one generator in the hypervisor in an openstack alike setting,
> > > > > the host deals with quite a lot of overlay networks. A lot of default
> > > > > configurations use the same addresses internally, so on the hypervisor
> > > > > the frag id generators would interfere by design.
> > > > > I could come up with an attack scenario for DNS servers (again :) ):
> > > > >
> > > > > You are sitting next to a DNS server on the same hypervisor and can send
> > > > > packets without source validation (because that is handled later on in
> > > > > case of openvswitch when the packet is put into the corresponding
> > > > > overlay network). You emit a gso packet with the same source and
> > > > > destination addresses as the DNS server would do and would get an
> > > > > fragmentation id which is linearly (+ time delta) incremented depending
> > > > > on the source and destination address. With such a leak you could start
> > > > > trying attack and spoof DNS responses (fragmentation attacks etc.).
> > > > > See also details on such kind of attacks in the description of commit
> > > > > 04ca6973f7c1a0d.
> > > > >
> > > > > AFAIK IETF tried with IPv6 to push fragmentation id generation to the
> > > > > end hosts, that's also the reason for the introduction of atomic
> > > > > fragments (which are now being rolled back ;) ).
> > > > >
> > > > > Still it is better to generate a frag id on the hypervisor than just
> > > > > sending a 0, so I am ok with this change, albeit not happy.
> > > > >
> > > > > Thanks,
> > > > > Hannes
> > > > >
> > > >
> > > > OK so to summarize, identifiers are only re-randomized once per jiffy,
> > > > so you worry that within this window, an external observer can discover
> > > > past fragment ID values and so predict the future ones.
> > > > All that's required is that two paths go through the same box performing
> > > > fragmentation.
> > > >
> > > > Is that a fair summary?
> >
> > No answer here?
>
> Ups, sorry.
>
> It is not re-randomized but only biased by a time delta (note the
> prandom_u32_max). So even after such an increment happens you can still
> guess the range of the current fragmentation ids for a longer time.
>
> Otherwise it is a fair summary.
>
> >
> > > > If yes, we can make this a bit harder by mixing in some
> > > > data per input and/or output devices.
> > > >
> > > > For example, just to give you the idea:
> > > >
> > > > diff --git a/net/core/dev.c b/net/core/dev.c
> > > > index 683d493..4faa7ef 100644
> > > > --- a/net/core/dev.c
> > > > +++ b/net/core/dev.c
> > > > @@ -3625,6 +3625,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc)
> > > > trace_netif_receive_skb(skb);
> > > >
> > > > orig_dev = skb->dev;
> > > > + skb_shinfo(skb)->ip6_frag_id = skb->dev->ifindex;
> > > >
> > > > skb_reset_network_header(skb);
> > > > if (!skb_transport_header_was_set(skb))
> > > > diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> > > > index ce69a12..819a821 100644
> > > > --- a/net/ipv6/ip6_output.c
> > > > +++ b/net/ipv6/ip6_output.c
> > > > @@ -1092,7 +1092,8 @@ static inline int ip6_ufo_append_data(struct sock *sk,
> > > > sizeof(struct frag_hdr)) & ~7;
> > > > skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
> > > > ipv6_select_ident(&fhdr, rt);
> > > > - skb_shinfo(skb)->ip6_frag_id = fhdr.identification;
> > > > + skb_shinfo(skb)->ip6_frag_id = jhash_1word(skb_shinfo(skb)->ip6_frag_id,
> > > > + fhdr.identification);
> > > >
> > > > append:
> > > > return skb_append_datato_frags(sk, skb, getfrag, from,
> > > >
> > >
> > > I thought about mixing in the incoming interface identifier into the
> > > frag id generation, but that could hurt us badly as soon as a VM has
> > > more than one interface to the outside world and uses e.g. ECMP.
> > > We need
> > > to make sure that those frag ids are unique and the kernel needs to be
> > > better than just using a random number generator.
> > >
> > > Bye,
> > > Hannes
> >
> > OK then. Like this:
> >
> > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> > index 679e6e9..1ee9a3a 100644
> > --- a/include/linux/netdevice.h
> > +++ b/include/linux/netdevice.h
> > @@ -1508,6 +1508,9 @@ struct net_device {
> > * part of the usual set specified in Space.c.
> > */
> >
> > + /* Extra hash to mix into IPv6 frag ID on packets received from here. */
> > + unsigned int frag_id_hash;
> > +
> > unsigned long state;
> >
> > struct list_head dev_list;
> > diff --git a/net/core/dev.c b/net/core/dev.c
> > index 683d493..56f1898 100644
> > --- a/net/core/dev.c
> > +++ b/net/core/dev.c
> > @@ -3625,6 +3625,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc)
> > trace_netif_receive_skb(skb);
> >
> > orig_dev = skb->dev;
> > + skb_shinfo(skb)->ip6_frag_id = skb->dev->frag_id_hash;
> >
> > skb_reset_network_header(skb);
> > if (!skb_transport_header_was_set(skb))
> > diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> > index ce69a12..819a821 100644
> > --- a/net/ipv6/ip6_output.c
> > +++ b/net/ipv6/ip6_output.c
> > @@ -1092,7 +1092,8 @@ static inline int ip6_ufo_append_data(struct sock *sk,
> > sizeof(struct frag_hdr)) & ~7;
> > skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
> > ipv6_select_ident(&fhdr, rt);
> > - skb_shinfo(skb)->ip6_frag_id = fhdr.identification;
> > + skb_shinfo(skb)->ip6_frag_id = jhash_1word(skb_shinfo(skb)->ip6_frag_id,
> > + fhdr.identification);
> >
> > append:
> > return skb_append_datato_frags(sk, skb, getfrag, from,
> >
> >
> > Add to this a netlink/sysfs API to set the frag_id_hash for
> > devices.
> >
> > Now, user can set identical frag id hash for all devices
> > for a given VM.
> >
> > We can even expose this to guests: each guest would generate
> > the ID on boot and send it to host, host would set it
> > in sysfs.
>
> jhash_1word shouldn't be a bijection, so we are randomizing here and are
> increasing the probability of collisions.
> Instead of jhash_1word you
> would need to take a simple block cipher with the hash as key.
>
> Bye,
> Hannes
fhdr.identification is coming from jhash_3word itself, how is this
different?
^ 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