* [PATCH 6/9] net: phy: micrel: add led-mode sanity check
From: Johan Hovold @ 2014-11-11 19:00 UTC (permalink / raw)
To: Florian Fainelli; +Cc: David S. Miller, linux-kernel, netdev, Johan Hovold
In-Reply-To: <1415732415-10363-1-git-send-email-johan@kernel.org>
Make sure never to update more than two bits when setting the led mode,
something which could for example change the reference-clock setting.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/phy/micrel.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 16135ac18bfe..1b3985cdc64c 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -173,6 +173,11 @@ static int kszphy_setup_led(struct phy_device *phydev,
if (of_property_read_u32(of_node, "micrel,led-mode", &val))
return 0;
+ if (val > 3) {
+ dev_err(&phydev->dev, "invalid led mode: 0x%02x\n", val);
+ return -EINVAL;
+ }
+
temp = phy_read(phydev, reg);
if (temp < 0)
return temp;
--
2.0.4
^ permalink raw reply related
* [PATCH 7/9] net: phy: micrel: refactor led-mode error handling
From: Johan Hovold @ 2014-11-11 19:00 UTC (permalink / raw)
To: Florian Fainelli; +Cc: David S. Miller, linux-kernel, netdev, Johan Hovold
In-Reply-To: <1415732415-10363-1-git-send-email-johan@kernel.org>
Refactor led-mode error handling.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/phy/micrel.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 1b3985cdc64c..ec9ce35e934b 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -179,14 +179,19 @@ static int kszphy_setup_led(struct phy_device *phydev,
}
temp = phy_read(phydev, reg);
- if (temp < 0)
- return temp;
+ if (temp < 0) {
+ rc = temp;
+ goto out;
+ }
temp &= ~(3 << shift);
temp |= val << shift;
rc = phy_write(phydev, reg, temp);
+out:
+ if (rc < 0)
+ dev_err(&phydev->dev, "failed to set led mode\n");
- return rc < 0 ? rc : 0;
+ return rc;
}
/* Disable PHY address 0 as the broadcast address, so that it can be used as a
@@ -223,9 +228,7 @@ static int ksz8021_config_init(struct phy_device *phydev)
{
int rc;
- rc = kszphy_setup_led(phydev, 0x1f, 4);
- if (rc)
- dev_err(&phydev->dev, "failed to set led mode\n");
+ kszphy_setup_led(phydev, 0x1f, 4);
rc = ksz_config_flags(phydev);
if (rc < 0)
@@ -240,9 +243,7 @@ static int ks8051_config_init(struct phy_device *phydev)
{
int rc;
- rc = kszphy_setup_led(phydev, 0x1f, 4);
- if (rc)
- dev_err(&phydev->dev, "failed to set led mode\n");
+ kszphy_setup_led(phydev, 0x1f, 4);
rc = ksz_config_flags(phydev);
return rc < 0 ? rc : 0;
--
2.0.4
^ permalink raw reply related
* [PATCH 8/9] net: phy: micrel: clean up led-mode setup
From: Johan Hovold @ 2014-11-11 19:00 UTC (permalink / raw)
To: Florian Fainelli; +Cc: David S. Miller, linux-kernel, netdev, Johan Hovold
In-Reply-To: <1415732415-10363-1-git-send-email-johan@kernel.org>
Clean up led-mode setup by introducing proper defines for PHY Control
registers 1 and 2 and only passing the register to the setup function.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/phy/micrel.c | 31 ++++++++++++++++++++++---------
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index ec9ce35e934b..12e18f7273ce 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -47,8 +47,12 @@
#define KSZPHY_INTCS_ALL (KSZPHY_INTCS_LINK_UP |\
KSZPHY_INTCS_LINK_DOWN)
-/* general PHY control reg in vendor specific block. */
-#define MII_KSZPHY_CTRL 0x1F
+/* PHY Control 1 */
+#define MII_KSZPHY_CTRL_1 0x1e
+
+/* PHY Control 2 / PHY Control (if no PHY Control 1) */
+#define MII_KSZPHY_CTRL_2 0x1f
+#define MII_KSZPHY_CTRL MII_KSZPHY_CTRL_2
/* bitmap of PHY register to set interrupt mode */
#define KSZPHY_CTRL_INT_ACTIVE_HIGH BIT(9)
#define KSZ9021_CTRL_INT_ACTIVE_HIGH BIT(14)
@@ -158,13 +162,12 @@ static int ks8737_config_intr(struct phy_device *phydev)
return rc < 0 ? rc : 0;
}
-static int kszphy_setup_led(struct phy_device *phydev,
- unsigned int reg, unsigned int shift)
+static int kszphy_setup_led(struct phy_device *phydev, u32 reg)
{
struct device *dev = &phydev->dev;
struct device_node *of_node = dev->of_node;
- int rc, temp;
+ int rc, temp, shift;
u32 val;
if (!of_node && dev->parent->of_node)
@@ -178,6 +181,17 @@ static int kszphy_setup_led(struct phy_device *phydev,
return -EINVAL;
}
+ switch (reg) {
+ case MII_KSZPHY_CTRL_1:
+ shift = 14;
+ break;
+ case MII_KSZPHY_CTRL_2:
+ shift = 4;
+ break;
+ default:
+ return -EINVAL;
+ }
+
temp = phy_read(phydev, reg);
if (temp < 0) {
rc = temp;
@@ -220,15 +234,14 @@ static int kszphy_config_init(struct phy_device *phydev)
static int kszphy_config_init_led8041(struct phy_device *phydev)
{
- /* single led control, register 0x1e bits 15..14 */
- return kszphy_setup_led(phydev, 0x1e, 14);
+ return kszphy_setup_led(phydev, MII_KSZPHY_CTRL_1);
}
static int ksz8021_config_init(struct phy_device *phydev)
{
int rc;
- kszphy_setup_led(phydev, 0x1f, 4);
+ kszphy_setup_led(phydev, MII_KSZPHY_CTRL_2);
rc = ksz_config_flags(phydev);
if (rc < 0)
@@ -243,7 +256,7 @@ static int ks8051_config_init(struct phy_device *phydev)
{
int rc;
- kszphy_setup_led(phydev, 0x1f, 4);
+ kszphy_setup_led(phydev, MII_KSZPHY_CTRL_2);
rc = ksz_config_flags(phydev);
return rc < 0 ? rc : 0;
--
2.0.4
^ permalink raw reply related
* [PATCH 9/9] net: phy: micrel: enable led-mode for KSZ8081/KSZ8091
From: Johan Hovold @ 2014-11-11 19:00 UTC (permalink / raw)
To: Florian Fainelli; +Cc: David S. Miller, linux-kernel, netdev, Johan Hovold
In-Reply-To: <1415732415-10363-1-git-send-email-johan@kernel.org>
Enable led-mode configuration for KSZ8081 and KSZ8091.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
Documentation/devicetree/bindings/net/micrel.txt | 2 ++
drivers/net/phy/micrel.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/micrel.txt b/Documentation/devicetree/bindings/net/micrel.txt
index e1d99b95c4ec..30062fae5623 100644
--- a/Documentation/devicetree/bindings/net/micrel.txt
+++ b/Documentation/devicetree/bindings/net/micrel.txt
@@ -14,6 +14,8 @@ Optional properties:
KSZ8021: register 0x1f, bits 5..4
KSZ8031: register 0x1f, bits 5..4
KSZ8051: register 0x1f, bits 5..4
+ KSZ8081: register 0x1f, bits 5..4
+ KSZ8091: register 0x1f, bits 5..4
See the respective PHY datasheet for the mode values.
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 12e18f7273ce..30e894d6ffbd 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -265,6 +265,7 @@ static int ks8051_config_init(struct phy_device *phydev)
static int ksz8081_config_init(struct phy_device *phydev)
{
kszphy_broadcast_disable(phydev);
+ kszphy_setup_led(phydev, MII_KSZPHY_CTRL_2);
return 0;
}
--
2.0.4
^ permalink raw reply related
* [PATCH 1/9] dt/bindings: fix documentation of ethernet-phy compatible property
From: Johan Hovold @ 2014-11-11 19:00 UTC (permalink / raw)
To: Florian Fainelli
Cc: David S. Miller, linux-kernel, netdev, Johan Hovold, devicetree
In-Reply-To: <1415732415-10363-1-git-send-email-johan@kernel.org>
A recent commit extended the documentation of the ethernet-phy
compatible property, but placed the new paragraph under the max-speed
property.
Fixes: f00e756ed12d ("dt: Document a compatible entry for MDIO ethernet
Phys")
Cc: devicetree@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
---
Documentation/devicetree/bindings/net/phy.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
index 5b8c58903077..40831fbaff72 100644
--- a/Documentation/devicetree/bindings/net/phy.txt
+++ b/Documentation/devicetree/bindings/net/phy.txt
@@ -19,7 +19,6 @@ Optional Properties:
specifications. If neither of these are specified, the default is to
assume clause 22. The compatible list may also contain other
elements.
-- max-speed: Maximum PHY supported speed (10, 100, 1000...)
If the phy's identifier is known then the list may contain an entry
of the form: "ethernet-phy-idAAAA.BBBB" where
@@ -29,6 +28,8 @@ Optional Properties:
4 hex digits. This is the chip vendor OUI bits 19:24,
followed by 10 bits of a vendor specific ID.
+- max-speed: Maximum PHY supported speed (10, 100, 1000...)
+
Example:
ethernet-phy@0 {
--
2.0.4
^ permalink raw reply related
* Re: am335x: cpsw: phy ignores max-speed setting
From: Joe Perches @ 2014-11-11 19:08 UTC (permalink / raw)
To: Dave Taht
Cc: Mugunthan N V, mpa, lsorense, Yegor Yefremov, Daniel Mack, netdev
In-Reply-To: <CAA93jw7PTOGdYrmFGSY5zat=MpVsdmESVwpK_tVO=sLeDSWpRA@mail.gmail.com>
On Tue, 2014-11-11 at 10:44 -0800, Dave Taht wrote:
> On Nov 6, 2014 11:19 AM, "Joe Perches" <joe@perches.com> wrote:
[]
> > Is this the change that matters most?
> >
> > -#define CPSW_POLL_WEIGHT 64
> > +#define CPSW_POLL_WEIGHT 16
[]
> > If so, maybe this could be limited by a sysctl:
[]
> I'd like autotuning for the underlying rate somehow....
That might be difficult to achieve with variable rates.
^ permalink raw reply
* Re: [PATCH 0/4] move pci_assivned_vfs() check (while disabling VFs) to pci sub-system
From: Don Dutile @ 2014-11-11 19:09 UTC (permalink / raw)
To: Sathya Perla, linux-pci, netdev; +Cc: ariel.elior, linux.nics, shahed.shaikh
In-Reply-To: <1415620410-4937-1-git-send-email-sathya.perla@emulex.com>
On 11/10/2014 06:53 AM, Sathya Perla wrote:
> A user must not be allowed to disable VFs while they are already assigned to
> a guest. This check is being made in each individual driver that implements
> the sriov_configure PCI method.
> This patch-set fixes this code duplication by moving this check from
> drivers to the sriov_nuvfs_store() routine just before invoking
> sriov_configure() when num_vfs is equal to 0.
>
> Vasundhara Volam (4):
> pci: move pci_assivned_vfs() check while disabling VFs to pci
> sub-system
> bnx2x: remove pci_assigned_vfs() check while disabling VFs
> i40e: remove pci_assigned_vfs() check while disabling VFs
> qlcnic: remove pci_assigned_vfs() check while disabling VFs
>
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +-
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 7 +------
> .../net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 10 ----------
> drivers/pci/pci-sysfs.c | 5 +++++
> 4 files changed, 7 insertions(+), 17 deletions(-)
>
I have had a side conversation with Alex Williamson, VFIO author.
VFIO is the upstream method that device-assignment is managed/handled on kvm now.
It does not set the PCI_DEV_FLAGS_ASSIGNED pci dev-flags, and thus,
this check will not work when VFIO is used.
This patch set will only work for the former, kvm-managed, device-assignment method,
which is currently being deprecated in qemu as well.
So, yes, it works for kvm managed device-assignment, but not the
newer, VFIO-based device-assignment.
Note, also, that the pci_assigned_vfs() check in the drivers will
always return 0 when VFIO is used for device assignment, so keeping
these checks in the drivers doesn't do what they imply either.
So, taking in the patch solves old, kvm-managed, device assignment,
but a new method is needed when VFIO is involved.
- Don
ps -- Note: just adding the flag setting in vfio-pci does not necessarily
solve this problem. VFIO does not know if a device is assigned to a guest;
it only knows a caller of the ioctl requesting the device to be assigned
to vfio, and to be dma-mapped for a region of memory, has been requested.
So, a new PF<->VF mechanism needs to be put in place to
determine the equivalent information.
^ permalink raw reply
* Re: [PATCH 0/3] net: phy: add module_phy_driver macro
From: Florian Fainelli @ 2014-11-11 19:14 UTC (permalink / raw)
To: Johan Hovold; +Cc: David S. Miller, linux-kernel, netdev
In-Reply-To: <1415731559-10015-1-git-send-email-johan@kernel.org>
On 11/11/2014 10:45 AM, Johan Hovold wrote:
> Add module_phy_driver macro that can be used by PHY drivers that only
> calls phy_driver_register or phy_drivers_register (and the corresponding
> unregister functions) in their module init (and exit).
>
> This allows us to eliminate a lot of boilerplate code.
>
> Split in three patches (actual macro and two driver change classes) in
> order to facilitate review.
Looks good to me:
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Thanks!
>
> Johan
>
>
> Johan Hovold (3):
> net: phy: add module_phy_driver macro
> net: phy: replace phy_driver_register calls
> net: phy: replace phy_drivers_register calls
>
> drivers/net/phy/amd-xgbe-phy.c | 15 +--------------
> drivers/net/phy/amd.c | 17 +++--------------
> drivers/net/phy/at803x.c | 14 +-------------
> drivers/net/phy/bcm63xx.c | 15 +--------------
> drivers/net/phy/bcm7xxx.c | 15 +--------------
> drivers/net/phy/bcm87xx.c | 14 +-------------
> drivers/net/phy/broadcom.c | 15 +--------------
> drivers/net/phy/cicada.c | 15 +--------------
> drivers/net/phy/davicom.c | 15 +--------------
> drivers/net/phy/et1011c.c | 17 +++--------------
> drivers/net/phy/icplus.c | 15 +--------------
> drivers/net/phy/lxt.c | 15 +--------------
> drivers/net/phy/marvell.c | 15 +--------------
> drivers/net/phy/micrel.c | 15 +--------------
> drivers/net/phy/national.c | 17 +++--------------
> drivers/net/phy/qsemi.c | 17 +++--------------
> drivers/net/phy/realtek.c | 13 +------------
> drivers/net/phy/smsc.c | 14 +-------------
> drivers/net/phy/ste10Xp.c | 15 +--------------
> drivers/net/phy/vitesse.c | 14 +-------------
> include/linux/phy.h | 24 ++++++++++++++++++++++++
> 21 files changed, 52 insertions(+), 274 deletions(-)
>
^ permalink raw reply
* Re: [PATCH V2 net-next] net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited
From: David Miller @ 2014-11-11 19:18 UTC (permalink / raw)
To: joe; +Cc: netdev, linux-kernel, courmisch, nicolas.dichtel
In-Reply-To: <1415732357.16070.8.camel@perches.com>
From: Joe Perches <joe@perches.com>
Date: Tue, 11 Nov 2014 10:59:17 -0800
> Use the more common dynamic_debug capable net_dbg_ratelimited
> and remove the LIMIT_NETDEBUG macro.
>
> All messages are still ratelimited.
>
> Some KERN_<LEVEL> uses are changed to KERN_DEBUG.
>
> This may have some negative impact on messages that were
> emitted at KERN_INFO that are not not enabled at all unless
> DEBUG is defined or dynamic_debug is enabled. Even so,
> these messages are now _not_ emitted by default.
>
> This also eliminates the use of the net_msg_warn sysctl
> "/proc/sys/net/core/warnings". For backward compatibility,
> the sysctl is not removed, but it has no function. The extern
> declaration of net_msg_warn is removed from sock.h and made
> static in net/core/sysctl_net_core.c
>
> Miscellanea:
>
> o Update the sysctl documentation
> o Remove the embedded uses of pr_fmt
> o Coalesce format fragments
> o Realign arguments
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>
> V2: Remove the EXPORT_SYMBOL for net_msg_warn and make
> it a static in net/core/sysctl_net_core.c
Applied, thanks a lot Joe.
^ permalink raw reply
* RE: skbuff_fclone_cache poison overwritten
From: Long Li @ 2014-11-11 19:27 UTC (permalink / raw)
To: Sitsofe Wheeler, David S. Miller
Cc: KY Srinivasan, Haiyang Zhang, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <20141110113248.GA25131@sucs.org>
It's not obvious if this is a problem with hv_netvsc, or other code.
Can you try to use a legacy network device and see if this issue still exists?
-----Original Message-----
From: Sitsofe Wheeler [mailto:sitsofe@gmail.com]
Sent: Monday, November 10, 2014 3:33 AM
To: David S. Miller
Cc: KY Srinivasan; Haiyang Zhang; Long Li; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: skbuff_fclone_cache poison overwritten
While using 3.18.0-rc3.x86_64-00116-g6ac94d3 on a Hyper-V 2012 R2 the poison in skbuff_fclone_cache was overwritten:
[39099.484435] sd 7:0:0:0: [sdi] Attached SCSI disk [39099.484688] sd 6:0:0:0: [sdh] Attached SCSI disk [45285.786640] =============================================================================
[45285.787543] BUG skbuff_fclone_cache (Not tainted): Poison overwritten [45285.787543] -----------------------------------------------------------------------------
[45285.787543] Disabling lock debugging due to kernel taint [45285.787543] INFO: 0xffff8800d144c056-0xffff8800d144c056. First byte 0x6f instead of 0x6b [45285.787543] INFO: Allocated in __alloc_skb+0x4e/0x240 age=11 cpu=1 pid=17444
[45285.787543] __slab_alloc+0x50a/0x563
[45285.787543] kmem_cache_alloc_node+0xfe/0x2a0
[45285.787543] __alloc_skb+0x4e/0x240
[45285.787543] sk_stream_alloc_skb+0x3d/0x110
[45285.787543] tcp_sendmsg+0x36d/0xc60
[45285.787543] inet_sendmsg+0xd7/0xf0
[45285.787543] sock_sendmsg+0x90/0xb0
[45285.787543] SYSC_sendto+0x10e/0x150
[45285.787543] SyS_sendto+0xe/0x10
[45285.787543] system_call_fastpath+0x12/0x17
[45285.787543] INFO: Freed in kfree_skbmem+0x6f/0xa0 age=21 cpu=1 pid=17444
[45285.787543] __slab_free+0x39/0x2a0
[45285.787543] kmem_cache_free+0x1ce/0x280
[45285.787543] kfree_skbmem+0x6f/0xa0
[45285.787543] __kfree_skb+0x1e/0x30
[45285.787543] tcp_ack+0x66e/0x11f0
[45285.787543] tcp_rcv_established+0x514/0x6e0
[45285.787543] tcp_v4_do_rcv+0xb4/0x330
[45285.787543] release_sock+0xfd/0x1f0
[45285.787543] tcp_sendmsg+0xa65/0xc60
[45285.787543] inet_sendmsg+0xd7/0xf0
[45285.787543] sock_sendmsg+0x90/0xb0
[45285.787543] SYSC_sendto+0x10e/0x150
[45285.787543] SyS_sendto+0xe/0x10
[45285.787543] system_call_fastpath+0x12/0x17
[45285.787543] INFO: Slab 0xffffea0003451200 objects=42 used=42 fp=0x (null) flags=0x3ffe0000004080
[45285.787543] INFO: Object 0xffff8800d144bf00 @offset=16128 fp=0xffff8800d1448f00
[45285.787543] Bytes b4 ffff8800d144bef0: 88 3d ad 02 01 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a .=......ZZZZZZZZ [45285.787543] Object ffff8800d144bf00: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bf10: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bf20: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bf30: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bf40: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bf50: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bf60: 6b 6b 6b 6b 6b 6
b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bf70: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bf80: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bf90: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bfa0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bfb0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bfc0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bfd0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285
.787543] Object ffff8800d144bfe0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144bff0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144c000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144c010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144c020: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144c030: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144c040: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144c050: 6b 6b 6b 6b 6b 6b 6f 6
b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkokkkkkkkkk [45285.787543] Object ffff8800d144c060: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144c070: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144c080: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144c090: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [45285.787543] Object ffff8800d144c0a0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
[45285.787543] Object ffff8800d144c0b0: 6b 6b 6b 6b 6b 6b 6b a5 kkkkkkk.
[45285.787543] Redzone ffff8800d144c0b8: bb bb bb bb bb bb bb bb ........
[45285.787543] Padding ffff8800d144c1f8: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ
[45285.787543] CPU: 7 PID: 16678 Comm: phantomjs Tainted: G B 3.18.0-rc3.x86_64-00116-g6ac94d3 #160
[45285.787543] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006 05/23/2012 [45285.787543] ffff8800d144bf00 ffff8801eb41b928 ffffffff816db38f 0000000000000000 [45285.787543] ffff8801fbd34e00 ffff8801eb41b968 ffffffff811a6187 0000000000000008 [45285.787543] ffff880000000001 ffff8800d144c057 ffff8801fbd34e00 000000000000006b [45285.787543] Call Trace:
[45285.787543] [<ffffffff816db38f>] dump_stack+0x4e/0x68 [45285.787543] [<ffffffff811a6187>] print_trailer+0x1c7/0x1e0 [45285.787543] [<ffffffff811a6b7b>] check_bytes_and_report+0xbb/0x110 [45285.787543] [<ffffffff811a76ee>] check_object+0x10e/0x240 [45285.787543] [<ffffffff815fb11e>] ? __alloc_skb+0x4e/0x240 [45285.787543] [<ffffffff816d8b65>] alloc_debug_processing+0x76/0x118 [45285.787543] [<ffffffff816d981b>] __slab_alloc+0x50a/0x563 [45285.787543] [<ffffffff815fb11e>] ? __alloc_skb+0x4e/0x240 [45285.787543] [<ffffffff810b7ad8>] ? mark_held_locks+0x88/0xa0 [45285.787543] [<ffffffff811a9dbe>] kmem_cache_alloc_node+0xfe/0x2a0 [45285.787543] [<ffffffff815fb11e>] __alloc_skb+0x4e/0x240 [45285.787543] [<ffffffff81655c3d>] sk_stream_alloc_skb+0x3d/0x110 [45285.787543] [<ffffffff
8165666d>] tcp_sendmsg+0x36d/0xc60 [45285.787543] [<ffffffff81683847>] inet_sendmsg+0xd7/0xf0 [45285.787543] [<ffffffff81683775>] ? inet_sendmsg+0x5/0xf0 [45285.787543] [<ffffffff815f2980>] sock_sendmsg+0x90/0xb0 [45285.787543] [<ffffffff811e4541>] ? __fget_light+0x61/0x80 [45285.787543] [<ffffffff811e4ee3>] ? __fdget+0x13/0x20 [45285.787543] [<ffffffff815f2aae>] SYSC_sendto+0x10e/0x150 [45285.787543] [<ffffffff811cab6f>] ? SYSC_newstat+0x2f/0x40 [45285.787543] [<ffffffff816e5a5c>] ? retint_swapgs+0x13/0x1b [45285.787543] [<ffffffff813aa1fe>] ? trace_hardirqs_on_thunk+0x3a/0x3f [45285.787543] [<ffffffff815f3afe>] SyS_sendto+0xe/0x10 [45285.787543] [<ffffffff816e4e29>] system_call_fastpath+0x12/0x17 [45285.787543] FIX skbuff_fclone_cache: Restoring 0xffff8800d144c056-0xffff8800
d144c056=0x6b
[45285.787543] FIX skbuff_fclone_cache: Marking all objects used [46810.070997] =============================================================================
[46810.071289] BUG skbuff_fclone_cache (Tainted: G B ): Poison overwritten
[46810.071289] -----------------------------------------------------------------------------
[46810.071289] INFO: 0xffff8801c48fe756-0xffff8801c48fe756. First byte 0x6f instead of 0x6b [46810.071289] INFO: Allocated in __alloc_skb+0x4e/0x240 age=9 cpu=6 pid=1220
[46810.071289] __slab_alloc+0x50a/0x563
[46810.071289] kmem_cache_alloc_node+0xfe/0x2a0
[46810.071289] __alloc_skb+0x4e/0x240
[46810.071289] sk_stream_alloc_skb+0x3d/0x110
[46810.071289] tcp_sendmsg+0x36d/0xc60
[46810.071289] inet_sendmsg+0xd7/0xf0
[46810.071289] sock_sendmsg+0x90/0xb0
[46810.071289] SYSC_sendto+0x10e/0x150
[46810.071289] SyS_sendto+0xe/0x10
[46810.071289] system_call_fastpath+0x12/0x17
[46810.071289] INFO: Freed in kfree_skbmem+0x6f/0xa0 age=23 cpu=6 pid=1220
[46810.071289] __slab_free+0x39/0x2a0
[46810.071289] kmem_cache_free+0x1ce/0x280
[46810.071289] kfree_skbmem+0x6f/0xa0
[46810.071289] __kfree_skb+0x1e/0x30
[46810.071289] tcp_ack+0x66e/0x11f0
[46810.071289] tcp_rcv_established+0x107/0x6e0
[46810.071289] tcp_v4_do_rcv+0xb4/0x330
[46810.071289] release_sock+0xfd/0x1f0
[46810.071289] tcp_sendmsg+0xa65/0xc60
[46810.071289] inet_sendmsg+0xd7/0xf0
[46810.071289] sock_sendmsg+0x90/0xb0
[46810.071289] SYSC_sendto+0x10e/0x150
[46810.071289] SyS_sendto+0xe/0x10
[46810.071289] system_call_fastpath+0x12/0x17
[46810.071289] INFO: Slab 0xffffea0007123e00 objects=42 used=42 fp=0x (null) flags=0x5ffe0000004080
[46810.071289] INFO: Object 0xffff8801c48fe600 @offset=26112 fp=0xffff8801c48fd700
[46810.071289] Bytes b4 ffff8801c48fe5f0: c2 89 c4 02 01 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a ........ZZZZZZZZ [46810.071289] Object ffff8801c48fe600: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe610: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe620: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe630: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe640: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe650: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe660: 6b 6b 6b 6b 6b 6
b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe670: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe680: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe690: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe6a0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe6b0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe6c0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe6d0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810
.071289] Object ffff8801c48fe6e0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe6f0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.071289] Object ffff8801c48fe700: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.228303] Object ffff8801c48fe710: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.228303] Object ffff8801c48fe720: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.240204] Object ffff8801c48fe730: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.240204] Object ffff8801c48fe740: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.240204] Object ffff8801c48fe750: 6b 6b 6b 6b 6b 6b 6f 6
b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkokkkkkkkkk [46810.240204] Object ffff8801c48fe760: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.240204] Object ffff8801c48fe770: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.240204] Object ffff8801c48fe780: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.240204] Object ffff8801c48fe790: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46810.240204] Object ffff8801c48fe7a0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
[46810.291135] Object ffff8801c48fe7b0: 6b 6b 6b 6b 6b 6b 6b a5 kkkkkkk.
[46810.291135] Redzone ffff8801c48fe7b8: bb bb bb bb bb bb bb bb ........
[46810.291135] Padding ffff8801c48fe8f8: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ
[46810.291135] CPU: 6 PID: 1233 Comm: phantomjs Tainted: G B 3.18.0-rc3.x86_64-00116-g6ac94d3 #160
[46810.291135] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006 05/23/2012 [46810.291135] ffff8801c48fe600 ffff8801f2ebbc08 ffffffff816db38f ffff8801b6b59350 [46810.291135] ffff8801fbd34e00 ffff8801f2ebbc48 ffffffff811a6187 0000000000000008 [46810.291135] ffff880100000001 ffff8801c48fe757 ffff8801fbd34e00 000000000000006b [46810.291135] Call Trace:
[46810.291135] [<ffffffff816db38f>] dump_stack+0x4e/0x68 [46810.291135] [<ffffffff811a6187>] print_trailer+0x1c7/0x1e0 [46810.291135] [<ffffffff811a6b7b>] check_bytes_and_report+0xbb/0x110 [46810.291135] [<ffffffff811a76ee>] check_object+0x10e/0x240 [46810.291135] [<ffffffff815fb11e>] ? __alloc_skb+0x4e/0x240 [46810.291135] [<ffffffff816d8b65>] alloc_debug_processing+0x76/0x118 [46810.291135] [<ffffffff816d981b>] __slab_alloc+0x50a/0x563 [46810.291135] [<ffffffff810b7f4d>] ? trace_hardirqs_on+0xd/0x10 [46810.291135] [<ffffffff815fb11e>] ? __alloc_skb+0x4e/0x240 [46810.291135] [<ffffffff811a9dbe>] kmem_cache_alloc_node+0xfe/0x2a0 [46810.291135] [<ffffffff815fb11e>] __alloc_skb+0x4e/0x240 [46810.291135] [<ffffffff81666caa>] tcp_send_fin+0x7a/0x1a0 [46810.291135] [<ffffffff81657f
e6>] tcp_shutdown+0x46/0x60 [46810.291135] [<ffffffff81682125>] inet_shutdown+0xb5/0x110 [46810.291135] [<ffffffff815f3d17>] SyS_shutdown+0x47/0x70 [46810.291135] [<ffffffff816e4e29>] system_call_fastpath+0x12/0x17 [46810.291135] FIX skbuff_fclone_cache: Restoring 0xffff8801c48fe756-0xffff8801c48fe756=0x6b
[46810.291135] FIX skbuff_fclone_cache: Marking all objects used [46994.744143] =============================================================================
[46994.744548] BUG skbuff_fclone_cache (Tainted: G B ): Poison overwritten
[46994.744548] -----------------------------------------------------------------------------
[46994.744548] INFO: 0xffff8801eb7df056-0xffff8801eb7df056. First byte 0x6f instead of 0x6b [46994.744548] INFO: Allocated in __alloc_skb+0x4e/0x240 age=10 cpu=0 pid=17426
[46994.744548] __slab_alloc+0x50a/0x563
[46994.744548] kmem_cache_alloc_node+0xfe/0x2a0
[46994.744548] __alloc_skb+0x4e/0x240
[46994.744548] sk_stream_alloc_skb+0x3d/0x110
[46994.744548] tcp_sendmsg+0x36d/0xc60
[46994.744548] inet_sendmsg+0xd7/0xf0
[46994.744548] sock_sendmsg+0x90/0xb0
[46994.744548] SYSC_sendto+0x10e/0x150
[46994.744548] SyS_sendto+0xe/0x10
[46994.744548] system_call_fastpath+0x12/0x17
[46994.744548] INFO: Freed in kfree_skbmem+0x6f/0xa0 age=21 cpu=0 pid=17426
[46994.744548] __slab_free+0x39/0x2a0
[46994.744548] kmem_cache_free+0x1ce/0x280
[46994.744548] kfree_skbmem+0x6f/0xa0
[46994.744548] __kfree_skb+0x1e/0x30
[46994.744548] tcp_ack+0x66e/0x11f0
[46994.744548] tcp_rcv_established+0x514/0x6e0
[46994.744548] tcp_v4_do_rcv+0xb4/0x330
[46994.744548] release_sock+0xfd/0x1f0
[46994.744548] tcp_sendmsg+0xa65/0xc60
[46994.744548] inet_sendmsg+0xd7/0xf0
[46994.744548] sock_sendmsg+0x90/0xb0
[46994.744548] SYSC_sendto+0x10e/0x150
[46994.744548] SyS_sendto+0xe/0x10
[46994.744548] system_call_fastpath+0x12/0x17
[46994.744548] INFO: Slab 0xffffea0007adf600 objects=42 used=42 fp=0x (null) flags=0x5ffe0000004080
[46994.744548] INFO: Object 0xffff8801eb7def00 @offset=28416 fp=0xffff8801eb7db900
[46994.744548] Bytes b4 ffff8801eb7deef0: f0 cd b1 02 01 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a ........ZZZZZZZZ [46994.744548] Object ffff8801eb7def00: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7def10: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7def20: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7def30: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7def40: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7def50: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7def60: 6b 6b 6b 6b 6b 6
b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7def70: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7def80: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7def90: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7defa0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7defb0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7defc0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7defd0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994
.744548] Object ffff8801eb7defe0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7deff0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7df000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7df010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7df020: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7df030: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7df040: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7df050: 6b 6b 6b 6b 6b 6b 6f 6
b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkokkkkkkkkk [46994.744548] Object ffff8801eb7df060: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7df070: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7df080: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7df090: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [46994.744548] Object ffff8801eb7df0a0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
[46994.744548] Object ffff8801eb7df0b0: 6b 6b 6b 6b 6b 6b 6b a5 kkkkkkk.
[46994.744548] Redzone ffff8801eb7df0b8: bb bb bb bb bb bb bb bb ........
[46994.744548] Padding ffff8801eb7df1f8: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ
[46994.744548] CPU: 4 PID: 24686 Comm: phantomjs Tainted: G B 3.18.0-rc3.x86_64-00116-g6ac94d3 #160
[46994.744548] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006 05/23/2012 [46994.744548] ffff8801eb7def00 ffff8801c4823928 ffffffff816db38f 0000000000000000 [46994.744548] ffff8801fbd34e00 ffff8801c4823968 ffffffff811a6187 0000000000000008 [46994.744548] ffff880100000001 ffff8801eb7df057 ffff8801fbd34e00 000000000000006b [46994.744548] Call Trace:
[46994.744548] [<ffffffff816db38f>] dump_stack+0x4e/0x68 [46994.744548] [<ffffffff811a6187>] print_trailer+0x1c7/0x1e0 [46994.744548] [<ffffffff811a6b7b>] check_bytes_and_report+0xbb/0x110 [46994.744548] [<ffffffff811a76ee>] check_object+0x10e/0x240 [46994.744548] [<ffffffff815fb11e>] ? __alloc_skb+0x4e/0x240 [46994.744548] [<ffffffff816d8b65>] alloc_debug_processing+0x76/0x118 [46994.744548] [<ffffffff816d981b>] __slab_alloc+0x50a/0x563 [46994.744548] [<ffffffff815fb11e>] ? __alloc_skb+0x4e/0x240 [46994.744548] [<ffffffff8100611b>] ? print_context_stack+0xdb/0x100 [46994.744548] [<ffffffff811a9dbe>] kmem_cache_alloc_node+0xfe/0x2a0 [46994.744548] [<ffffffff815fb11e>] __alloc_skb+0x4e/0x240 [46994.744548] [<ffffffff81655c3d>] sk_stream_alloc_skb+0x3d/0x110 [46994.744548] [<fff
fffff8165666d>] tcp_sendmsg+0x36d/0xc60 [46994.744548] [<ffffffff81683847>] inet_sendmsg+0xd7/0xf0 [46994.744548] [<ffffffff81683775>] ? inet_sendmsg+0x5/0xf0 [46994.744548] [<ffffffff815f2980>] sock_sendmsg+0x90/0xb0 [46994.744548] [<ffffffff811e4541>] ? __fget_light+0x61/0x80 [46994.744548] [<ffffffff811e4ee3>] ? __fdget+0x13/0x20 [46994.744548] [<ffffffff815f2aae>] SYSC_sendto+0x10e/0x150 [46994.744548] [<ffffffff811cab6f>] ? SYSC_newstat+0x2f/0x40 [46994.744548] [<ffffffff810db34e>] ? getnstimeofday64+0xe/0x30 [46994.744548] [<ffffffff813aa1fe>] ? trace_hardirqs_on_thunk+0x3a/0x3f [46994.744548] [<ffffffff815f3afe>] SyS_sendto+0xe/0x10 [46994.744548] [<ffffffff816e4e29>] system_call_fastpath+0x12/0x17 [46994.744548] FIX skbuff_fclone_cache: Restoring 0xffff8801eb7df056-0xf
fff8801eb7df056=0x6b
[46994.744548] FIX skbuff_fclone_cache: Marking all objects used [71820.156136] =============================================================================
[71820.156461] BUG skbuff_fclone_cache (Tainted: G B ): Poison overwritten
[71820.156461] -----------------------------------------------------------------------------
[71820.156461] INFO: 0xffff8801eb42e756-0xffff8801eb42e756. First byte 0x6f instead of 0x6b [71820.156461] INFO: Allocated in __alloc_skb+0x4e/0x240 age=11 cpu=3 pid=4181
[71820.156461] __slab_alloc+0x50a/0x563
[71820.156461] kmem_cache_alloc_node+0xfe/0x2a0
[71820.156461] __alloc_skb+0x4e/0x240
[71820.156461] sk_stream_alloc_skb+0x3d/0x110
[71820.156461] tcp_sendmsg+0x36d/0xc60
[71820.156461] inet_sendmsg+0xd7/0xf0
[71820.156461] sock_sendmsg+0x90/0xb0
[71820.156461] SYSC_sendto+0x10e/0x150
[71820.156461] SyS_sendto+0xe/0x10
[71820.156461] system_call_fastpath+0x12/0x17
[71820.156461] INFO: Freed in kfree_skbmem+0x6f/0xa0 age=30 cpu=3 pid=4181
[71820.156461] __slab_free+0x39/0x2a0
[71820.156461] kmem_cache_free+0x1ce/0x280
[71820.156461] kfree_skbmem+0x6f/0xa0
[71820.156461] __kfree_skb+0x1e/0x30
[71820.156461] tcp_ack+0x66e/0x11f0
[71820.156461] tcp_rcv_established+0x107/0x6e0
[71820.156461] tcp_v4_do_rcv+0xb4/0x330
[71820.156461] release_sock+0xfd/0x1f0
[71820.156461] tcp_sendmsg+0xa65/0xc60
[71820.156461] inet_sendmsg+0xd7/0xf0
[71820.156461] sock_sendmsg+0x90/0xb0
[71820.156461] SYSC_sendto+0x10e/0x150
[71820.156461] SyS_sendto+0xe/0x10
[71820.156461] system_call_fastpath+0x12/0x17
[71820.156461] INFO: Slab 0xffffea0007ad0a00 objects=42 used=42 fp=0x (null) flags=0x5ffe0000004080
[71820.156461] INFO: Object 0xffff8801eb42e600 @offset=26112 fp=0xffff8801eb42b600
[71820.156461] Bytes b4 ffff8801eb42e5f0: 48 1d 41 04 01 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a H.A.....ZZZZZZZZ [71820.156461] Object ffff8801eb42e600: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.156461] Object ffff8801eb42e610: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.156461] Object ffff8801eb42e620: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.156461] Object ffff8801eb42e630: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.156461] Object ffff8801eb42e640: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.156461] Object ffff8801eb42e650: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.156461] Object ffff8801eb42e660: 6b 6b 6b 6b 6b 6
b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.156461] Object ffff8801eb42e670: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.156461] Object ffff8801eb42e680: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e690: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e6a0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e6b0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e6c0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e6d0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820
.290941] Object ffff8801eb42e6e0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e6f0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e700: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e710: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e720: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e730: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e740: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e750: 6b 6b 6b 6b 6b 6b 6f 6
b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkokkkkkkkkk [71820.290941] Object ffff8801eb42e760: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e770: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e780: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e790: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71820.290941] Object ffff8801eb42e7a0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
[71820.290941] Object ffff8801eb42e7b0: 6b 6b 6b 6b 6b 6b 6b a5 kkkkkkk.
[71820.290941] Redzone ffff8801eb42e7b8: bb bb bb bb bb bb bb bb ........
[71820.290941] Padding ffff8801eb42e8f8: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ
[71820.290941] CPU: 3 PID: 4219 Comm: phantomjs Tainted: G B 3.18.0-rc3.x86_64-00116-g6ac94d3 #160
[71820.290941] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006 05/23/2012 [71820.290941] ffff8801eb42e600 ffff8800d1743c08 ffffffff816db38f 0000000000000000 [71820.290941] ffff8801fbd34e00 ffff8800d1743c48 ffffffff811a6187 0000000000000008 [71820.290941] ffff880100000001 ffff8801eb42e757 ffff8801fbd34e00 000000000000006b [71820.290941] Call Trace:
[71820.290941] [<ffffffff816db38f>] dump_stack+0x4e/0x68 [71820.290941] [<ffffffff811a6187>] print_trailer+0x1c7/0x1e0 [71820.290941] [<ffffffff811a6b7b>] check_bytes_and_report+0xbb/0x110 [71820.290941] [<ffffffff811a76ee>] check_object+0x10e/0x240 [71820.290941] [<ffffffff815fb11e>] ? __alloc_skb+0x4e/0x240 [71820.290941] [<ffffffff816d8b65>] alloc_debug_processing+0x76/0x118 [71820.290941] [<ffffffff816d981b>] __slab_alloc+0x50a/0x563 [71820.290941] [<ffffffff810b7f4d>] ? trace_hardirqs_on+0xd/0x10 [71820.290941] [<ffffffff815fb11e>] ? __alloc_skb+0x4e/0x240 [71820.290941] [<ffffffff811a9dbe>] kmem_cache_alloc_node+0xfe/0x2a0 [71820.290941] [<ffffffff815fb11e>] __alloc_skb+0x4e/0x240 [71820.290941] [<ffffffff81666caa>] tcp_send_fin+0x7a/0x1a0 [71820.290941] [<ffffffff81657f
e6>] tcp_shutdown+0x46/0x60 [71820.290941] [<ffffffff81682125>] inet_shutdown+0xb5/0x110 [71820.290941] [<ffffffff815f3d17>] SyS_shutdown+0x47/0x70 [71820.290941] [<ffffffff816e4e29>] system_call_fastpath+0x12/0x17 [71820.290941] FIX skbuff_fclone_cache: Restoring 0xffff8801eb42e756-0xffff8801eb42e756=0x6b
[71820.290941] FIX skbuff_fclone_cache: Marking all objects used
As I don't know where to file this I'm sending it to networking and Hyper-V people initially... If anyone can give tips on narrowing down the true cause that would be helpful. The workload is new and older kernels on Hyper-V hit other issues so bisection isn't an easy start...
--
Sitsofe | http://sucs.org/~sits/
^ permalink raw reply
* Re: [PATCH] stmmac: split to core library and probe drivers
From: David Miller @ 2014-11-11 19:35 UTC (permalink / raw)
To: andriy.shevchenko; +Cc: peppe.cavallaro, netdev, hock.leong.kweh, vbridgers2013
In-Reply-To: <1415615939-6671-1-git-send-email-andriy.shevchenko@linux.intel.com>
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Mon, 10 Nov 2014 12:38:59 +0200
> Instead of registering the platform and PCI drivers in one module let's move
> necessary bits to where it belongs. During this procedure we convert the module
> registration part to use module_*_driver() macros which makes code simplier.
>
> From now on the driver consists three parts: core library, PCI, and platform
> drivers.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied to net-next, thanks.
^ permalink raw reply
* Re: phy/micrel: KSZ8031RNL RMII clock reconfiguration bug
From: Johan Hovold @ 2014-11-11 19:41 UTC (permalink / raw)
To: Bruno Thomsen; +Cc: netdev, f.fainelli, s.hauer, bruno.thomsen, linux-kernel
In-Reply-To: <1412866094-4972-1-git-send-email-bth@kamstrup.dk>
Hi Bruno,
On Thu, Oct 09, 2014 at 04:48:14PM +0200, Bruno Thomsen wrote:
> Bug: Unable to send and receive Ethernet packets with Micrel PHY.
>
> Affected devices:
> KSZ8031RNL (commercial temp)
> KSZ8031RNLI (industrial temp)
>
> Description:
> PHY device is correctly detected during probe.
> PHY power-up default is 25MHz crystal clock input
> and output 50MHz RMII clock to MAC.
> Reconfiguration of PHY to input 50MHz RMII clock from MAC
> causes PHY to become unresponsive if clock source is changed
> after Operation Mode Strap Override (OMSO) register setup.
>
> Cause:
> Long lead times on parts where clock setup match circuit design
> forces the usage of similar parts with wrong default setup.
>
> Solution:
> Swapped KSZ8031 register setup and added phy_write return code validation.
>
> Tested with Freescale i.MX28 Fast Ethernet Controler (fec).
>
> Signed-off-by: Bruno Thomsen <bth@kamstrup.dk>
> ---
> drivers/net/phy/micrel.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 011dbda..ec3f646 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -194,8 +194,10 @@ static int ksz8021_config_init(struct phy_device *phydev)
> if (rc)
> dev_err(&phydev->dev, "failed to set led mode\n");
>
> - phy_write(phydev, MII_KSZPHY_OMSO, val);
> rc = ksz_config_flags(phydev);
> + if (rc < 0)
> + return rc;
> + rc = phy_write(phydev, MII_KSZPHY_OMSO, val);
> return rc < 0 ? rc : 0;
> }
As you may have seen by now, I've been working on refactoring the
micrel phy driver to be able to use common initialisation code.
Specifically, I've added generic support for disabling the broadcast
address, which is what the MII_KSZPHY_OMSO write above does.
Generally you want this to be the first thing you do in order to avoid
unnecessary reconfigurations. If we ever were to allow concurrent
probing this would also be a requirement.
Could you provide some detail about the setup were you find that the PHY
becomes unresponsive without your patch? Do you have more than one PHY
on the bus? Using what addresses? And using what clock modes (i.e. 25
MHz or 50 MHz)?
Also, what exactly do you mean by "unresponsive"? Are you still able to
read the PHY registers for example?
Thanks,
Johan
^ permalink raw reply
* Re: [PATCH v1 net-next 1/2] bonding: Expand speed type bits of the AD Port Key
From: Jay Vosburgh @ 2014-11-11 19:47 UTC (permalink / raw)
To: David Miller; +Cc: Jianhua.Xie, netdev, vfalico, andy
In-Reply-To: <20141111.135305.1647707440180670390.davem@davemloft.net>
David Miller <davem@davemloft.net> wrote:
>From: Xie Jianhua <Jianhua.Xie@freescale.com>
>Date: Mon, 10 Nov 2014 15:16:40 +0800
>
>> From: Jianhua Xie <Jianhua.Xie@freescale.com>
>>
>> Port Key was determined as 16 bits according to the link speed,
>> duplex and user key (which is yet not supported), in which key
>> speed was 5 bits for 1Mbps/10Mbps/100Mbps/1Gbps/10Gbps as below:
>> --------------------------------------------------------------
>> Port key :| User key | Speed | Duplex|
>> --------------------------------------------------------------
>> 16 6 1 0
>> This patch is expanding speed type from 5 bits to 9 bits for other
>> speed 2.5Gbps/20Gbps/40Gbps/56Gbps and shrinking user key from 10
>> bits to 6 bits. New Port Key looks like below:
>> --------------------------------------------------------------
>> Port key :| User key | Speed | Duplex|
>> --------------------------------------------------------------
>> 16 10 1 0
>>
>> CC: Jay Vosburgh <j.vosburgh@gmail.com>
>> CC: Veaceslav Falico <vfalico@gmail.com>
>> CC: Andy Gospodarek <andy@greyhouse.net>
>> CC: David S. Miller <davem@davemloft.net>
>>
>> Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com>
>
>Do we determine the layout of this value all ourselves?
Yes, we do. The precise format of the port key is not defined
by the standard; IEEE 802.1AX 5.3.5, "Capability identification":
"A given Key value is meaningful only in the context of the System that
allocates it; there is no global significance to Key values."
and
"When a System assigns an operational Key value to a set of ports, it
signifies that, in the absence of other constraints, the current
operational state of the set of ports allows any subset of that set of
ports (including the entire set) to be aggregated together from the
perspective of the System making the assignment."
So, basically, it's a magic cookie that indicates that all ports
on a particular system with the same key value are suitable to be
aggregated together.
>If not, then is it exported to anything user-visible that we
>might be breaking?
The key values are not user-visible, and the "user" settable
portion of the key has never been implemented.
>If it is private, it makes no sense to use a bitmask for the speed.
>We should instead change the field to be some numerically increasing
>value.
>
>Otherwise we'll run out of bits again and keep having to adjust the
>field layout more often than we really need to.
Agreed.
Also note that there are some internal dependencies within
bonding on the format; in particular the duplex bit in the key is used
to determine if a port is LACP-capable, and that functionality needs to
be preserved.
-J
---
-Jay Vosburgh, jay.vosburgh@canonical.com
^ permalink raw reply
* Re: [PATCH resent] net: ppp: Don't call bpf_prog_create() in ppp_lock
From: David Miller @ 2014-11-11 20:15 UTC (permalink / raw)
To: tiwai; +Cc: netdev, paulus, linux-ppp, stefan.seyfried
In-Reply-To: <1415616621-3481-1-git-send-email-tiwai@suse.de>
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 10 Nov 2014 11:50:21 +0100
> In ppp_ioctl(), bpf_prog_create() is called inside ppp_lock, which
> eventually calls vmalloc() and hits BUG_ON() in vmalloc.c. This patch
> works around the problem by moving the allocation outside the lock.
>
> The bug was revealed by the recent change in net/core/filter.c, as it
> allocates via vmalloc() instead of kmalloc() now.
>
> Reported-and-tested-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH net] net: sctp: fix NULL pointer dereference in af->from_addr_param on malformed packet
From: David Miller @ 2014-11-11 20:20 UTC (permalink / raw)
To: dborkman; +Cc: linux-sctp, netdev, vyasevich
In-Reply-To: <1415638466-20176-1-git-send-email-dborkman@redhat.com>
From: Daniel Borkmann <dborkman@redhat.com>
Date: Mon, 10 Nov 2014 17:54:26 +0100
> An SCTP server doing ASCONF will panic on malformed INIT ping-of-death
> in the form of:
>
> ------------ INIT[PARAM: SET_PRIMARY_IP] ------------>
>
> While the INIT chunk parameter verification dissects through many things
> in order to detect malformed input, it misses to actually check parameters
> inside of parameters. E.g. RFC5061, section 4.2.4 proposes a 'set primary
> IP address' parameter in ASCONF, which has as a subparameter an address
> parameter.
>
> So an attacker may send a parameter type other than SCTP_PARAM_IPV4_ADDRESS
> or SCTP_PARAM_IPV6_ADDRESS, param_type2af() will subsequently return 0
> and thus sctp_get_af_specific() returns NULL, too, which we then happily
> dereference unconditionally through af->from_addr_param().
>
> The trace for the log:
...
> A minimal way to address this is to check for NULL as we do on all
> other such occasions where we know sctp_get_af_specific() could
> possibly return with NULL.
>
> Fixes: d6de3097592b ("[SCTP]: Add the handling of "Set Primary IP Address" parameter to INIT")
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Cc: Vlad Yasevich <vyasevich@gmail.com>
Applied and queued up for -stable.
^ permalink raw reply
* Re: [PATCH net] net: sctp: fix memory leak in auth key management
From: David Miller @ 2014-11-11 20:20 UTC (permalink / raw)
To: dborkman; +Cc: linux-sctp, netdev, vyasevich
In-Reply-To: <1415638809-20288-1-git-send-email-dborkman@redhat.com>
From: Daniel Borkmann <dborkman@redhat.com>
Date: Mon, 10 Nov 2014 18:00:09 +0100
> A very minimal and simple user space application allocating an SCTP
> socket, setting SCTP_AUTH_KEY setsockopt(2) on it and then closing
> the socket again will leak the memory containing the authentication
> key from user space:
...
> This is bad because of two things, we can bring down a machine from
> user space when auth_enable=1, but also we would leave security sensitive
> keying material in memory without clearing it after use. The issue is
> that sctp_auth_create_key() already sets the refcount to 1, but after
> allocation sctp_auth_set_key() does an additional refcount on it, and
> thus leaving it around when we free the socket.
>
> Fixes: 65b07e5d0d0 ("[SCTP]: API updates to suport SCTP-AUTH extensions.")
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Cc: Vlad Yasevich <vyasevich@gmail.com>
Also applied and queued up for -stable, thanks again.
^ permalink raw reply
* Re: [PATCH] net: phy: Correctly handle MII ioctl which changes autonegotiation.
From: David Miller @ 2014-11-11 20:21 UTC (permalink / raw)
To: brian; +Cc: netdev
In-Reply-To: <546222F3.7080705@houston-radar.com>
From: Brian Hill <brian@houston-radar.com>
Date: Tue, 11 Nov 2014 07:53:39 -0700
>
> When advertised capabilities are changed with mii-tool, such as:
> mii-tool -A 10baseT
> the existing handler has two errors.
>
> - An actual PHY register value is provided by mii-tool, and this
> must be mapped to internal state with mii_adv_to_ethtool_adv_t().
> - The PHY state machine needs to be told that autonegotiation has
> again been performed. If not, the MAC will not be notified of
> the new link speed and duplex, resulting in a possible config
> mismatch.
>
> Signed-off-by: Brian Hill <Brian@houston-radar.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/phy/phy.c | 36 ++++++++++++++++++++++++------------
> 1 file changed, 24 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index c94e2a2..ee9f0c9 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -352,6 +352,7 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd)
> {
> struct mii_ioctl_data *mii_data = if_mii(ifr);
> u16 val = mii_data->val_in;
> + int change_autoneg = 0;
As Florian asked, please use bool/true/false for 'change_autoneg'.
^ permalink raw reply
* Re: [Patch net-next] net: remove netif_set_real_num_rx_queues()
From: David Miller @ 2014-11-11 20:22 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: ecree, netdev, eric.dumazet
In-Reply-To: <CAM_iQpVu63Ri4vsSfs_8NAH_ZmqtmGoPU8vjk-GLOJ6uQ5oBjQ@mail.gmail.com>
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 11 Nov 2014 09:07:29 -0800
> On Tue, Nov 11, 2014 at 5:10 AM, Edward Cree <ecree@solarflare.com> wrote:
>>> -static inline int netif_copy_real_num_queues(struct net_device *to_dev,
>>> - const struct net_device *from_dev)
>> Patch title says you're removing _set_ but body only removes _copy_.
>> Which one is right?
>
> Oops, my copy-n-paste error...
Please resubmit with fixed title, thanks.
^ permalink raw reply
* [PATCH v2 00/19] kselftest install target feature
From: Shuah Khan @ 2014-11-11 20:27 UTC (permalink / raw)
To: gregkh, akpm, mmarek, davem, keescook, tranmanphong, dh.herrmann,
hughd, bobby.prani, ebiederm, serge.hallyn
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
This patch series adds a new kselftest_install make target
to enable selftest install. When make kselftest_install is
run, selftests are installed on the system. A new install
target is added to selftests Makefile which will install
targets for the tests that are specified in INSTALL_TARGETS.
During install, a script is generated to run tests that are
installed. This script will be installed in the selftest install
directory. Individual test Makefiles are changed to add to the
script. This will allow new tests to add install and run test
commands to the generated kselftest script. kselftest target
now depends on kselftest_install and runs the generated kselftest
script to reduce duplicate work and for common look and feel when
running tests.
This v2 series addresses the duplicate code in install and
run_tests targets in individual test Makefiles.
Reference: https://lkml.org/lkml/2014/11/4/707
Dropped the following patch from the series since it has been
Acked and I queued it up for 3.19-rc1.
selftests/net: move test out of Makefile into a shell script
Reference: https://lkml.org/lkml/2014/11/4/794
Approach:
make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports path for ksefltest.sh
-- runs selftests make install target:
selftests make install target
-- creates kselftest.sh script in install install dir
-- runs install targets for all INSTALL_TARGETS
(Note: ftrace and powerpc aren't included in INSTALL_TARGETS,
to not add more content to patch v1 series. This work
will happen soon. In this series these two targets are
run after running the generated kselftest script, without
any regression in the way these tests are run with
"make kselftest" prior to this work.)
-- install target can be run only from top level source dir.
Individual test make install targets:
-- install test programs and/or scripts in install dir
-- append to the ksefltest.sh file to add commands to run test
-- install target can be run only from top level source dir.
Adds the following new ways to initiate selftests:
-- Installing and running kselftest from install directory
by running "make kselftest"
-- Running kselftest script from install directory
Maintains the following ways to run tests:
-- make -C tools/testing/selftests run_tests
-- make -C tools/testing/selftests TARGETS=target run_tests
Ability specify targets: e.g TARGETS=net
-- make run_tests from tools/testing/selftests
-- make run_tests from individual test directories:
e.g: make run_tests in tools/testing/selftests/breakpoints
Shuah Khan (19):
selftests/user: move test out of Makefile into a shell script
kbuild: kselftest_install - add a new make target to install selftests
selftests: add install target to enable installing selftests
selftests/breakpoints: add install target to enable installing test
selftests/cpu-hotplug: add install target to enable installing test
selftests/efivarfs: add install target to enable installing test
selftests/firmware: add install target to enable installing test
selftests/ipc: add install target to enable installing test
selftests/kcmp: add install target to enable installing test
selftests/memfd: add install target to enable installing test
selftests/memory-hotplug: add install target to enable installing test
selftests/mount: add install target to enable installing test
selftests/mqueue: add install target to enable installing test
selftests/net: add install target to enable installing test
selftests/ptrace: add install target to enable installing test
selftests/sysctl: add install target to enable installing test
selftests/timers: add install target to enable installing test
selftests/vm: add install target to enable installing test
selftests/user: add install target to enable installing test
Makefile | 21 +-
tools/testing/selftests/Makefile | 31 ++-
tools/testing/selftests/breakpoints/Makefile | 22 +-
tools/testing/selftests/cpu-hotplug/Makefile | 17 +-
.../selftests/cpu-hotplug/cpu-on-off-test.sh | 269 +++++++++++++++++++++
tools/testing/selftests/cpu-hotplug/on-off-test.sh | 269 ---------------------
tools/testing/selftests/efivarfs/Makefile | 19 +-
tools/testing/selftests/firmware/Makefile | 49 ++--
tools/testing/selftests/ipc/Makefile | 22 +-
tools/testing/selftests/kcmp/Makefile | 22 +-
tools/testing/selftests/memfd/Makefile | 20 +-
tools/testing/selftests/memory-hotplug/Makefile | 17 +-
.../selftests/memory-hotplug/mem-on-off-test.sh | 238 ++++++++++++++++++
.../selftests/memory-hotplug/on-off-test.sh | 238 ------------------
tools/testing/selftests/mount/Makefile | 15 +-
tools/testing/selftests/mqueue/Makefile | 20 +-
tools/testing/selftests/net/Makefile | 23 +-
tools/testing/selftests/ptrace/Makefile | 19 +-
tools/testing/selftests/sysctl/Makefile | 23 +-
tools/testing/selftests/timers/Makefile | 15 +-
tools/testing/selftests/user/Makefile | 21 +-
tools/testing/selftests/user/test_user_copy.sh | 10 +
tools/testing/selftests/vm/Makefile | 14 +-
23 files changed, 853 insertions(+), 561 deletions(-)
create mode 100644 tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
delete mode 100644 tools/testing/selftests/cpu-hotplug/on-off-test.sh
create mode 100644 tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
delete mode 100644 tools/testing/selftests/memory-hotplug/on-off-test.sh
create mode 100755 tools/testing/selftests/user/test_user_copy.sh
--
1.9.1
^ permalink raw reply
* [PATCH v2 01/19] selftests/user: move test out of Makefile into a shell script
From: Shuah Khan @ 2014-11-11 20:27 UTC (permalink / raw)
To: gregkh, akpm, mmarek, davem, keescook, tranmanphong, dh.herrmann,
hughd, bobby.prani, ebiederm, serge.hallyn
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1415735831.git.shuahkh@osg.samsung.com>
Currently user copy test is run from the Makefile. Move it out
of the Makefile to be run from a shell script to allow the test
to be run as stand-alone test, in addition to allowing the test
run from a make target.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/user/Makefile | 8 +-------
tools/testing/selftests/user/test_user_copy.sh | 10 ++++++++++
2 files changed, 11 insertions(+), 7 deletions(-)
create mode 100755 tools/testing/selftests/user/test_user_copy.sh
diff --git a/tools/testing/selftests/user/Makefile b/tools/testing/selftests/user/Makefile
index 396255b..12c9d15 100644
--- a/tools/testing/selftests/user/Makefile
+++ b/tools/testing/selftests/user/Makefile
@@ -4,10 +4,4 @@
all:
run_tests: all
- @if /sbin/modprobe test_user_copy ; then \
- rmmod test_user_copy; \
- echo "user_copy: ok"; \
- else \
- echo "user_copy: [FAIL]"; \
- exit 1; \
- fi
+ ./test_user_copy.sh
diff --git a/tools/testing/selftests/user/test_user_copy.sh b/tools/testing/selftests/user/test_user_copy.sh
new file mode 100755
index 0000000..350107f
--- /dev/null
+++ b/tools/testing/selftests/user/test_user_copy.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Runs copy_to/from_user infrastructure using test_user_copy kernel module
+
+if /sbin/modprobe -q test_user_copy; then
+ /sbin/modprobe -q -r test_user_copy
+ echo "user_copy: ok"
+else
+ echo "user_copy: [FAIL]"
+ exit 1
+fi
--
1.9.1
^ permalink raw reply related
* [PATCH v2 02/19] kbuild: kselftest_install - add a new make target to install selftests
From: Shuah Khan @ 2014-11-11 20:27 UTC (permalink / raw)
To: gregkh, akpm, mmarek, davem, keescook, tranmanphong, dh.herrmann,
hughd, bobby.prani, ebiederm, serge.hallyn
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1415735831.git.shuahkh@osg.samsung.com>
Add a new make target to install to install kernel selftests.
This new target will build and install selftests. kselftest
target now depends on kselftest_install and runs the generated
kselftest script to reduce duplicate work and for common look
and feel when running tests.
Approach:
make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports path for ksefltest.sh
-- runs selftests make install target:
selftests make install target
-- creates kselftest.sh script in install install dir
-- runs install targets for all INSTALL_TARGETS
(Note: ftrace and powerpc aren't included in INSTALL_TARGETS,
to not add more content to patch v1 series. This work
will happen soon. In this series these two targets are
run after running the generated kselftest script, without
any regression in the way these tests are run with
"make kselftest" prior to this work.)
-- install target can be run only from top level source dir.
Individual test make install targets:
-- install test programs and/or scripts in install dir
-- append to the ksefltest.sh file to add commands to run test
-- install target can be run only from top level source dir.
Adds the following new ways to initiate selftests:
-- Installing and running kselftest from install directory
by running "make kselftest"
-- Running kselftest script from install directory
Maintains the following ways to run tests:
-- make -C tools/testing/selftests run_tests
-- make -C tools/testing/selftests TARGETS=target run_tests
Ability specify targets: e.g TARGETS=net
-- make run_tests from tools/testing/selftests
-- make run_tests from individual test directories:
e.g: make run_tests in tools/testing/selftests/breakpoints
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
Makefile | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 05d67af..ccbd2e1 100644
--- a/Makefile
+++ b/Makefile
@@ -1071,12 +1071,26 @@ headers_check: headers_install
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
# ---------------------------------------------------------------------------
-# Kernel selftest
+# Kernel selftest targets
+
+PHONY += __kselftest_configure
+INSTALL_KSFT_PATH=$(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
+export INSTALL_KSFT_PATH
+KSELFTEST=$(INSTALL_KSFT_PATH)/kselftest.sh
+export KSELFTEST
PHONY += kselftest
-kselftest:
+kselftest: kselftest_install
$(Q)$(MAKE) -C tools/testing/selftests run_tests
+# Kernel selftest install
+
+PHONY += kselftest_install
+kselftest_install: __kselftest_configure
+ @rm -rf $(INSTALL_KSFT_PATH)
+ @mkdir -p $(INSTALL_KSFT_PATH)
+ $(Q)$(MAKE) -C tools/testing/selftests install
+
# ---------------------------------------------------------------------------
# Modules
@@ -1285,6 +1299,9 @@ help:
@echo ' Build, install, and boot kernel before'
@echo ' running kselftest on it'
@echo ''
+ @echo ' kselftest_install - Install Kselftests to INSTALL_KSFT_PATH'
+ @echo ' default: $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)'
+ @echo ''
@echo 'Kernel packaging:'
@$(MAKE) $(build)=$(package-dir) help
@echo ''
--
1.9.1
^ permalink raw reply related
* [PATCH v2 03/19] selftests: add install target to enable installing selftests
From: Shuah Khan @ 2014-11-11 20:27 UTC (permalink / raw)
To: gregkh, akpm, mmarek, davem, keescook, tranmanphong, dh.herrmann,
hughd, bobby.prani, ebiederm, serge.hallyn
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1415735831.git.shuahkh@osg.samsung.com>
Add a new make target to enable installing selftests. This
new target will call install targets for the tests that are
specified in INSTALL_TARGETS. During install, a script is
generated to run tests that are installed. This script will
be installed in the selftest install directory. Individual
test Makefiles are changed to add to the script. This will
allow new tests to add install and run test commands to the
generated kselftest script. run_tests target runs the
generated kselftest script to run tests when it is initiated
from from "make kselftest" from top level source directory.
Approach:
make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports path for ksefltest.sh
-- runs selftests make install target:
selftests make install target
-- creates kselftest.sh script in install install dir
-- runs install targets for all INSTALL_TARGETS
(Note: ftrace and powerpc aren't included in INSTALL_TARGETS,
to not add more content to patch v1 series. This work
will happen soon. In this series these two targets are
run after running the generated kselftest script, without
any regression in the way these tests are run with
"make kselftest" prior to this work.)
-- install target can be run only from top level source dir.
Individual test make install targets:
-- install test programs and/or scripts in install dir
-- append to the ksefltest.sh file to add commands to run test
-- install target can be run only from top level source dir.
Adds the following new ways to initiate selftests:
-- Installing and running kselftest from install directory
by running "make kselftest"
-- Running kselftest script from install directory
Maintains the following ways to run tests:
-- make -C tools/testing/selftests run_tests
-- make -C tools/testing/selftests TARGETS=target run_tests
Ability specify targets: e.g TARGETS=net
-- make run_tests from tools/testing/selftests
-- make run_tests from individual test directories:
e.g: make run_tests in tools/testing/selftests/breakpoints
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/Makefile | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 45f145c..b9bdc1d 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -16,6 +16,10 @@ TARGETS += sysctl
TARGETS += firmware
TARGETS += ftrace
+INSTALL_TARGETS = breakpoints cpu-hotplug efivarfs firmware ipc
+INSTALL_TARGETS += kcmp memfd memory-hotplug mqueue mount net
+INSTALL_TARGETS += ptrace sysctl timers user vm
+
TARGETS_HOTPLUG = cpu-hotplug
TARGETS_HOTPLUG += memory-hotplug
@@ -24,10 +28,35 @@ all:
make -C $$TARGET; \
done;
-run_tests: all
+install:
+ifdef INSTALL_KSFT_PATH
+ make all
+ @echo #!/bin/sh\n# Kselftest Run Tests .... >> $(KSELFTEST)
+ @echo # This file is generated during kselftest_install >> $(KSELFTEST)
+ @echo # Please don't change it !!\n >> $(KSELFTEST)
+ @echo echo ============================== >> $(KSELFTEST)
+ for TARGET in $(INSTALL_TARGETS); do \
+ echo Installing $$TARGET; \
+ make -C $$TARGET install; \
+ done;
+ chmod +x $(KSELFTEST)
+else
+ @echo Run make kselftest_install in top level source directory
+endif
+
+run_tests:
+ifdef INSTALL_KSFT_PATH
+ @cd $(INSTALL_KSFT_PATH); ./kselftest.sh; cd -
+# TODO: include ftrace and powerpc in install targets
+ for TARGET in ftrace powerpc; do \
+ make -C $$TARGET run_tests; \
+ done;
+else
+ make all
for TARGET in $(TARGETS); do \
make -C $$TARGET run_tests; \
done;
+endif
hotplug:
for TARGET in $(TARGETS_HOTPLUG); do \
--
1.9.1
^ permalink raw reply related
* [PATCH v2 04/19] selftests/breakpoints: add install target to enable installing test
From: Shuah Khan @ 2014-11-11 20:27 UTC (permalink / raw)
To: gregkh, akpm, mmarek, davem, keescook, tranmanphong, dh.herrmann,
hughd, bobby.prani, ebiederm, serge.hallyn
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1415735831.git.shuahkh@osg.samsung.com>
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level source dir.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/breakpoints/Makefile | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/breakpoints/Makefile b/tools/testing/selftests/breakpoints/Makefile
index e18b42b..9a70aeb 100644
--- a/tools/testing/selftests/breakpoints/Makefile
+++ b/tools/testing/selftests/breakpoints/Makefile
@@ -8,6 +8,7 @@ ifeq ($(ARCH),x86_64)
ARCH := x86
endif
+TEST_STR = ./breakpoint_test || echo breakpoints selftests: [FAIL]
all:
ifeq ($(ARCH),x86)
@@ -16,8 +17,25 @@ else
echo "Not an x86 target, can't build breakpoints selftests"
endif
-run_tests:
- @./breakpoint_test || echo "breakpoints selftests: [FAIL]"
+install:
+ifdef INSTALL_KSFT_PATH
+ifeq ($(ARCH),x86)
+ install ./breakpoint_test $(INSTALL_KSFT_PATH)
+ @echo echo Start breakpoints test .... >> $(KSELFTEST)
+ @echo "$(TEST_STR)" >> $(KSELFTEST)
+ @echo echo End breakpoints test .... >> $(KSELFTEST)
+ @echo echo ============================== >> $(KSELFTEST)
+else
+ @echo Not an x86 target, unable to install breakpoints selftests
+endif
+else
+ @echo Run make kselftest_install in top level source directory
+endif
+
+run_tests: all
+ifeq ($(ARCH),x86)
+ @$(TEST_STR)
+endif
clean:
rm -fr breakpoint_test
--
1.9.1
^ permalink raw reply related
* [PATCH v2 05/19] selftests/cpu-hotplug: add install target to enable installing test
From: Shuah Khan @ 2014-11-11 20:27 UTC (permalink / raw)
To: gregkh, akpm, mmarek, davem, keescook, tranmanphong, dh.herrmann,
hughd, bobby.prani, ebiederm, serge.hallyn
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1415735831.git.shuahkh@osg.samsung.com>
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level source dir.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/cpu-hotplug/Makefile | 17 +-
.../selftests/cpu-hotplug/cpu-on-off-test.sh | 269 +++++++++++++++++++++
tools/testing/selftests/cpu-hotplug/on-off-test.sh | 269 ---------------------
3 files changed, 284 insertions(+), 271 deletions(-)
create mode 100644 tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
delete mode 100644 tools/testing/selftests/cpu-hotplug/on-off-test.sh
diff --git a/tools/testing/selftests/cpu-hotplug/Makefile b/tools/testing/selftests/cpu-hotplug/Makefile
index e9c28d8..1bdcfc3 100644
--- a/tools/testing/selftests/cpu-hotplug/Makefile
+++ b/tools/testing/selftests/cpu-hotplug/Makefile
@@ -1,9 +1,22 @@
+TEST_STR=/bin/bash ./cpu-on-off-test.sh || echo cpu-hotplug selftests: [FAIL]
+
all:
+install:
+ifdef INSTALL_KSFT_PATH
+ install ./cpu-on-off-test.sh $(INSTALL_KSFT_PATH)/cpu-on-off-test.sh
+ @echo echo Start cpu hotplug test .... >> $(KSELFTEST)
+ @echo "$(TEST_STR)" >> $(KSELFTEST)
+ @echo echo End cpu hotplug test .... >> $(KSELFTEST)
+ @echo echo ============================== >> $(KSELFTEST)
+else
+ @echo Run make kselftest_install in top level source directory
+endif
+
run_tests:
- @/bin/bash ./on-off-test.sh || echo "cpu-hotplug selftests: [FAIL]"
+ @$(TEST_STR)
run_full_test:
- @/bin/bash ./on-off-test.sh -a || echo "cpu-hotplug selftests: [FAIL]"
+ @/bin/bash ./cpu-on-off-test.sh -a || echo "cpu-hotplug selftests: [FAIL]"
clean:
diff --git a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
new file mode 100644
index 0000000..98b1d65
--- /dev/null
+++ b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
@@ -0,0 +1,269 @@
+#!/bin/bash
+
+SYSFS=
+
+prerequisite()
+{
+ msg="skip all tests:"
+
+ if [ $UID != 0 ]; then
+ echo $msg must be run as root >&2
+ exit 0
+ fi
+
+ taskset -p 01 $$
+
+ SYSFS=`mount -t sysfs | head -1 | awk '{ print $3 }'`
+
+ if [ ! -d "$SYSFS" ]; then
+ echo $msg sysfs is not mounted >&2
+ exit 0
+ fi
+
+ if ! ls $SYSFS/devices/system/cpu/cpu* > /dev/null 2>&1; then
+ echo $msg cpu hotplug is not supported >&2
+ exit 0
+ fi
+
+ echo "CPU online/offline summary:"
+ online_cpus=`cat $SYSFS/devices/system/cpu/online`
+ online_max=${online_cpus##*-}
+ echo -e "\t Cpus in online state: $online_cpus"
+
+ offline_cpus=`cat $SYSFS/devices/system/cpu/offline`
+ if [[ "a$offline_cpus" = "a" ]]; then
+ offline_cpus=0
+ else
+ offline_max=${offline_cpus##*-}
+ fi
+ echo -e "\t Cpus in offline state: $offline_cpus"
+}
+
+#
+# list all hot-pluggable CPUs
+#
+hotpluggable_cpus()
+{
+ local state=${1:-.\*}
+
+ for cpu in $SYSFS/devices/system/cpu/cpu*; do
+ if [ -f $cpu/online ] && grep -q $state $cpu/online; then
+ echo ${cpu##/*/cpu}
+ fi
+ done
+}
+
+hotplaggable_offline_cpus()
+{
+ hotpluggable_cpus 0
+}
+
+hotpluggable_online_cpus()
+{
+ hotpluggable_cpus 1
+}
+
+cpu_is_online()
+{
+ grep -q 1 $SYSFS/devices/system/cpu/cpu$1/online
+}
+
+cpu_is_offline()
+{
+ grep -q 0 $SYSFS/devices/system/cpu/cpu$1/online
+}
+
+online_cpu()
+{
+ echo 1 > $SYSFS/devices/system/cpu/cpu$1/online
+}
+
+offline_cpu()
+{
+ echo 0 > $SYSFS/devices/system/cpu/cpu$1/online
+}
+
+online_cpu_expect_success()
+{
+ local cpu=$1
+
+ if ! online_cpu $cpu; then
+ echo $FUNCNAME $cpu: unexpected fail >&2
+ elif ! cpu_is_online $cpu; then
+ echo $FUNCNAME $cpu: unexpected offline >&2
+ fi
+}
+
+online_cpu_expect_fail()
+{
+ local cpu=$1
+
+ if online_cpu $cpu 2> /dev/null; then
+ echo $FUNCNAME $cpu: unexpected success >&2
+ elif ! cpu_is_offline $cpu; then
+ echo $FUNCNAME $cpu: unexpected online >&2
+ fi
+}
+
+offline_cpu_expect_success()
+{
+ local cpu=$1
+
+ if ! offline_cpu $cpu; then
+ echo $FUNCNAME $cpu: unexpected fail >&2
+ elif ! cpu_is_offline $cpu; then
+ echo $FUNCNAME $cpu: unexpected offline >&2
+ fi
+}
+
+offline_cpu_expect_fail()
+{
+ local cpu=$1
+
+ if offline_cpu $cpu 2> /dev/null; then
+ echo $FUNCNAME $cpu: unexpected success >&2
+ elif ! cpu_is_online $cpu; then
+ echo $FUNCNAME $cpu: unexpected offline >&2
+ fi
+}
+
+error=-12
+allcpus=0
+priority=0
+online_cpus=0
+online_max=0
+offline_cpus=0
+offline_max=0
+
+while getopts e:ahp: opt; do
+ case $opt in
+ e)
+ error=$OPTARG
+ ;;
+ a)
+ allcpus=1
+ ;;
+ h)
+ echo "Usage $0 [ -a ] [ -e errno ] [ -p notifier-priority ]"
+ echo -e "\t default offline one cpu"
+ echo -e "\t run with -a option to offline all cpus"
+ exit
+ ;;
+ p)
+ priority=$OPTARG
+ ;;
+ esac
+done
+
+if ! [ "$error" -ge -4095 -a "$error" -lt 0 ]; then
+ echo "error code must be -4095 <= errno < 0" >&2
+ exit 1
+fi
+
+prerequisite
+
+#
+# Safe test (default) - offline and online one cpu
+#
+if [ $allcpus -eq 0 ]; then
+ echo "Limited scope test: one hotplug cpu"
+ echo -e "\t (leaves cpu in the original state):"
+ echo -e "\t online to offline to online: cpu $online_max"
+ offline_cpu_expect_success $online_max
+ online_cpu_expect_success $online_max
+
+ if [[ $offline_cpus -gt 0 ]]; then
+ echo -e "\t offline to online to offline: cpu $offline_max"
+ online_cpu_expect_success $offline_max
+ offline_cpu_expect_success $offline_max
+ fi
+ exit 0
+else
+ echo "Full scope test: all hotplug cpus"
+ echo -e "\t online all offline cpus"
+ echo -e "\t offline all online cpus"
+ echo -e "\t online all offline cpus"
+fi
+
+#
+# Online all hot-pluggable CPUs
+#
+for cpu in `hotplaggable_offline_cpus`; do
+ online_cpu_expect_success $cpu
+done
+
+#
+# Offline all hot-pluggable CPUs
+#
+for cpu in `hotpluggable_online_cpus`; do
+ offline_cpu_expect_success $cpu
+done
+
+#
+# Online all hot-pluggable CPUs again
+#
+for cpu in `hotplaggable_offline_cpus`; do
+ online_cpu_expect_success $cpu
+done
+
+#
+# Test with cpu notifier error injection
+#
+
+DEBUGFS=`mount -t debugfs | head -1 | awk '{ print $3 }'`
+NOTIFIER_ERR_INJECT_DIR=$DEBUGFS/notifier-error-inject/cpu
+
+prerequisite_extra()
+{
+ msg="skip extra tests:"
+
+ /sbin/modprobe -q -r cpu-notifier-error-inject
+ /sbin/modprobe -q cpu-notifier-error-inject priority=$priority
+
+ if [ ! -d "$DEBUGFS" ]; then
+ echo $msg debugfs is not mounted >&2
+ exit 0
+ fi
+
+ if [ ! -d $NOTIFIER_ERR_INJECT_DIR ]; then
+ echo $msg cpu-notifier-error-inject module is not available >&2
+ exit 0
+ fi
+}
+
+prerequisite_extra
+
+#
+# Offline all hot-pluggable CPUs
+#
+echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_DOWN_PREPARE/error
+for cpu in `hotpluggable_online_cpus`; do
+ offline_cpu_expect_success $cpu
+done
+
+#
+# Test CPU hot-add error handling (offline => online)
+#
+echo $error > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_UP_PREPARE/error
+for cpu in `hotplaggable_offline_cpus`; do
+ online_cpu_expect_fail $cpu
+done
+
+#
+# Online all hot-pluggable CPUs
+#
+echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_UP_PREPARE/error
+for cpu in `hotplaggable_offline_cpus`; do
+ online_cpu_expect_success $cpu
+done
+
+#
+# Test CPU hot-remove error handling (online => offline)
+#
+echo $error > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_DOWN_PREPARE/error
+for cpu in `hotpluggable_online_cpus`; do
+ offline_cpu_expect_fail $cpu
+done
+
+echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_DOWN_PREPARE/error
+/sbin/modprobe -q -r cpu-notifier-error-inject
diff --git a/tools/testing/selftests/cpu-hotplug/on-off-test.sh b/tools/testing/selftests/cpu-hotplug/on-off-test.sh
deleted file mode 100644
index 98b1d65..0000000
--- a/tools/testing/selftests/cpu-hotplug/on-off-test.sh
+++ /dev/null
@@ -1,269 +0,0 @@
-#!/bin/bash
-
-SYSFS=
-
-prerequisite()
-{
- msg="skip all tests:"
-
- if [ $UID != 0 ]; then
- echo $msg must be run as root >&2
- exit 0
- fi
-
- taskset -p 01 $$
-
- SYSFS=`mount -t sysfs | head -1 | awk '{ print $3 }'`
-
- if [ ! -d "$SYSFS" ]; then
- echo $msg sysfs is not mounted >&2
- exit 0
- fi
-
- if ! ls $SYSFS/devices/system/cpu/cpu* > /dev/null 2>&1; then
- echo $msg cpu hotplug is not supported >&2
- exit 0
- fi
-
- echo "CPU online/offline summary:"
- online_cpus=`cat $SYSFS/devices/system/cpu/online`
- online_max=${online_cpus##*-}
- echo -e "\t Cpus in online state: $online_cpus"
-
- offline_cpus=`cat $SYSFS/devices/system/cpu/offline`
- if [[ "a$offline_cpus" = "a" ]]; then
- offline_cpus=0
- else
- offline_max=${offline_cpus##*-}
- fi
- echo -e "\t Cpus in offline state: $offline_cpus"
-}
-
-#
-# list all hot-pluggable CPUs
-#
-hotpluggable_cpus()
-{
- local state=${1:-.\*}
-
- for cpu in $SYSFS/devices/system/cpu/cpu*; do
- if [ -f $cpu/online ] && grep -q $state $cpu/online; then
- echo ${cpu##/*/cpu}
- fi
- done
-}
-
-hotplaggable_offline_cpus()
-{
- hotpluggable_cpus 0
-}
-
-hotpluggable_online_cpus()
-{
- hotpluggable_cpus 1
-}
-
-cpu_is_online()
-{
- grep -q 1 $SYSFS/devices/system/cpu/cpu$1/online
-}
-
-cpu_is_offline()
-{
- grep -q 0 $SYSFS/devices/system/cpu/cpu$1/online
-}
-
-online_cpu()
-{
- echo 1 > $SYSFS/devices/system/cpu/cpu$1/online
-}
-
-offline_cpu()
-{
- echo 0 > $SYSFS/devices/system/cpu/cpu$1/online
-}
-
-online_cpu_expect_success()
-{
- local cpu=$1
-
- if ! online_cpu $cpu; then
- echo $FUNCNAME $cpu: unexpected fail >&2
- elif ! cpu_is_online $cpu; then
- echo $FUNCNAME $cpu: unexpected offline >&2
- fi
-}
-
-online_cpu_expect_fail()
-{
- local cpu=$1
-
- if online_cpu $cpu 2> /dev/null; then
- echo $FUNCNAME $cpu: unexpected success >&2
- elif ! cpu_is_offline $cpu; then
- echo $FUNCNAME $cpu: unexpected online >&2
- fi
-}
-
-offline_cpu_expect_success()
-{
- local cpu=$1
-
- if ! offline_cpu $cpu; then
- echo $FUNCNAME $cpu: unexpected fail >&2
- elif ! cpu_is_offline $cpu; then
- echo $FUNCNAME $cpu: unexpected offline >&2
- fi
-}
-
-offline_cpu_expect_fail()
-{
- local cpu=$1
-
- if offline_cpu $cpu 2> /dev/null; then
- echo $FUNCNAME $cpu: unexpected success >&2
- elif ! cpu_is_online $cpu; then
- echo $FUNCNAME $cpu: unexpected offline >&2
- fi
-}
-
-error=-12
-allcpus=0
-priority=0
-online_cpus=0
-online_max=0
-offline_cpus=0
-offline_max=0
-
-while getopts e:ahp: opt; do
- case $opt in
- e)
- error=$OPTARG
- ;;
- a)
- allcpus=1
- ;;
- h)
- echo "Usage $0 [ -a ] [ -e errno ] [ -p notifier-priority ]"
- echo -e "\t default offline one cpu"
- echo -e "\t run with -a option to offline all cpus"
- exit
- ;;
- p)
- priority=$OPTARG
- ;;
- esac
-done
-
-if ! [ "$error" -ge -4095 -a "$error" -lt 0 ]; then
- echo "error code must be -4095 <= errno < 0" >&2
- exit 1
-fi
-
-prerequisite
-
-#
-# Safe test (default) - offline and online one cpu
-#
-if [ $allcpus -eq 0 ]; then
- echo "Limited scope test: one hotplug cpu"
- echo -e "\t (leaves cpu in the original state):"
- echo -e "\t online to offline to online: cpu $online_max"
- offline_cpu_expect_success $online_max
- online_cpu_expect_success $online_max
-
- if [[ $offline_cpus -gt 0 ]]; then
- echo -e "\t offline to online to offline: cpu $offline_max"
- online_cpu_expect_success $offline_max
- offline_cpu_expect_success $offline_max
- fi
- exit 0
-else
- echo "Full scope test: all hotplug cpus"
- echo -e "\t online all offline cpus"
- echo -e "\t offline all online cpus"
- echo -e "\t online all offline cpus"
-fi
-
-#
-# Online all hot-pluggable CPUs
-#
-for cpu in `hotplaggable_offline_cpus`; do
- online_cpu_expect_success $cpu
-done
-
-#
-# Offline all hot-pluggable CPUs
-#
-for cpu in `hotpluggable_online_cpus`; do
- offline_cpu_expect_success $cpu
-done
-
-#
-# Online all hot-pluggable CPUs again
-#
-for cpu in `hotplaggable_offline_cpus`; do
- online_cpu_expect_success $cpu
-done
-
-#
-# Test with cpu notifier error injection
-#
-
-DEBUGFS=`mount -t debugfs | head -1 | awk '{ print $3 }'`
-NOTIFIER_ERR_INJECT_DIR=$DEBUGFS/notifier-error-inject/cpu
-
-prerequisite_extra()
-{
- msg="skip extra tests:"
-
- /sbin/modprobe -q -r cpu-notifier-error-inject
- /sbin/modprobe -q cpu-notifier-error-inject priority=$priority
-
- if [ ! -d "$DEBUGFS" ]; then
- echo $msg debugfs is not mounted >&2
- exit 0
- fi
-
- if [ ! -d $NOTIFIER_ERR_INJECT_DIR ]; then
- echo $msg cpu-notifier-error-inject module is not available >&2
- exit 0
- fi
-}
-
-prerequisite_extra
-
-#
-# Offline all hot-pluggable CPUs
-#
-echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_DOWN_PREPARE/error
-for cpu in `hotpluggable_online_cpus`; do
- offline_cpu_expect_success $cpu
-done
-
-#
-# Test CPU hot-add error handling (offline => online)
-#
-echo $error > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_UP_PREPARE/error
-for cpu in `hotplaggable_offline_cpus`; do
- online_cpu_expect_fail $cpu
-done
-
-#
-# Online all hot-pluggable CPUs
-#
-echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_UP_PREPARE/error
-for cpu in `hotplaggable_offline_cpus`; do
- online_cpu_expect_success $cpu
-done
-
-#
-# Test CPU hot-remove error handling (online => offline)
-#
-echo $error > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_DOWN_PREPARE/error
-for cpu in `hotpluggable_online_cpus`; do
- offline_cpu_expect_fail $cpu
-done
-
-echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_DOWN_PREPARE/error
-/sbin/modprobe -q -r cpu-notifier-error-inject
--
1.9.1
^ permalink raw reply related
* [PATCH v2 06/19] selftests/efivarfs: add install target to enable installing test
From: Shuah Khan @ 2014-11-11 20:27 UTC (permalink / raw)
To: gregkh, akpm, mmarek, davem, keescook, tranmanphong, dh.herrmann,
hughd, bobby.prani, ebiederm, serge.hallyn
Cc: Shuah Khan, linux-kbuild, linux-kernel, linux-api, netdev
In-Reply-To: <cover.1415735831.git.shuahkh@osg.samsung.com>
Add a new make target to enable installing test. This target
installs test in the kselftest install location and add to the
kselftest script to run the test. Install target can be run
only from top level source dir.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/efivarfs/Makefile | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/efivarfs/Makefile b/tools/testing/selftests/efivarfs/Makefile
index 29e8c6b..d34c4c2 100644
--- a/tools/testing/selftests/efivarfs/Makefile
+++ b/tools/testing/selftests/efivarfs/Makefile
@@ -3,10 +3,25 @@ CFLAGS = -Wall
test_objs = open-unlink create-read
-all: $(test_objs)
+TEST_STR = /bin/bash ./efivarfs.sh || echo efivarfs selftests: [FAIL]
+
+all:
+ gcc open-unlink.c -o open-unlink
+ gcc create-read.c -o create-read
+
+install:
+ifdef INSTALL_KSFT_PATH
+ install ./efivarfs.sh $(test_objs) $(INSTALL_KSFT_PATH)
+ @echo echo Start efivarfs test .... >> $(KSELFTEST)
+ @echo "$(TEST_STR)" >> $(KSELFTEST)
+ @echo echo End efivarfs test .... >> $(KSELFTEST)
+ @echo echo ============================== >> $(KSELFTEST)
+else
+ @echo Run make kselftest_install in top level source directory
+endif
run_tests: all
- @/bin/bash ./efivarfs.sh || echo "efivarfs selftests: [FAIL]"
+ @$(TEST_STR)
clean:
rm -f $(test_objs)
--
1.9.1
^ permalink raw reply related
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