* [PATCH] net: fix section mismatches
From: Michał Mirosław @ 2011-04-18 23:31 UTC (permalink / raw)
To: netdev
Cc: Steffen Klassert, Jaroslav Kysela, Samuel Ortiz, Grant Grundler,
David Miller
Fix build warnings like the following:
WARNING: drivers/net/built-in.o(.data+0x12434): Section mismatch in reference from the variable madgemc_driver to the variable .init.data:madgemc_adapter_ids
And add some consts to EISA device ID tables along the way.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
This is what I now use to keep all those section mismatch warnings from
clobbering my build log that kept me from noticing more important warnings.
Please accept or ignore as you see fit.
Thanks,
Michał Mirosław
---
drivers/net/3c509.c | 14 ++++++------
drivers/net/3c59x.c | 4 +-
drivers/net/depca.c | 35 ++++++++++++++++---------------
drivers/net/hp100.c | 12 +++++-----
drivers/net/ibmlana.c | 4 +-
drivers/net/irda/smsc-ircc2.c | 44 +++++++++++++++++++-------------------
drivers/net/ne3210.c | 15 ++++++++-----
drivers/net/smc-mca.c | 6 ++--
drivers/net/tokenring/madgemc.c | 2 +-
drivers/net/tulip/de4x5.c | 4 +-
10 files changed, 72 insertions(+), 68 deletions(-)
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index 91abb96..cb39ded 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -185,7 +185,7 @@ static int max_interrupt_work = 10;
static int nopnp;
#endif
-static int __devinit el3_common_init(struct net_device *dev);
+static int el3_common_init(struct net_device *dev);
static void el3_common_remove(struct net_device *dev);
static ushort id_read_eeprom(int index);
static ushort read_eeprom(int ioaddr, int index);
@@ -395,7 +395,7 @@ static struct isa_driver el3_isa_driver = {
static int isa_registered;
#ifdef CONFIG_PNP
-static struct pnp_device_id el3_pnp_ids[] = {
+static const struct pnp_device_id el3_pnp_ids[] __devinitconst = {
{ .id = "TCM5090" }, /* 3Com Etherlink III (TP) */
{ .id = "TCM5091" }, /* 3Com Etherlink III */
{ .id = "TCM5094" }, /* 3Com Etherlink III (combo) */
@@ -478,7 +478,7 @@ static int pnp_registered;
#endif /* CONFIG_PNP */
#ifdef CONFIG_EISA
-static struct eisa_device_id el3_eisa_ids[] = {
+static const struct eisa_device_id el3_eisa_ids[] __devinitconst = {
{ "TCM5090" },
{ "TCM5091" },
{ "TCM5092" },
@@ -508,7 +508,7 @@ static int eisa_registered;
#ifdef CONFIG_MCA
static int el3_mca_probe(struct device *dev);
-static short el3_mca_adapter_ids[] __initdata = {
+static const short el3_mca_adapter_ids[] __devinitconst = {
0x627c,
0x627d,
0x62db,
@@ -517,7 +517,7 @@ static short el3_mca_adapter_ids[] __initdata = {
0x0000
};
-static char *el3_mca_adapter_names[] __initdata = {
+static const char *const el3_mca_adapter_names[] __devinitconst = {
"3Com 3c529 EtherLink III (10base2)",
"3Com 3c529 EtherLink III (10baseT)",
"3Com 3c529 EtherLink III (test mode)",
@@ -601,7 +601,7 @@ static void el3_common_remove (struct net_device *dev)
}
#ifdef CONFIG_MCA
-static int __init el3_mca_probe(struct device *device)
+static int __devinit el3_mca_probe(struct device *device)
{
/* Based on Erik Nygren's (nygren@mit.edu) 3c529 patch,
* heavily modified by Chris Beauregard
@@ -671,7 +671,7 @@ static int __init el3_mca_probe(struct device *device)
#endif /* CONFIG_MCA */
#ifdef CONFIG_EISA
-static int __init el3_eisa_probe (struct device *device)
+static int __devinit el3_eisa_probe (struct device *device)
{
short i;
int ioaddr, irq, if_port;
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 8cc2256..99f43d2 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -901,14 +901,14 @@ static const struct dev_pm_ops vortex_pm_ops = {
#endif /* !CONFIG_PM */
#ifdef CONFIG_EISA
-static struct eisa_device_id vortex_eisa_ids[] = {
+static const struct eisa_device_id vortex_eisa_ids[] __devinitconst = {
{ "TCM5920", CH_3C592 },
{ "TCM5970", CH_3C597 },
{ "" }
};
MODULE_DEVICE_TABLE(eisa, vortex_eisa_ids);
-static int __init vortex_eisa_probe(struct device *device)
+static int __devinit vortex_eisa_probe(struct device *device)
{
void __iomem *ioaddr;
struct eisa_device *edev;
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index 8b0084d..1765405 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -331,18 +331,18 @@ static struct {
"DE422",\
""}
-static char* __initdata depca_signature[] = DEPCA_SIGNATURE;
+static const char* const depca_signature[] __devinitconst = DEPCA_SIGNATURE;
enum depca_type {
DEPCA, de100, de101, de200, de201, de202, de210, de212, de422, unknown
};
-static char depca_string[] = "depca";
+static const char depca_string[] = "depca";
static int depca_device_remove (struct device *device);
#ifdef CONFIG_EISA
-static struct eisa_device_id depca_eisa_ids[] = {
+static const struct eisa_device_id depca_eisa_ids[] __devinitconst = {
{ "DEC4220", de422 },
{ "" }
};
@@ -367,19 +367,19 @@ static struct eisa_driver depca_eisa_driver = {
#define DE210_ID 0x628d
#define DE212_ID 0x6def
-static short depca_mca_adapter_ids[] = {
+static const short depca_mca_adapter_ids[] __devinitconst = {
DE210_ID,
DE212_ID,
0x0000
};
-static char *depca_mca_adapter_name[] = {
+static const char *depca_mca_adapter_name[] = {
"DEC EtherWORKS MC Adapter (DE210)",
"DEC EtherWORKS MC Adapter (DE212)",
NULL
};
-static enum depca_type depca_mca_adapter_type[] = {
+static const enum depca_type depca_mca_adapter_type[] = {
de210,
de212,
0
@@ -541,10 +541,9 @@ static void SetMulticastFilter(struct net_device *dev);
static int load_packet(struct net_device *dev, struct sk_buff *skb);
static void depca_dbg_open(struct net_device *dev);
-static u_char de1xx_irq[] __initdata = { 2, 3, 4, 5, 7, 9, 0 };
-static u_char de2xx_irq[] __initdata = { 5, 9, 10, 11, 15, 0 };
-static u_char de422_irq[] __initdata = { 5, 9, 10, 11, 0 };
-static u_char *depca_irq;
+static const u_char de1xx_irq[] __devinitconst = { 2, 3, 4, 5, 7, 9, 0 };
+static const u_char de2xx_irq[] __devinitconst = { 5, 9, 10, 11, 15, 0 };
+static const u_char de422_irq[] __devinitconst = { 5, 9, 10, 11, 0 };
static int irq;
static int io;
@@ -580,7 +579,7 @@ static const struct net_device_ops depca_netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
};
-static int __init depca_hw_init (struct net_device *dev, struct device *device)
+static int __devinit depca_hw_init (struct net_device *dev, struct device *device)
{
struct depca_private *lp;
int i, j, offset, netRAM, mem_len, status = 0;
@@ -748,6 +747,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
if (dev->irq < 2) {
unsigned char irqnum;
unsigned long irq_mask, delay;
+ const u_char *depca_irq;
irq_mask = probe_irq_on();
@@ -770,6 +770,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
break;
default:
+ depca_irq = NULL;
break; /* Not reached */
}
@@ -1302,7 +1303,7 @@ static void SetMulticastFilter(struct net_device *dev)
}
}
-static int __init depca_common_init (u_long ioaddr, struct net_device **devp)
+static int __devinit depca_common_init (u_long ioaddr, struct net_device **devp)
{
int status = 0;
@@ -1333,7 +1334,7 @@ static int __init depca_common_init (u_long ioaddr, struct net_device **devp)
/*
** Microchannel bus I/O device probe
*/
-static int __init depca_mca_probe(struct device *device)
+static int __devinit depca_mca_probe(struct device *device)
{
unsigned char pos[2];
unsigned char where;
@@ -1457,7 +1458,7 @@ static int __init depca_mca_probe(struct device *device)
** ISA bus I/O device probe
*/
-static void __init depca_platform_probe (void)
+static void __devinit depca_platform_probe (void)
{
int i;
struct platform_device *pldev;
@@ -1497,7 +1498,7 @@ static void __init depca_platform_probe (void)
}
}
-static enum depca_type __init depca_shmem_probe (ulong *mem_start)
+static enum depca_type __devinit depca_shmem_probe (ulong *mem_start)
{
u_long mem_base[] = DEPCA_RAM_BASE_ADDRESSES;
enum depca_type adapter = unknown;
@@ -1558,7 +1559,7 @@ static int __devinit depca_isa_probe (struct platform_device *device)
*/
#ifdef CONFIG_EISA
-static int __init depca_eisa_probe (struct device *device)
+static int __devinit depca_eisa_probe (struct device *device)
{
enum depca_type adapter = unknown;
struct eisa_device *edev;
@@ -1629,7 +1630,7 @@ static int __devexit depca_device_remove (struct device *device)
** and Boot (readb) ROM. This will also give us a clue to the network RAM
** base address.
*/
-static int __init DepcaSignature(char *name, u_long base_addr)
+static int __devinit DepcaSignature(char *name, u_long base_addr)
{
u_int i, j, k;
void __iomem *ptr;
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c
index 8e10d2f..c52a1df 100644
--- a/drivers/net/hp100.c
+++ b/drivers/net/hp100.c
@@ -188,14 +188,14 @@ struct hp100_private {
* variables
*/
#ifdef CONFIG_ISA
-static const char *hp100_isa_tbl[] = {
+static const char *const hp100_isa_tbl[] __devinitconst = {
"HWPF150", /* HP J2573 rev A */
"HWP1950", /* HP J2573 */
};
#endif
#ifdef CONFIG_EISA
-static struct eisa_device_id hp100_eisa_tbl[] = {
+static const struct eisa_device_id hp100_eisa_tbl[] __devinitconst = {
{ "HWPF180" }, /* HP J2577 rev A */
{ "HWP1920" }, /* HP 27248B */
{ "HWP1940" }, /* HP J2577 */
@@ -336,7 +336,7 @@ static __devinit const char *hp100_read_id(int ioaddr)
}
#ifdef CONFIG_ISA
-static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr)
+static __devinit int hp100_isa_probe1(struct net_device *dev, int ioaddr)
{
const char *sig;
int i;
@@ -372,7 +372,7 @@ static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr)
* EISA and PCI are handled by device infrastructure.
*/
-static int __init hp100_isa_probe(struct net_device *dev, int addr)
+static int __devinit hp100_isa_probe(struct net_device *dev, int addr)
{
int err = -ENODEV;
@@ -396,7 +396,7 @@ static int __init hp100_isa_probe(struct net_device *dev, int addr)
#endif /* CONFIG_ISA */
#if !defined(MODULE) && defined(CONFIG_ISA)
-struct net_device * __init hp100_probe(int unit)
+struct net_device * __devinit hp100_probe(int unit)
{
struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private));
int err;
@@ -2843,7 +2843,7 @@ static void cleanup_dev(struct net_device *d)
}
#ifdef CONFIG_EISA
-static int __init hp100_eisa_probe (struct device *gendev)
+static int __devinit hp100_eisa_probe (struct device *gendev)
{
struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private));
struct eisa_device *edev = to_eisa_device(gendev);
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c
index a7d6cad..136d754 100644
--- a/drivers/net/ibmlana.c
+++ b/drivers/net/ibmlana.c
@@ -895,12 +895,12 @@ static int ibmlana_irq;
static int ibmlana_io;
static int startslot; /* counts through slots when probing multiple devices */
-static short ibmlana_adapter_ids[] __initdata = {
+static const short ibmlana_adapter_ids[] __devinitconst = {
IBM_LANA_ID,
0x0000
};
-static char *ibmlana_adapter_names[] __devinitdata = {
+static const char *const ibmlana_adapter_names[] __devinitconst = {
"IBM LAN Adapter/A",
NULL
};
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index 8800e1f..69b5707 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -222,19 +222,19 @@ static void smsc_ircc_set_transceiver_for_speed(struct smsc_ircc_cb *self, u32 s
static void smsc_ircc_sir_wait_hw_transmitter_finish(struct smsc_ircc_cb *self);
/* Probing */
-static int __init smsc_ircc_look_for_chips(void);
-static const struct smsc_chip * __init smsc_ircc_probe(unsigned short cfg_base, u8 reg, const struct smsc_chip *chip, char *type);
-static int __init smsc_superio_flat(const struct smsc_chip *chips, unsigned short cfg_base, char *type);
-static int __init smsc_superio_paged(const struct smsc_chip *chips, unsigned short cfg_base, char *type);
-static int __init smsc_superio_fdc(unsigned short cfg_base);
-static int __init smsc_superio_lpc(unsigned short cfg_base);
+static int smsc_ircc_look_for_chips(void);
+static const struct smsc_chip * smsc_ircc_probe(unsigned short cfg_base, u8 reg, const struct smsc_chip *chip, char *type);
+static int smsc_superio_flat(const struct smsc_chip *chips, unsigned short cfg_base, char *type);
+static int smsc_superio_paged(const struct smsc_chip *chips, unsigned short cfg_base, char *type);
+static int smsc_superio_fdc(unsigned short cfg_base);
+static int smsc_superio_lpc(unsigned short cfg_base);
#ifdef CONFIG_PCI
-static int __init preconfigure_smsc_chip(struct smsc_ircc_subsystem_configuration *conf);
-static int __init preconfigure_through_82801(struct pci_dev *dev, struct smsc_ircc_subsystem_configuration *conf);
-static void __init preconfigure_ali_port(struct pci_dev *dev,
+static int preconfigure_smsc_chip(struct smsc_ircc_subsystem_configuration *conf);
+static int preconfigure_through_82801(struct pci_dev *dev, struct smsc_ircc_subsystem_configuration *conf);
+static void preconfigure_ali_port(struct pci_dev *dev,
unsigned short port);
-static int __init preconfigure_through_ali(struct pci_dev *dev, struct smsc_ircc_subsystem_configuration *conf);
-static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
+static int preconfigure_through_ali(struct pci_dev *dev, struct smsc_ircc_subsystem_configuration *conf);
+static int smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
unsigned short ircc_fir,
unsigned short ircc_sir,
unsigned char ircc_dma,
@@ -366,7 +366,7 @@ static inline void register_bank(int iobase, int bank)
}
/* PNP hotplug support */
-static const struct pnp_device_id smsc_ircc_pnp_table[] = {
+static const struct pnp_device_id smsc_ircc_pnp_table[] __devinitconst = {
{ .id = "SMCf010", .driver_data = 0 },
/* and presumably others */
{ }
@@ -515,7 +515,7 @@ static const struct net_device_ops smsc_ircc_netdev_ops = {
* Try to open driver instance
*
*/
-static int __init smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u8 dma, u8 irq)
+static int __devinit smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u8 dma, u8 irq)
{
struct smsc_ircc_cb *self;
struct net_device *dev;
@@ -2273,7 +2273,7 @@ static int __init smsc_superio_paged(const struct smsc_chip *chips, unsigned sho
}
-static int __init smsc_access(unsigned short cfg_base, unsigned char reg)
+static int __devinit smsc_access(unsigned short cfg_base, unsigned char reg)
{
IRDA_DEBUG(1, "%s\n", __func__);
@@ -2281,7 +2281,7 @@ static int __init smsc_access(unsigned short cfg_base, unsigned char reg)
return inb(cfg_base) != reg ? -1 : 0;
}
-static const struct smsc_chip * __init smsc_ircc_probe(unsigned short cfg_base, u8 reg, const struct smsc_chip *chip, char *type)
+static const struct smsc_chip * __devinit smsc_ircc_probe(unsigned short cfg_base, u8 reg, const struct smsc_chip *chip, char *type)
{
u8 devid, xdevid, rev;
@@ -2406,7 +2406,7 @@ static int __init smsc_superio_lpc(unsigned short cfg_base)
#ifdef CONFIG_PCI
#define PCIID_VENDOR_INTEL 0x8086
#define PCIID_VENDOR_ALI 0x10b9
-static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __initdata = {
+static const struct smsc_ircc_subsystem_configuration subsystem_configurations[] __devinitconst = {
/*
* Subsystems needing entries:
* 0x10b9:0x1533 0x103c:0x0850 HP nx9010 family
@@ -2532,7 +2532,7 @@ static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __ini
* (FIR port, SIR port, FIR DMA, FIR IRQ)
* through the chip configuration port.
*/
-static int __init preconfigure_smsc_chip(struct
+static int __devinit preconfigure_smsc_chip(struct
smsc_ircc_subsystem_configuration
*conf)
{
@@ -2633,7 +2633,7 @@ static int __init preconfigure_smsc_chip(struct
* or Intel 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge.
* They all work the same way!
*/
-static int __init preconfigure_through_82801(struct pci_dev *dev,
+static int __devinit preconfigure_through_82801(struct pci_dev *dev,
struct
smsc_ircc_subsystem_configuration
*conf)
@@ -2786,7 +2786,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev,
* This is based on reverse-engineering since ALi does not
* provide any data sheet for the 1533 chip.
*/
-static void __init preconfigure_ali_port(struct pci_dev *dev,
+static void __devinit preconfigure_ali_port(struct pci_dev *dev,
unsigned short port)
{
unsigned char reg;
@@ -2824,7 +2824,7 @@ static void __init preconfigure_ali_port(struct pci_dev *dev,
IRDA_MESSAGE("Activated ALi 1533 ISA bridge port 0x%04x.\n", port);
}
-static int __init preconfigure_through_ali(struct pci_dev *dev,
+static int __devinit preconfigure_through_ali(struct pci_dev *dev,
struct
smsc_ircc_subsystem_configuration
*conf)
@@ -2837,7 +2837,7 @@ static int __init preconfigure_through_ali(struct pci_dev *dev,
return preconfigure_smsc_chip(conf);
}
-static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
+static int __devinit smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
unsigned short ircc_fir,
unsigned short ircc_sir,
unsigned char ircc_dma,
@@ -2849,7 +2849,7 @@ static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
int ret = 0;
for_each_pci_dev(dev) {
- struct smsc_ircc_subsystem_configuration *conf;
+ const struct smsc_ircc_subsystem_configuration *conf;
/*
* Cache the subsystem vendor/device:
diff --git a/drivers/net/ne3210.c b/drivers/net/ne3210.c
index 243ed2a..e8984b0 100644
--- a/drivers/net/ne3210.c
+++ b/drivers/net/ne3210.c
@@ -80,17 +80,20 @@ static void ne3210_block_output(struct net_device *dev, int count, const unsigne
#define NE3210_DEBUG 0x0
-static unsigned char irq_map[] __initdata = {15, 12, 11, 10, 9, 7, 5, 3};
-static unsigned int shmem_map[] __initdata = {0xff0, 0xfe0, 0xfff0, 0xd8, 0xffe0, 0xffc0, 0xd0, 0x0};
-static const char *ifmap[] __initdata = {"UTP", "?", "BNC", "AUI"};
-static int ifmap_val[] __initdata = {
+static const unsigned char irq_map[] __devinitconst =
+ { 15, 12, 11, 10, 9, 7, 5, 3 };
+static const unsigned int shmem_map[] __devinitconst =
+ { 0xff0, 0xfe0, 0xfff0, 0xd8, 0xffe0, 0xffc0, 0xd0, 0x0 };
+static const char *const ifmap[] __devinitconst =
+ { "UTP", "?", "BNC", "AUI" };
+static const int ifmap_val[] __devinitconst = {
IF_PORT_10BASET,
IF_PORT_UNKNOWN,
IF_PORT_10BASE2,
IF_PORT_AUI,
};
-static int __init ne3210_eisa_probe (struct device *device)
+static int __devinit ne3210_eisa_probe (struct device *device)
{
unsigned long ioaddr, phys_mem;
int i, retval, port_index;
@@ -313,7 +316,7 @@ static void ne3210_block_output(struct net_device *dev, int count,
memcpy_toio(shmem, buf, count);
}
-static struct eisa_device_id ne3210_ids[] = {
+static const struct eisa_device_id ne3210_ids[] __devinitconst = {
{ "EGL0101" },
{ "NVL1801" },
{ "" },
diff --git a/drivers/net/smc-mca.c b/drivers/net/smc-mca.c
index d07c39c..0f29f26 100644
--- a/drivers/net/smc-mca.c
+++ b/drivers/net/smc-mca.c
@@ -156,7 +156,7 @@ static const struct {
{ 14, 15 }
};
-static short smc_mca_adapter_ids[] __initdata = {
+static const short smc_mca_adapter_ids[] __devinitconst = {
0x61c8,
0x61c9,
0x6fc0,
@@ -168,7 +168,7 @@ static short smc_mca_adapter_ids[] __initdata = {
0x0000
};
-static char *smc_mca_adapter_names[] __initdata = {
+static const char *const smc_mca_adapter_names[] __devinitconst = {
"SMC Ethercard PLUS Elite/A BNC/AUI (WD8013EP/A)",
"SMC Ethercard PLUS Elite/A UTP/AUI (WD8013WP/A)",
"WD Ethercard PLUS/A (WD8003E/A or WD8003ET/A)",
@@ -199,7 +199,7 @@ static const struct net_device_ops ultramca_netdev_ops = {
#endif
};
-static int __init ultramca_probe(struct device *gen_dev)
+static int __devinit ultramca_probe(struct device *gen_dev)
{
unsigned short ioaddr;
struct net_device *dev;
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
index 2bedc0a..1313aa1 100644
--- a/drivers/net/tokenring/madgemc.c
+++ b/drivers/net/tokenring/madgemc.c
@@ -727,7 +727,7 @@ static int __devexit madgemc_remove(struct device *device)
return 0;
}
-static short madgemc_adapter_ids[] __initdata = {
+static const short madgemc_adapter_ids[] __devinitconst = {
0x002d,
0x0000
};
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index efaa1d6..45144d5 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -1995,7 +1995,7 @@ SetMulticastFilter(struct net_device *dev)
static u_char de4x5_irq[] = EISA_ALLOWED_IRQ_LIST;
-static int __init de4x5_eisa_probe (struct device *gendev)
+static int __devinit de4x5_eisa_probe (struct device *gendev)
{
struct eisa_device *edev;
u_long iobase;
@@ -2097,7 +2097,7 @@ static int __devexit de4x5_eisa_remove (struct device *device)
return 0;
}
-static struct eisa_device_id de4x5_eisa_ids[] = {
+static const struct eisa_device_id de4x5_eisa_ids[] __devinitconst = {
{ "DEC4250", 0 }, /* 0 is the board name index... */
{ "" }
};
--
1.7.2.5
^ permalink raw reply related
* [PATCH] net: vmxnet3: convert to hw_features
From: Michał Mirosław @ 2011-04-18 23:31 UTC (permalink / raw)
To: netdev; +Cc: Shreyas Bhatewara, VMware, Inc.
This also removes private feature flags that were always set to true.
You may want to move vmxnet3_set_features() to vmxnet3_drv.c as a following
cleanup.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 40 +++++++-------------
drivers/net/vmxnet3/vmxnet3_ethtool.c | 67 +++++---------------------------
drivers/net/vmxnet3/vmxnet3_int.h | 7 +--
3 files changed, 28 insertions(+), 86 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 0d47c3a..7a494f7 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1082,7 +1082,7 @@ vmxnet3_rx_csum(struct vmxnet3_adapter *adapter,
struct sk_buff *skb,
union Vmxnet3_GenericDesc *gdesc)
{
- if (!gdesc->rcd.cnc && adapter->rxcsum) {
+ if (!gdesc->rcd.cnc && adapter->netdev->features & NETIF_F_RXCSUM) {
/* typical case: TCP/UDP over IP and both csums are correct */
if ((le32_to_cpu(gdesc->dword[3]) & VMXNET3_RCD_CSUM_OK) ==
VMXNET3_RCD_CSUM_OK) {
@@ -2081,10 +2081,10 @@ vmxnet3_setup_driver_shared(struct vmxnet3_adapter *adapter)
devRead->misc.ddLen = cpu_to_le32(sizeof(struct vmxnet3_adapter));
/* set up feature flags */
- if (adapter->rxcsum)
+ if (adapter->netdev->features & NETIF_F_RXCSUM)
devRead->misc.uptFeatures |= UPT1_F_RXCSUM;
- if (adapter->lro) {
+ if (adapter->netdev->features & NETIF_F_LRO) {
devRead->misc.uptFeatures |= UPT1_F_LRO;
devRead->misc.maxNumRxSG = cpu_to_le16(1 + MAX_SKB_FRAGS);
}
@@ -2593,9 +2593,6 @@ vmxnet3_change_mtu(struct net_device *netdev, int new_mtu)
if (new_mtu < VMXNET3_MIN_MTU || new_mtu > VMXNET3_MAX_MTU)
return -EINVAL;
- if (new_mtu > 1500 && !adapter->jumbo_frame)
- return -EINVAL;
-
netdev->mtu = new_mtu;
/*
@@ -2641,28 +2638,18 @@ vmxnet3_declare_features(struct vmxnet3_adapter *adapter, bool dma64)
{
struct net_device *netdev = adapter->netdev;
- netdev->features = NETIF_F_SG |
- NETIF_F_HW_CSUM |
- NETIF_F_HW_VLAN_TX |
- NETIF_F_HW_VLAN_RX |
- NETIF_F_HW_VLAN_FILTER |
- NETIF_F_TSO |
- NETIF_F_TSO6 |
- NETIF_F_LRO;
-
- printk(KERN_INFO "features: sg csum vlan jf tso tsoIPv6 lro");
-
- adapter->rxcsum = true;
- adapter->jumbo_frame = true;
- adapter->lro = true;
-
- if (dma64) {
+ netdev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM |
+ NETIF_F_HW_CSUM | NETIF_F_HW_VLAN_TX |
+ NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_LRO;
+ if (dma64)
netdev->features |= NETIF_F_HIGHDMA;
- printk(" highDMA");
- }
+ netdev->vlan_features = netdev->hw_features & ~NETIF_F_HW_VLAN_TX;
+ netdev->features = netdev->hw_features |
+ NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER;
- netdev->vlan_features = netdev->features;
- printk("\n");
+ netdev_info(adapter->netdev,
+ "features: sg csum vlan jf tso tsoIPv6 lro%s\n",
+ dma64 ? " highDMA" : "");
}
@@ -2874,6 +2861,7 @@ vmxnet3_probe_device(struct pci_dev *pdev,
.ndo_start_xmit = vmxnet3_xmit_frame,
.ndo_set_mac_address = vmxnet3_set_mac_addr,
.ndo_change_mtu = vmxnet3_change_mtu,
+ .ndo_set_features = vmxnet3_set_features,
.ndo_get_stats = vmxnet3_get_stats,
.ndo_tx_timeout = vmxnet3_tx_timeout,
.ndo_set_multicast_list = vmxnet3_set_mc,
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
index 51f2ef1..70c1ab9 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -33,40 +33,6 @@ struct vmxnet3_stat_desc {
};
-static u32
-vmxnet3_get_rx_csum(struct net_device *netdev)
-{
- struct vmxnet3_adapter *adapter = netdev_priv(netdev);
- return adapter->rxcsum;
-}
-
-
-static int
-vmxnet3_set_rx_csum(struct net_device *netdev, u32 val)
-{
- struct vmxnet3_adapter *adapter = netdev_priv(netdev);
- unsigned long flags;
-
- if (adapter->rxcsum != val) {
- adapter->rxcsum = val;
- if (netif_running(netdev)) {
- if (val)
- adapter->shared->devRead.misc.uptFeatures |=
- UPT1_F_RXCSUM;
- else
- adapter->shared->devRead.misc.uptFeatures &=
- ~UPT1_F_RXCSUM;
-
- spin_lock_irqsave(&adapter->cmd_lock, flags);
- VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
- VMXNET3_CMD_UPDATE_FEATURE);
- spin_unlock_irqrestore(&adapter->cmd_lock, flags);
- }
- }
- return 0;
-}
-
-
/* per tq stats maintained by the device */
static const struct vmxnet3_stat_desc
vmxnet3_tq_dev_stats[] = {
@@ -296,28 +262,27 @@ vmxnet3_get_strings(struct net_device *netdev, u32 stringset, u8 *buf)
}
}
-static int
-vmxnet3_set_flags(struct net_device *netdev, u32 data)
+int vmxnet3_set_features(struct net_device *netdev, u32 features)
{
struct vmxnet3_adapter *adapter = netdev_priv(netdev);
- u8 lro_requested = (data & ETH_FLAG_LRO) == 0 ? 0 : 1;
- u8 lro_present = (netdev->features & NETIF_F_LRO) == 0 ? 0 : 1;
unsigned long flags;
+ u32 changed = features ^ netdev->features;
- if (ethtool_invalid_flags(netdev, data, ETH_FLAG_LRO))
- return -EINVAL;
+ if (changed & (NETIF_F_RXCSUM|NETIF_F_LRO)) {
+ if (features & NETIF_F_RXCSUM)
+ adapter->shared->devRead.misc.uptFeatures |=
+ UPT1_F_RXCSUM;
+ else
+ adapter->shared->devRead.misc.uptFeatures &=
+ ~UPT1_F_RXCSUM;
- if (lro_requested ^ lro_present) {
- /* toggle the LRO feature*/
- netdev->features ^= NETIF_F_LRO;
-
- /* update harware LRO capability accordingly */
- if (lro_requested)
+ if (features & NETIF_F_LRO)
adapter->shared->devRead.misc.uptFeatures |=
UPT1_F_LRO;
else
adapter->shared->devRead.misc.uptFeatures &=
~UPT1_F_LRO;
+
spin_lock_irqsave(&adapter->cmd_lock, flags);
VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
VMXNET3_CMD_UPDATE_FEATURE);
@@ -654,17 +619,7 @@ static struct ethtool_ops vmxnet3_ethtool_ops = {
.get_wol = vmxnet3_get_wol,
.set_wol = vmxnet3_set_wol,
.get_link = ethtool_op_get_link,
- .get_rx_csum = vmxnet3_get_rx_csum,
- .set_rx_csum = vmxnet3_set_rx_csum,
- .get_tx_csum = ethtool_op_get_tx_csum,
- .set_tx_csum = ethtool_op_set_tx_hw_csum,
- .get_sg = ethtool_op_get_sg,
- .set_sg = ethtool_op_set_sg,
- .get_tso = ethtool_op_get_tso,
- .set_tso = ethtool_op_set_tso,
.get_strings = vmxnet3_get_strings,
- .get_flags = ethtool_op_get_flags,
- .set_flags = vmxnet3_set_flags,
.get_sset_count = vmxnet3_get_sset_count,
.get_ethtool_stats = vmxnet3_get_ethtool_stats,
.get_ringparam = vmxnet3_get_ringparam,
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index fb5d245..8ba7b5f 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -329,10 +329,6 @@ struct vmxnet3_adapter {
u8 __iomem *hw_addr0; /* for BAR 0 */
u8 __iomem *hw_addr1; /* for BAR 1 */
- /* feature control */
- bool rxcsum;
- bool lro;
- bool jumbo_frame;
#ifdef VMXNET3_RSS
struct UPT1_RSSConf *rss_conf;
bool rss;
@@ -404,6 +400,9 @@ void
vmxnet3_rq_destroy_all(struct vmxnet3_adapter *adapter);
int
+vmxnet3_set_features(struct net_device *netdev, u32 features);
+
+int
vmxnet3_create_queues(struct vmxnet3_adapter *adapter,
u32 tx_ring_size, u32 rx_ring_size, u32 rx_ring2_size);
--
1.7.2.5
^ permalink raw reply related
* Re: net: Automatic IRQ siloing for network devices
From: Neil Horman @ 2011-04-19 0:52 UTC (permalink / raw)
To: Ben Hutchings
Cc: Stephen Hemminger, netdev, davem, Thomas Gleixner,
Alexander Duyck, Jeff Kirsher
In-Reply-To: <1303163494.2857.98.camel@bwh-desktop>
On Mon, Apr 18, 2011 at 10:51:34PM +0100, Ben Hutchings wrote:
> On Sun, 2011-04-17 at 21:08 -0400, Neil Horman wrote:
> > On Sun, Apr 17, 2011 at 07:38:59PM +0100, Ben Hutchings wrote:
> > > On Sun, 2011-04-17 at 13:20 -0400, Neil Horman wrote:
> > > > On Sat, Apr 16, 2011 at 09:17:04AM -0700, Stephen Hemminger wrote:
> > > [...]
> > > > > My gut feeling is that:
> > > > > * kernel should default to a simple static sane irq policy without user
> > > > > space. This is especially true for multi-queue devices where the default
> > > > > puts all IRQ's on one cpu.
> > > > >
> > > > Thats not how it currently works, AFAICS. The default kernel policy is
> > > > currently that cpu affinity for any newly requested irq is all cpus. Any
> > > > restriction beyond that is the purview and doing of userspace (irqbalance or
> > > > manual affinity setting).
> > >
> > > Right. Though it may be reasonable for the kernel to use the hint as
> > > the initial affinity for a newly allocated IRQ (not sure quite how we
> > > determine that).
> > >
> > So I understand what your saying here, but I'm having a hard time reconciling
> > the two notions. Currently as it stands, affinity_hint gets set by a single
> > function call in the kernel (irq_set_affinity_hint), and is called by drivers
> > wishing to guide irqbalances behavior (currently only ixgbe does this). The
> > behavior a driver is capable of guiding however are either overly simple (ixgbe
> > just tells irqbalance to place each irq on a separate cpu, which irqbalance
> > would do anyway)
>
> It's a bit more subtle than that.
>
> ixgbe is trying to set up hardware flow steering. Some versions of the
> hardware can steer packets to RX queues based on the TX queue that was
> last used for the same flow. The TX queue selection based on CPU in
> ixgbe_select_queue() should be the inverse of the IRQ affinity mapping
> of RX queues, and the affinity hints are supposed to ensure that this is
> true.
>
Ah, ok, that makes a bit more sense then. Thank you for that.
> I think it should be possible to replace those hints with use of
> irq_cpu_rmap for TX queue selection.
>
> > or overly complex (forcing policy into the kernel, which I
> > tried to do with this patch series, but based on the responses I've gotten here,
> > that seems non-desireable).
>
> The trouble is that irqbalance has been so bad for multiqueue net
> devices in the past that many vendors (including Solarflare) recommended
> that it be disabled. I think irqbalance does sensible things now but
> many systems will be running without it for some time to come.
>
> I was thinking that if the drivers could set sane hints to start with
> then it would improve matters for those systems without irqbalance. But
> maybe it would be better still for some part of the networking core or
> IRQ core to set up a default spreading of multiqueue IRQs.
>
But doesn't this force policy for irqbalancing into the kernel, as Thomas and
Eric alluded to? It seems to me that, if we can export just a bit more
information regarding irqs and their associations to devices (which has been a
major achilles heel of irqblance in the past), then I think we can create a sane
default balancing policy with some simple udev rules. I've been messing with
this a bit today.
> [...]
> > > > Actually, as I read back to myself, that acutally sounds kind of good to me. It
> > > > keeps all the policy for this in user space, and minimizes what we have to add
> > > > to the kernel to make it happen (some process information in /proc and another
> > > > udev event). I'd like to get some feedback before I start implementing this,
> > > > but I think this could be done. What do you think?
> > >
> > > I don't think it's a good idea to override the scheduler dynamically
> > > like this.
> > >
> > Why not? Not disagreeing here, but I'm curious as to why you think this is bad.
> > We already have several interfaces for doing this in user space (cgroups and
> > taskset come to mind). Nominally they are used directly by sysadmins, and used
> > sparingly for specific configurations.
>
> Yes, that is why I think this is different.
>
Ok, fair enough.
> > All I'm suggesting is that we create a
> > daemon to identify processes that would benefit from running closer to the nics
> > they are getting data from, and restricting them to cpus that fit that benefit.
> > If a sysadmin doesn't want that behavior, they can stop the daemon, or change
> > its configuration to avoid including processes they don't want to move/restrict.
>
> I think this could improve latency under low CPU load and throughput
> under high CPU load for small numbers of relatively long-lived flows.
> But for large numbers of flows or high turnover of flows the affinity
> will just be noise.
>
> You're welcome to do your own experiments, obviously!
>
I will, but I'll start with the low hanging fruit. I'm going to try exporting
the msi table for a device. With that I can use the netdev_registration uevent
to properly identify network based irqs without the need for 1/2 assed regex
searches and volume counts and do one shot rebalancing of them.
Thanks for your time & thoughts!
Neil
> Ben.
>
> --
> Ben Hutchings, Senior Software Engineer, Solarflare
> Not speaking for my employer; that's the marketing department's job.
> They asked us to note that Solarflare product names are trademarked.
>
>
^ permalink raw reply
* Re: [PATCH net-next-2.6 3/3] bonding,ipv4,ipv6,vlan: Handle NETDEV_BONDING_FAILOVER like NETDEV_NOTIFY_PEERS
From: Brian Haley @ 2011-04-19 1:32 UTC (permalink / raw)
To: Ben Hutchings
Cc: Jay Vosburgh, David Miller, Andy Gospodarek, Patrick McHardy,
netdev
In-Reply-To: <1303153792.2857.32.camel@bwh-desktop>
On 04/18/2011 03:09 PM, Ben Hutchings wrote:
> How about restoring the parameters like this:
>
> ---
> From: Ben Hutchings <bhutchings@solarflare.com>
> Date: Mon, 18 Apr 2011 19:36:48 +0100
> Subject: [PATCH net-next-2.6] ipv4,ipv6,bonding: Restore control over number of peer notifications
>
> For backward compatibility, we should retain the module parameters and
> sysfs attributes to control the number of peer notifications
> (gratuitous ARPs and unsolicited NAs) sent after bonding failover.
> Also, it is possible for failover to take place even though the new
> active slave does not have link up, and in that case the peer
> notification should be deferred until it does.
>
> Change ipv4 and ipv6 so they do not automatically send peer
> notifications on bonding failover. Change the bonding driver to send
> separate NETDEV_NOTIFY_PEERS notifications when the link is up, as
> many times as requested. Since it does not directly control which
> protocols send notifications, make num_grat_arp and num_unsol_na
> aliases for a single parameter.
Hi Ben,
I think this looks good, I'll try and get this tested here when I have
a chance, but for now I can:
Acked-by: Brian Haley <brian.haley@hp.com>
Should we just go ahead and make a new parameter for peer notification?
Compiled but untested patch below.
Thanks,
-Brian
--
Make a new bonding parameter, called num_peer_notif, to control how
many peer notifications are sent on fail-over. Mark the old values,
num_grat_arp and num_unsol_na, as deprecated in the documentation.
Signed-off-by: Brian Haley <brian.haley@hp.com>
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 511b4e5..8b16beb 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -585,8 +585,15 @@ mode
chosen.
num_grat_arp
+
+ Deprecated. Use num_peer_notif instead.
+
num_unsol_na
+ Deprecated. Use num_peer_notif instead.
+
+num_peer_notif
+
Specify the number of peer notifications (gratuitous ARPs and
unsolicited IPv6 Neighbor Advertisements) to be issued after a
failover event. As soon as the link is up on the new slave
@@ -595,7 +602,7 @@ num_unsol_na
each link monitor interval (arp_interval or miimon, whichever
is active) if the number is greater than 1.
- These notifications are now generated by the ipv4 and ipv6 code
+ These notifications are now generated by the IPv4 and IPv6 code
and the numbers of repetitions cannot be set independently.
The valid range is 0 - 255; the default value is 1. These options
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 956a6f7..631ca9e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -116,6 +116,8 @@ module_param_named(num_grat_arp, num_peer_notif, int, 0644);
MODULE_PARM_DESC(num_grat_arp, "Number of peer notifications to send on failover event");
module_param_named(num_unsol_na, num_peer_notif, int, 0644);
MODULE_PARM_DESC(num_unsol_na, "Number of peer notifications to send on failover event");
+module_param_named(num_peer_notif, num_peer_notif, int, 0644);
+MODULE_PARM_DESC(num_unsol_na, "Number of peer notifications to send on failover event");
module_param(miimon, int, 0);
MODULE_PARM_DESC(miimon, "Link check interval in milliseconds");
module_param(updelay, int, 0);
@@ -4699,7 +4701,7 @@ static int bond_check_params(struct bond_params *params)
}
if (num_peer_notif < 0 || num_peer_notif > 255) {
- pr_warning("Warning: num_grat_arp/num_unsol_na (%d) not in range 0-255 so it was reset to 1\n",
+ pr_warning("Warning: num_peer_notif (%d) not in range 0-255 so it was reset to 1\n",
num_peer_notif);
num_peer_notif = 1;
}
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 58fb3e9..b03e7be 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -896,6 +896,8 @@ static DEVICE_ATTR(num_grat_arp, S_IRUGO | S_IWUSR,
bonding_show_num_peer_notif, bonding_store_num_peer_notif);
static DEVICE_ATTR(num_unsol_na, S_IRUGO | S_IWUSR,
bonding_show_num_peer_notif, bonding_store_num_peer_notif);
+static DEVICE_ATTR(num_peer_notif, S_IRUGO | S_IWUSR,
+ bonding_show_num_peer_notif, bonding_store_num_peer_notif);
/*
* Show and set the MII monitor interval. There are two tricky bits
@@ -1598,6 +1600,7 @@ static struct attribute *per_bond_attrs[] = {
&dev_attr_xmit_hash_policy.attr,
&dev_attr_num_grat_arp.attr,
&dev_attr_num_unsol_na.attr,
+ &dev_attr_num_peer_notif.attr,
&dev_attr_miimon.attr,
&dev_attr_primary.attr,
&dev_attr_primary_reselect.attr,
^ permalink raw reply related
* Re: Network performance with small packets
From: Rusty Russell @ 2011-04-19 0:33 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: habanero, Shirley Ma, Krishna Kumar2, David Miller, kvm, netdev,
steved, Tom Lendacky, borntraeger
In-Reply-To: <20110414160359.GA11218@redhat.com>
On Thu, 14 Apr 2011 19:03:59 +0300, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Thu, Apr 14, 2011 at 08:58:41PM +0930, Rusty Russell wrote:
> > They have to offer the feature, so if the have some way of allocating
> > non-page-aligned amounts of memory, they'll have to add those extra 2
> > bytes.
> >
> > So I think it's OK...
> > Rusty.
>
> To clarify, my concern is that we always seem to try to map
> these extra 2 bytes, which thinkably might fail?
No, if you look at the layout it's clear that there's always most of a
page left for this extra room, both in the middle and at the end.
Cheers,
Rusty.
^ permalink raw reply
* [PATCH 2.6.36 1/1] IPv6: Create temp address based on advertised network prefix
From: Glenn Wurster @ 2011-04-19 1:24 UTC (permalink / raw)
To: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI <yosh
Cc: linux-kernel, dbarrera
As discussed ;Login: Volume 36, number 1, create a temporary address
by hashing a random value along with the advertised network
prefix. This results on the temporary address changing whenever
the network prefix changes (i.e., the host changes networks), or
whenever the random value (which can be set by a user-space
application with sufficient privilege) changes.
Signed-off-by: Glenn Wurster <gwurster@scs.carleton.ca>
---
Documentation/networking/ip-sysctl.txt | 20 ++++-
include/linux/ipv6.h | 4 +
include/net/if_inet6.h | 3 +
net/ipv6/Kconfig | 22 +++++
net/ipv6/addrconf.c | 159
+++++++++++++++++++++++++-------
5 files changed, 175 insertions(+), 33 deletions(-)
diff --git a/Documentation/networking/ip-sysctl.txt
b/Documentation/networking/ip-sysctl.txt
index f350c69..b366c28 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1128,11 +1128,18 @@ router_solicitations - INTEGER
use_tempaddr - INTEGER
Preference for Privacy Extensions (RFC3041).
+ Bits 0 and 1:
<= 0 : disable Privacy Extensions
== 1 : enable Privacy Extensions, but prefer public
addresses over temporary addresses.
- > 1 : enable Privacy Extensions and prefer temporary
+ >= 2 : enable Privacy Extensions and prefer temporary
addresses over public addresses.
+ Bit 2:
+ == 0 : Use RFC3041 random algorithm for generating
+ temporary addresses.
+ == 1 : Use the output of a hash based on the network prefix
+ and random number from temp_random.
+
Default: 0 (for most devices)
-1 (for point-to-point devices and loopback devices)
@@ -1144,6 +1151,17 @@ temp_prefered_lft - INTEGER
Preferred lifetime (in seconds) for temporary addresses.
Default: 86400 (1 day)
+temp_random - INTEGER[4]
+ Random number used as input to the hash function when
+ generating temporary addresses also based on the network
+ prefix.
+ == 0 : Generate a new random value when a temporary address
+ is created. This random value replaces the 0 in
+ temp_random
+ > 0 : A random number used as input to the hash
+
+ Default: 0
+
max_desync_factor - INTEGER
Maximum value for DESYNC_FACTOR, which is a random value
that ensures that clients don't synchronize with each
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index e62683b..b9bd404 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -172,6 +172,9 @@ struct ipv6_devconf {
__s32 disable_ipv6;
__s32 accept_dad;
__s32 force_tllao;
+#ifdef CONFIG_IPV6_PRIVACY_HASH
+ __u32 temp_random[4];
+#endif
void *sysctl;
};
@@ -213,6 +216,7 @@ enum {
DEVCONF_DISABLE_IPV6,
DEVCONF_ACCEPT_DAD,
DEVCONF_FORCE_TLLAO,
+ DEVCONF_TEMP_RANDOM,
DEVCONF_MAX
};
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index f95ff8d..99428bf 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -183,6 +183,9 @@ struct inet6_dev {
#ifdef CONFIG_IPV6_PRIVACY
u8 rndid[8];
+#ifdef CONFIG_IPV6_PRIVACY_HASH
+ __u32 rndid_inc;
+#endif
struct timer_list regen_timer;
struct list_head tempaddr_list;
#endif
diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig
index 36d7437..c0bc79a 100644
--- a/net/ipv6/Kconfig
+++ b/net/ipv6/Kconfig
@@ -39,6 +39,28 @@ config IPV6_PRIVACY
See <file:Documentation/networking/ip-sysctl.txt> for details.
+if IPV6_PRIVACY
+
+config IPV6_PRIVACY_HASH
+ bool "IPv6: Privacy Extension Hash Support"
+ select CRYPTO
+ select CRYPTO_SHA256
+ ---help---
+ Generate the pseudo-random global-scope unicast address(es) based on
+ the output of hashing together the broadcast prefix with a random
+ value. The algorithm is discussed in Volume 36, Number 1 of the USENIX
+ ;Login: publication.
+
+ To use hash-based temorary addresses, do
+
+ echo 6 >/proc/sys/net/ipv6/conf/all/use_tempaddr
+
+ To modify the input to the hash, do
+
+ echo <random> >/proc/sys/net/ipv6/conf/all/temp_random
+
+endif # if IPV6_PRIVACY
+
config IPV6_ROUTER_PREF
bool "IPv6: Router Preference (RFC 4191) support"
---help---
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 89bcb62..4a2eaca 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -118,6 +118,7 @@ static inline void addrconf_sysctl_unregister(struct
inet6_dev *idev)
#endif
#ifdef CONFIG_IPV6_PRIVACY
+static int __ipv6_is_invalid_rndid(const __u8 * rndid);
static int __ipv6_regen_rndid(struct inet6_dev *idev);
static int __ipv6_try_regen_rndid(struct inet6_dev *idev, struct in6_addr
*tmpaddr);
static void ipv6_regen_rndid(unsigned long data);
@@ -177,6 +178,9 @@ static struct ipv6_devconf ipv6_devconf __read_mostly = {
.temp_prefered_lft = TEMP_PREFERRED_LIFETIME,
.regen_max_retry = REGEN_MAX_RETRY,
.max_desync_factor = MAX_DESYNC_FACTOR,
+#ifdef CONFIG_IPV6_PRIVACY_HASH
+ .temp_random = { 0, 0, 0, 0 },
+#endif
#endif
.max_addresses = IPV6_MAX_ADDRESSES,
.accept_ra_defrtr = 1,
@@ -211,6 +215,9 @@ static struct ipv6_devconf ipv6_devconf_dflt __read_mostly
= {
.temp_prefered_lft = TEMP_PREFERRED_LIFETIME,
.regen_max_retry = REGEN_MAX_RETRY,
.max_desync_factor = MAX_DESYNC_FACTOR,
+#ifdef CONFIG_IPV6_PRIVACY_HASH
+ .temp_random = { 0, 0, 0, 0 },
+#endif
#endif
.max_addresses = IPV6_MAX_ADDRESSES,
.accept_ra_defrtr = 1,
@@ -849,6 +856,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp,
struct inet6_ifaddr *i
memcpy(&addr.s6_addr[8], &ift->addr.s6_addr[8], 8);
spin_unlock_bh(&ift->lock);
tmpaddr = &addr;
+ ift = NULL;
} else {
tmpaddr = NULL;
}
@@ -875,17 +883,71 @@ retry:
}
in6_ifa_hold(ifp);
memcpy(addr.s6_addr, ifp->addr.s6_addr, 8);
- if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) {
- spin_unlock_bh(&ifp->lock);
- write_unlock(&idev->lock);
- printk(KERN_WARNING
- "ipv6_create_tempaddr(): regeneration of randomized
interface id failed.\n");
- in6_ifa_put(ifp);
- in6_dev_put(idev);
- ret = -1;
- goto out;
+#ifdef CONFIG_IPV6_PRIVACY_HASH
+ while (idev->cnf.use_tempaddr > 4) {
+ char hash[32];
+ __u32 temp_random[4];
+ int i;
+
+ struct hash_desc desc = { .tfm = NULL, .flags = 0 };
+ struct scatterlist sg;
+
+ BUG_ON (sizeof(temp_random) != sizeof(idev->cnf.temp_random));
+
+ for (i = 0; unlikely(idev->cnf.temp_random[i] == 0) && i < 4; i++);
+ if (unlikely(i == 4))
+ get_random_bytes(idev->cnf.temp_random, sizeof(idev-
>cnf.temp_random));
+
+ desc.tfm = crypto_alloc_hash ("sha256", 0, CRYPTO_ALG_ASYNC);
+ if (IS_ERR(desc.tfm)) {
+ idev->cnf.use_tempaddr &= 0x03;
+ printk (KERN_WARNING
+ "ipv6_create_tempaddr(): Hash unavailable,
reverting use_tempaddr to %d.\n",
+ idev->cnf.use_tempaddr);
+ break;
+ }
+
+ BUG_ON (crypto_hash_digestsize(desc.tfm) > sizeof(hash));
+ BUG_ON (sizeof(idev->rndid) < 8);
+
+ crypto_hash_init (&desc);
+
+ sg_init_one (&sg, (u8 *)addr.s6_addr, 8);
+ crypto_hash_update (&desc, &sg, 8);
+
+ memcpy (temp_random, idev->cnf.temp_random, sizeof(temp_random));
+ temp_random[3] += idev->rndid_inc;
+ sg_init_one (&sg, (u8 *)temp_random, sizeof(temp_random));
+ crypto_hash_update (&desc, &sg, sizeof(temp_random));
+
+ crypto_hash_final (&desc, hash);
+ crypto_free_hash (desc.tfm);
+
+ memcpy (&addr.s6_addr[8], hash, 8);
+ if (__ipv6_is_invalid_rndid(&addr.s6_addr[8])) {
+ idev->rndid_inc++;
+ continue;
+ }
+
+ ift = ipv6_get_ifaddr (dev_net(idev->dev), &addr, idev->dev, 0);
+ break;
+ }
+#else
+ idev->cnf.use_tempaddr &= 0x03;
+#endif
+ if (idev->cnf.use_tempaddr < 4) {
+ if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) {
+ spin_unlock_bh(&ifp->lock);
+ write_unlock(&idev->lock);
+ printk(KERN_WARNING
+ "ipv6_create_tempaddr(): regeneration of randomized
interface id failed.\n");
+ in6_ifa_put(ifp);
+ in6_dev_put(idev);
+ ret = -1;
+ goto out;
+ }
+ memcpy(&addr.s6_addr[8], idev->rndid, 8);
}
- memcpy(&addr.s6_addr[8], idev->rndid, 8);
age = (jiffies - ifp->tstamp) / HZ;
tmp_valid_lft = min_t(__u32,
ifp->valid_lft,
@@ -922,11 +984,11 @@ retry:
if (ifp->flags & IFA_F_OPTIMISTIC)
addr_flags |= IFA_F_OPTIMISTIC;
- ift = !max_addresses ||
- ipv6_count_addresses(idev) < max_addresses ?
- ipv6_add_addr(idev, &addr, tmp_plen,
- ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK,
- addr_flags) : NULL;
+ if (!ift && (!max_addresses || ipv6_count_addresses(idev) <
max_addresses)) {
+ ift = ipv6_add_addr(idev, &addr, tmp_plen,
+ ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK,
+ addr_flags);
+ }
if (!ift || IS_ERR(ift)) {
in6_ifa_put(ifp);
in6_dev_put(idev);
@@ -943,9 +1005,11 @@ retry:
ift->prefered_lft = tmp_prefered_lft;
ift->cstamp = tmp_cstamp;
ift->tstamp = tmp_tstamp;
+ ift->regen_count = 0;
spin_unlock_bh(&ift->lock);
- addrconf_dad_start(ift, 0);
+ if (ift->flags & IFA_F_TENTATIVE)
+ addrconf_dad_start(ift, 0);
in6_ifa_put(ift);
in6_dev_put(idev);
out:
@@ -1090,7 +1154,7 @@ static int ipv6_get_saddr_eval(struct net *net,
*/
int preftmp = dst->prefs & (IPV6_PREFER_SRC_PUBLIC|
IPV6_PREFER_SRC_TMP) ?
!!(dst->prefs & IPV6_PREFER_SRC_TMP) :
- score->ifa->idev->cnf.use_tempaddr >= 2;
+ !!(score->ifa->idev->cnf.use_tempaddr & 2);
ret = (!(score->ifa->flags & IFA_F_TEMPORARY)) ^ preftmp;
break;
}
@@ -1398,6 +1462,9 @@ static void addrconf_dad_stop(struct inet6_ifaddr *ifp,
int dad_failed)
if (ifpub) {
in6_ifa_hold(ifpub);
spin_unlock_bh(&ifp->lock);
+#ifdef CONFIG_IPV6_PRIVACY_HASH
+ ifp->idev->rndid_inc++;
+#endif
ipv6_create_tempaddr(ifpub, ifp);
in6_ifa_put(ifpub);
} else {
@@ -1605,13 +1672,8 @@ static int ipv6_inherit_eui64(u8 *eui, struct inet6_dev
*idev)
}
#ifdef CONFIG_IPV6_PRIVACY
-/* (re)generation of randomized interface identifier (RFC 3041 3.2, 3.5) */
-static int __ipv6_regen_rndid(struct inet6_dev *idev)
+static int __ipv6_is_invalid_rndid(const __u8 * rndid)
{
-regen:
- get_random_bytes(idev->rndid, sizeof(idev->rndid));
- idev->rndid[0] &= ~0x02;
-
/*
* <draft-ietf-ipngwg-temp-addresses-v2-00.txt>:
* check if generated address is not inappropriate
@@ -1623,15 +1685,35 @@ regen:
* - value 0
* - XXX: already assigned to an address on the device
*/
- if (idev->rndid[0] == 0xfd &&
- (idev->rndid[1]&idev->rndid[2]&idev->rndid[3]&idev->rndid[4]&idev-
>rndid[5]&idev->rndid[6]) == 0xff &&
- (idev->rndid[7]&0x80))
- goto regen;
- if ((idev->rndid[0]|idev->rndid[1]) == 0) {
- if (idev->rndid[2] == 0x5e && idev->rndid[3] == 0xfe)
- goto regen;
- if ((idev->rndid[2]|idev->rndid[3]|idev->rndid[4]|idev->rndid[5]|
idev->rndid[6]|idev->rndid[7]) == 0x00)
- goto regen;
+
+ if (rndid[0] == 0xfd &&
+ (rndid[1]&rndid[2]&rndid[3]&rndid[4]&rndid[5]&rndid[6]) == 0xff &&
+ (rndid[7]&0x80))
+ return -1;
+ if ((rndid[0]|rndid[1]) == 0) {
+ if (rndid[2] == 0x5e && rndid[3] == 0xfe)
+ return -1;
+ if ((rndid[2]|rndid[3]|rndid[4]|rndid[5]|rndid[6]|rndid[7]) ==
0x00)
+ return -1;
+ }
+ return 0;
+}
+
+/* (re)generation of randomized interface identifier (RFC 3041 3.2, 3.5) */
+static int __ipv6_regen_rndid(struct inet6_dev *idev)
+{
+#ifdef CONFIG_IPV6_PRIVACY_HASH
+ if (idev->cnf.use_tempaddr > 4) {
+ get_random_bytes(idev->cnf.temp_random, sizeof(idev-
>cnf.temp_random));
+ }
+#else
+ idev->cnf.use_tempaddr &= 0x03;
+#endif
+ if (idev->cnf.use_tempaddr < 4) {
+ do {
+ get_random_bytes(idev->rndid, sizeof(idev->rndid));
+ idev->rndid[0] &= ~0x02;
+ } while (__ipv6_is_invalid_rndid(idev->rndid));
}
return 0;
@@ -1903,6 +1985,10 @@ ok:
int max_addresses = in6_dev->cnf.max_addresses;
u32 addr_flags = 0;
+#ifdef CONFIG_IPV6_PRIVACY_HASH
+ in6_dev->rndid_inc = 0;
+#endif
+
#ifdef CONFIG_IPV6_OPTIMISTIC_DAD
if (in6_dev->cnf.optimistic_dad &&
!net->ipv6.devconf_all->forwarding)
@@ -4454,6 +4540,15 @@ static struct addrconf_sysctl_table
.mode = 0644,
.proc_handler = proc_dointvec
},
+#ifdef CONFIG_IPV6_PRIVACY_HASH
+ {
+ .procname = "temp_random",
+ .data = &ipv6_devconf.temp_random,
+ .maxlen = sizeof(ipv6_devconf.temp_random),
+ .mode = 0640,
+ .proc_handler = proc_dointvec,
+ },
+#endif
{
/* sentinel */
}
--
1.7.2.3
^ permalink raw reply related
* Re: [Bugme-new] [Bug 33502] New: Caught 64-bit read from uninitialized memory in __alloc_skb
From: Eric Dumazet @ 2011-04-19 2:51 UTC (permalink / raw)
To: Andrew Morton
Cc: netdev, bugzilla-daemon, bugme-daemon, casteyde.christian,
Vegard Nossum, Pekka Enberg, Christoph Lameter
In-Reply-To: <20110418153852.153d3ed3.akpm@linux-foundation.org>
Le lundi 18 avril 2011 à 15:38 -0700, Andrew Morton a écrit :
> (switched to email. Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
>
> On Sun, 17 Apr 2011 19:29:39 GMT
> bugzilla-daemon@bugzilla.kernel.org wrote:
>
> > https://bugzilla.kernel.org/show_bug.cgi?id=33502
> >
> > Summary: Caught 64-bit read from uninitialized memory in
> > __alloc_skb
> > Product: Networking
> > Version: 2.5
> > Kernel Version: 2.6.39-rc3
> > Platform: All
> > OS/Version: Linux
> > Tree: Mainline
> > Status: NEW
> > Severity: normal
> > Priority: P1
> > Component: IPV4
> > AssignedTo: shemminger@linux-foundation.org
> > ReportedBy: casteyde.christian@free.fr
> > Regression: Yes
> >
> >
> > Acer Aspire 1511LMi
> > Athlon 64 3GHz in 64bits mode
> > Slackware 64 13.1
> >
> > Since 2.6.39-rc3 with kmemcheck enabled, I get the following warning:
> > ...
> > pcmcia_socket pcmcia_socket0: cs: memory probe 0x0c0000-0x0fffff: excluding
> > 0xc0000-0xfffff
> > pcmcia_socket pcmcia_socket0: cs: memory probe 0x60000000-0x60ffffff: excluding
> > 0x60000000-0x
> > 60ffffff
> > pcmcia_socket pcmcia_socket0: cs: memory probe 0xa0000000-0xa0ffffff: excluding
> > 0xa0000000-0x
> > a0ffffff
> > udev: renamed network interface wlan0 to eth1
> > WARNING: kmemcheck: Caught 64-bit read from uninitialized memory
> > (ffff88001b0bb800)
> > 00b00b1b0088ffff0000000000000000cafe1dea20009b0000299a3100000000
> > u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u
> > ^
> >
> > Pid: 1511, comm: udevd Not tainted 2.6.39-rc3 #1 Acer,Inc. Aspire 1510 /Aspire
> > 1510
> > RIP: 0010:[<ffffffff810c2f0c>] [<ffffffff810c2f0c>]
> > __kmalloc_track_caller+0xbc/0x1d0
> > RSP: 0018:ffff88001d3a7a18 EFLAGS: 00010246
> > RAX: 0000000000000000 RBX: 0000000000000010 RCX: 000000000000284f
> > RDX: 000000000000284e RSI: ffff88001fe5b160 RDI: ffffffff8177e39a
> > RBP: ffff88001d3a7a48 R08: 0000000000000000 R09: ffff88001b931100
> > R10: 0000000000000000 R11: 0000000000000003 R12: ffff88001b0bb800
> > R13: ffff88001f803840 R14: 00000000000004d0 R15: ffffffff814769c6
> > FS: 00007f6ee81f1700(0000) GS:ffffffff81a1b000(0000) knlGS:0000000000000000
> > CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > CR2: ffff88001d0b3938 CR3: 000000001d38b000 CR4: 00000000000006f0
> > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000400
> > [<ffffffff8147ccf2>] __alloc_skb+0x72/0x190
> > [<ffffffff814769c6>] sock_alloc_send_pskb+0x236/0x3a0
> > [<ffffffff81476b40>] sock_alloc_send_skb+0x10/0x20
> > [<ffffffff81523c18>] unix_dgram_sendmsg+0x298/0x770
> > [<ffffffff814715f3>] sock_sendmsg+0xe3/0x110
> > [<ffffffff81472603>] sys_sendmsg+0x243/0x3c0
> > [<ffffffff815e7238>] system_call_fastpath+0x16/0x1b
> > [<ffffffffffffffff>] 0xffffffffffffffff
>
> hum. I wonder if kmemcheck is disliking prefetchw()?
Nope, prefetchw() is OK versus kmemcheck.
This is in __kmalloc_track_caller(), not in networking stuff.
CC Christoph Lameter
I guess this_cpu_cmpxchg16b() is the offender.
A disassembly of __kmalloc_track_caller() would help, but I feel its the
read of s->cpu_slab->freelist
It seems to be at address
0xffff88001b0bb800 and contains 0xffff88001b0bb000 but kmemcheck thinks
its not initialized.
Its located in percpu zone, maybe kmemcheck has a problem with it ?
alloc_kmem_cache_cpus() does a call to __alloc_percpu(), so this must
have been zeroed at the very beginning of kmem_cache life.
Hmm, looking at mm/slub.c, I wonder what prevents "object" from pointing
to a now freed and unreachable zone of memory. (Say we are interrupted,
object given to interrupt handler and this one wants to change page bits
to trap access)
^ permalink raw reply
* Re: [Bugme-new] [Bug 33502] New: Caught 64-bit read from uninitialized memory in __alloc_skb
From: Eric Dumazet @ 2011-04-19 3:09 UTC (permalink / raw)
To: Andrew Morton
Cc: netdev, bugzilla-daemon, bugme-daemon, casteyde.christian,
Vegard Nossum, Pekka Enberg, Christoph Lameter
In-Reply-To: <1303181466.4152.39.camel@edumazet-laptop>
Le mardi 19 avril 2011 à 04:51 +0200, Eric Dumazet a écrit :
> Hmm, looking at mm/slub.c, I wonder what prevents "object" from pointing
> to a now freed and unreachable zone of memory. (Say we are interrupted,
> object given to interrupt handler and this one wants to change page bits
> to trap access)
Yes, I suspect this whole business is not kmemcheck compatable, or
DEBUG_PAGEALLOC
get_freepointer(s, object) can access to freed memory and kmemcheck
triggers the fault, while this_cpu_cmpxchg_double() would presumably
detect a change of tid and would not perform the freelist/tid change.
^ permalink raw reply
* linux-next: manual merge of the net tree with the net-current tree
From: Stephen Rothwell @ 2011-04-19 3:16 UTC (permalink / raw)
To: David Miller, netdev
Cc: linux-next, linux-kernel, Yaniv Rosner, stephen hemminger
Hi all,
Today's linux-next merge of the net tree got a conflict in
drivers/net/bnx2x/bnx2x_ethtool.c between commit 70dda99c41fc ("bnx2x:
Fix port identification problem") from the net-current tree and commit
32d3613475d8 ("bnx2x: convert to set_phys_id") from the net tree.
I fixed it up (maybe - see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/net/bnx2x/bnx2x_ethtool.c
index 89cb977,e711a22..0000000
--- a/drivers/net/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/bnx2x/bnx2x_ethtool.c
@@@ -2097,35 -2013,38 +2013,36 @@@ static void bnx2x_get_ethtool_stats(str
}
}
- static int bnx2x_phys_id(struct net_device *dev, u32 data)
+ static int bnx2x_set_phys_id(struct net_device *dev,
+ enum ethtool_phys_id_state state)
{
struct bnx2x *bp = netdev_priv(dev);
- int i;
if (!netif_running(dev))
- return 0;
+ return -EAGAIN;
if (!bp->port.pmf)
- return 0;
+ return -EOPNOTSUPP;
- if (data == 0)
- data = 2;
+ switch (state) {
+ case ETHTOOL_ID_ACTIVE:
+ return 1; /* cycle on/off once per second */
- for (i = 0; i < (data * 2); i++) {
- if ((i % 2) == 0)
- bnx2x_set_led(&bp->link_params, &bp->link_vars,
- LED_MODE_ON, SPEED_1000);
- else
- bnx2x_set_led(&bp->link_params, &bp->link_vars,
- LED_MODE_FRONT_PANEL_OFF, 0);
+ case ETHTOOL_ID_ON:
+ bnx2x_set_led(&bp->link_params, &bp->link_vars,
- LED_MODE_OPER, SPEED_1000);
++ LED_MODE_ON, SPEED_1000);
+ break;
- msleep_interruptible(500);
- if (signal_pending(current))
- break;
- }
+ case ETHTOOL_ID_OFF:
+ bnx2x_set_led(&bp->link_params, &bp->link_vars,
- LED_MODE_OFF, 0);
++ LED_MODE_FRONT_PANEL_OFF, 0);
+
+ break;
- bnx2x_set_led(&bp->link_params, &bp->link_vars,
- LED_MODE_OPER, bp->link_vars.line_speed);
+ case ETHTOOL_ID_INACTIVE:
- if (bp->link_vars.link_up)
- bnx2x_set_led(&bp->link_params, &bp->link_vars,
- LED_MODE_OPER,
- bp->link_vars.line_speed);
++ bnx2x_set_led(&bp->link_params, &bp->link_vars,
++ LED_MODE_OPER, bp->link_vars.line_speed);
+ }
return 0;
}
^ permalink raw reply
* Re: [Bugme-new] [Bug 33502] New: Caught 64-bit read from uninitialized memory in __alloc_skb
From: Eric Dumazet @ 2011-04-19 3:20 UTC (permalink / raw)
To: Andrew Morton
Cc: netdev, bugzilla-daemon, bugme-daemon, casteyde.christian,
Vegard Nossum, Pekka Enberg, Christoph Lameter
In-Reply-To: <1303182557.4152.48.camel@edumazet-laptop>
Le mardi 19 avril 2011 à 05:09 +0200, Eric Dumazet a écrit :
> Le mardi 19 avril 2011 à 04:51 +0200, Eric Dumazet a écrit :
>
> > Hmm, looking at mm/slub.c, I wonder what prevents "object" from pointing
> > to a now freed and unreachable zone of memory. (Say we are interrupted,
> > object given to interrupt handler and this one wants to change page bits
> > to trap access)
>
>
> Yes, I suspect this whole business is not kmemcheck compatable, or
> DEBUG_PAGEALLOC
>
> get_freepointer(s, object) can access to freed memory and kmemcheck
> triggers the fault, while this_cpu_cmpxchg_double() would presumably
> detect a change of tid and would not perform the freelist/tid change.
>
>
>
Christian, please try following patch, thanks
diff --git a/mm/slub.c b/mm/slub.c
index 94d2a33..84febe9 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1540,7 +1540,12 @@ static void unfreeze_slab(struct kmem_cache *s, struct page *page, int tail)
}
}
-#ifdef CONFIG_CMPXCHG_LOCAL
+#if defined(CONFIG_CMPXCHG_LOCAL) && \
+ !defined(CONFIG_KMEMCHECK) && !defined(DEBUG_PAGEALLOC)
+#define SLUB_USE_CMPXCHG_DOUBLE
+#endif
+
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
#ifdef CONFIG_PREEMPT
/*
* Calculate the next globally unique transaction for disambiguiation
@@ -1604,7 +1609,7 @@ static inline void note_cmpxchg_failure(const char *n,
void init_kmem_cache_cpus(struct kmem_cache *s)
{
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
int cpu;
for_each_possible_cpu(cpu)
@@ -1643,7 +1648,7 @@ static void deactivate_slab(struct kmem_cache *s, struct kmem_cache_cpu *c)
page->inuse--;
}
c->page = NULL;
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
c->tid = next_tid(c->tid);
#endif
unfreeze_slab(s, page, tail);
@@ -1780,7 +1785,7 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
{
void **object;
struct page *new;
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
unsigned long flags;
local_irq_save(flags);
@@ -1819,7 +1824,7 @@ load_freelist:
c->node = page_to_nid(c->page);
unlock_out:
slab_unlock(c->page);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
c->tid = next_tid(c->tid);
local_irq_restore(flags);
#endif
@@ -1858,7 +1863,7 @@ new_slab:
}
if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())
slab_out_of_memory(s, gfpflags, node);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
local_irq_restore(flags);
#endif
return NULL;
@@ -1887,7 +1892,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
{
void **object;
struct kmem_cache_cpu *c;
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
unsigned long tid;
#else
unsigned long flags;
@@ -1896,7 +1901,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
if (slab_pre_alloc_hook(s, gfpflags))
return NULL;
-#ifndef CONFIG_CMPXCHG_LOCAL
+#ifndef SLUB_USE_CMPXCHG_DOUBLE
local_irq_save(flags);
#else
redo:
@@ -1910,7 +1915,7 @@ redo:
*/
c = __this_cpu_ptr(s->cpu_slab);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
/*
* The transaction ids are globally unique per cpu and per operation on
* a per cpu queue. Thus they can be guarantee that the cmpxchg_double
@@ -1927,7 +1932,7 @@ redo:
object = __slab_alloc(s, gfpflags, node, addr, c);
else {
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
/*
* The cmpxchg will only match if there was no additional
* operation and if we are on the right processor.
@@ -1954,7 +1959,7 @@ redo:
stat(s, ALLOC_FASTPATH);
}
-#ifndef CONFIG_CMPXCHG_LOCAL
+#ifndef SLUB_USE_CMPXCHG_DOUBLE
local_irq_restore(flags);
#endif
@@ -2034,7 +2039,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
{
void *prior;
void **object = (void *)x;
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
unsigned long flags;
local_irq_save(flags);
@@ -2070,7 +2075,7 @@ checks_ok:
out_unlock:
slab_unlock(page);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
local_irq_restore(flags);
#endif
return;
@@ -2084,7 +2089,7 @@ slab_empty:
stat(s, FREE_REMOVE_PARTIAL);
}
slab_unlock(page);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
local_irq_restore(flags);
#endif
stat(s, FREE_SLAB);
@@ -2113,7 +2118,7 @@ static __always_inline void slab_free(struct kmem_cache *s,
{
void **object = (void *)x;
struct kmem_cache_cpu *c;
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
unsigned long tid;
#else
unsigned long flags;
@@ -2121,7 +2126,7 @@ static __always_inline void slab_free(struct kmem_cache *s,
slab_free_hook(s, x);
-#ifndef CONFIG_CMPXCHG_LOCAL
+#ifndef SLUB_USE_CMPXCHG_DOUBLE
local_irq_save(flags);
#else
@@ -2136,7 +2141,7 @@ redo:
*/
c = __this_cpu_ptr(s->cpu_slab);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
tid = c->tid;
barrier();
#endif
@@ -2144,7 +2149,7 @@ redo:
if (likely(page == c->page && c->node != NUMA_NO_NODE)) {
set_freepointer(s, object, c->freelist);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
if (unlikely(!this_cpu_cmpxchg_double(
s->cpu_slab->freelist, s->cpu_slab->tid,
c->freelist, tid,
@@ -2160,7 +2165,7 @@ redo:
} else
__slab_free(s, page, x, addr);
-#ifndef CONFIG_CMPXCHG_LOCAL
+#ifndef SLUB_USE_CMPXCHG_DOUBLE
local_irq_restore(flags);
#endif
}
@@ -2354,7 +2359,7 @@ static inline int alloc_kmem_cache_cpus(struct kmem_cache *s)
BUILD_BUG_ON(PERCPU_DYNAMIC_EARLY_SIZE <
SLUB_PAGE_SHIFT * sizeof(struct kmem_cache_cpu));
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
/*
* Must align to double word boundary for the double cmpxchg instructions
* to work.
^ permalink raw reply related
* Re: [PATCH v2] net: r8169: convert to hw_features
From: David Dillow @ 2011-04-19 3:24 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev, Realtek, davem
In-Reply-To: <20110418180857.GB18469@electric-eye.fr.zoreil.com>
On Mon, 2011-04-18 at 20:08 +0200, Francois Romieu wrote:
> [...]
> > I've attached my ancient patch, if it helps.
>
> Thanks, it works way better now (see below). It is ok for me to use
> you s-o-b on it ?
You may have it if you want it -- and I appreciate the offer -- but I
don't think you need it. You had it mostly working prior to my sending
you anything.
You did the work; you deserve the credit.
Thanks,
Dave
^ permalink raw reply
* Re: DSCP values in TCP handshake
From: Mikael Abrahamsson @ 2011-04-19 3:50 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Joe Buehler, Eric Dumazet, netdev
In-Reply-To: <20110418144908.55967b06@nehalam>
On Mon, 18 Apr 2011, Stephen Hemminger wrote:
> If the DSCP bits are reflected, then it could allow for even better SYN
> flood attack. Attacker could maliciously set DSCP to elevate priority
> processing of his bogus SYN packets and also cause SYN-ACK on reverse
> path to also take priority.
Incoming, it's already too late. Outgoing, yes, that might be a problem,
but if you have a QoS enabled network then you might as well solve that in
the network, not in the host.
Does Linux internally look at DSCP when deciding what SYNs to handle
first? If not, I think the above reasoning is misdirected.
--
Mikael Abrahamsson email: swmike@swm.pp.se
^ permalink raw reply
* RE: Low performance Intel 10GE NIC (3.2.10) on 2.6.38 Kernel
From: Wei Gu @ 2011-04-19 4:09 UTC (permalink / raw)
To: Jesse Brandeburg
Cc: Peter Zijlstra, Eric Dumazet, Alexander Duyck, netdev,
Kirsher, Jeffrey T, Mike Galbraith, Thomas Gleixner
In-Reply-To: <BANLkTin_OgBo3N8qi5cF5rOd__pRKifwsg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]
Hi,
This is the result that I running the turbostat via 2.6.35.3 and perform the same load test on eth10 (8 tx/rx queue binding to core 24-31) according you instruction.
I was add the processor.max_cstate=1 in the boot params, and also disabled the cstate in the BIOS. But looks like the kernel does take them.
Thanks
WeiGu
-----Original Message-----
From: Jesse Brandeburg [mailto:jesse.brandeburg@gmail.com]
Sent: Tuesday, April 19, 2011 5:12 AM
To: Wei Gu
Cc: Peter Zijlstra; Eric Dumazet; Alexander Duyck; netdev; Kirsher, Jeffrey T; Mike Galbraith; Thomas Gleixner
Subject: Re: Low performance Intel 10GE NIC (3.2.10) on 2.6.38 Kernel
On Fri, Apr 15, 2011 at 2:14 AM, Wei Gu <wei.gu@ericsson.com> wrote:
> Is there something that I can provide in order to identify the problem?
for power state concerns you may want to try running turbostat (available in recent kernels, runs also on older kernels) during the workload in question. Capture the results via something like:
cd /home/jbrandeb/linux-2.6.38.2/tools/power/x86/turbostat
make
for i in `seq 1 10` ; do ./turbostat -v sleep 5 >> turbostat.txt 2>&1 ; done
Jesse
[-- Attachment #2: turbostat.txt --]
[-- Type: text/plain, Size: 44410 bytes --]
GenuineIntel 11 CPUID levels; family:model:stepping 0x6:2e:6 (6:46:6)
8 * 133 = 1067 MHz max efficiency
17 * 133 = 2267 MHz TSC frequency
pkg core CPU %c0 GHz TSC %c1 %c3 %c6 %pc3 %pc6
3.80 2.14 2.27 15.66 80.54 0.00 72.50 0.00
0 0 0 2.08 1.89 2.27 2.48 95.44 0.00 94.89 0.00
0 0 32 0.39 1.81 2.27 4.17 95.44 0.00 94.89 0.00
0 1 1 0.69 1.90 2.27 1.96 97.35 0.00 94.90 0.00
0 1 33 0.34 1.90 2.27 2.31 97.35 0.00 94.90 0.00
0 2 2 0.33 1.93 2.27 0.13 99.54 0.00 94.90 0.00
0 2 34 0.32 1.93 2.27 0.15 99.54 0.00 94.90 0.00
0 3 3 0.33 1.93 2.27 1.87 97.80 0.00 94.91 0.00
0 3 35 0.31 1.93 2.27 1.88 97.80 0.00 94.91 0.00
0 8 4 0.32 1.93 2.27 1.87 97.80 0.00 94.91 0.00
0 8 36 0.31 1.94 2.27 1.88 97.81 0.00 94.92 0.00
0 9 5 0.32 1.93 2.27 1.86 97.82 0.00 94.92 0.00
0 9 37 0.30 1.95 2.27 1.88 97.82 0.00 94.92 0.00
0 10 6 0.32 1.96 2.27 1.85 97.83 0.00 94.92 0.00
0 10 38 0.31 1.96 2.27 1.86 97.83 0.00 94.93 0.00
0 11 7 0.33 1.89 2.27 1.84 97.83 0.00 94.93 0.00
0 11 39 0.35 1.92 2.27 1.83 97.83 0.00 94.93 0.00
1 0 8 0.39 1.98 2.27 1.79 97.81 0.00 97.61 0.00
1 0 40 0.33 1.92 2.27 1.85 97.82 0.00 97.61 0.00
1 1 9 0.34 1.92 2.27 1.80 97.86 0.00 97.61 0.00
1 1 41 0.35 1.94 2.27 1.78 97.87 0.00 97.62 0.00
1 2 10 0.33 1.92 2.27 1.80 97.88 0.00 97.62 0.00
1 2 42 0.32 1.89 2.27 1.80 97.88 0.00 97.62 0.00
1 3 11 0.32 1.93 2.27 1.79 97.89 0.00 97.63 0.00
1 3 43 0.32 1.90 2.27 1.79 97.89 0.00 97.63 0.00
1 8 12 0.32 1.94 2.27 1.77 97.91 0.00 97.63 0.00
1 8 44 0.31 1.95 2.27 1.77 97.92 0.00 97.63 0.00
1 9 13 0.32 1.96 2.27 1.76 97.92 0.00 97.64 0.00
1 9 45 0.31 1.96 2.27 1.77 97.92 0.00 97.64 0.00
1 10 14 0.32 1.95 2.27 1.75 97.93 0.00 97.64 0.00
1 10 46 0.31 1.96 2.27 1.76 97.93 0.00 97.65 0.00
1 11 15 0.32 1.87 2.27 1.75 97.93 0.00 97.65 0.00
1 11 47 0.35 1.93 2.27 1.72 97.93 0.00 97.65 0.00
2 0 16 0.36 1.89 2.27 1.72 97.92 0.00 97.37 0.00
2 0 48 0.35 1.90 2.27 1.73 97.92 0.00 97.37 0.00
2 1 17 0.39 1.86 2.27 1.83 97.78 0.00 97.37 0.00
2 1 49 0.39 1.83 2.27 1.83 97.78 0.00 97.37 0.00
2 2 18 0.36 1.89 2.27 1.85 97.79 0.00 97.37 0.00
2 2 50 0.41 1.81 2.27 1.81 97.79 0.00 97.37 0.00
2 3 19 0.34 1.94 2.27 1.68 97.98 0.00 97.38 0.00
2 3 51 0.32 1.95 2.27 1.69 97.98 0.00 97.38 0.00
2 8 20 0.33 1.95 2.26 1.68 97.99 0.00 97.38 0.00
2 8 52 0.32 1.96 2.26 1.68 97.99 0.00 97.39 0.00
2 9 21 0.33 1.95 2.26 1.66 98.00 0.00 97.39 0.00
2 9 53 0.32 1.97 2.26 1.67 98.00 0.00 97.39 0.00
2 10 22 0.33 1.95 2.26 1.66 98.01 0.00 97.40 0.00
2 10 54 0.32 1.97 2.26 1.67 98.01 0.00 97.40 0.00
2 11 23 0.35 1.88 2.26 1.65 98.00 0.00 97.40 0.00
2 11 55 0.35 1.94 2.26 1.64 98.00 0.00 97.40 0.00
3 0 24 45.64 2.25 2.26 24.86 29.51 0.00 0.00 0.00
3 0 56 0.37 2.35 2.26 70.12 29.51 0.00 0.00 0.00
3 1 25 24.02 2.11 2.26 52.07 23.91 0.00 0.00 0.00
3 1 57 0.46 2.36 2.26 75.62 23.92 0.00 0.00 0.00
3 2 26 26.37 2.14 2.26 38.14 35.49 0.00 0.00 0.00
3 2 58 0.38 2.36 2.26 64.13 35.50 0.00 0.00 0.00
3 3 27 26.51 2.13 2.26 38.86 34.63 0.00 0.00 0.00
3 3 59 0.38 2.36 2.26 64.99 34.63 0.00 0.00 0.00
3 8 28 26.50 2.13 2.26 39.08 34.41 0.00 0.00 0.00
3 8 60 0.37 2.36 2.26 65.22 34.41 0.00 0.00 0.00
3 9 29 21.08 2.17 2.26 71.14 7.78 0.00 0.00 0.00
3 9 61 0.38 2.35 2.26 91.83 7.78 0.00 0.00 0.00
3 10 30 26.05 2.12 2.26 41.47 32.48 0.00 0.00 0.00
3 10 62 0.38 2.36 2.26 67.14 32.48 0.00 0.00 0.00
3 11 31 25.59 2.11 2.26 43.60 30.81 0.00 0.00 0.00
3 11 63 0.37 2.36 2.26 68.82 30.81 0.00 0.00 0.00
5.008826 sec
GenuineIntel 11 CPUID levels; family:model:stepping 0x6:2e:6 (6:46:6)
8 * 133 = 1067 MHz max efficiency
17 * 133 = 2267 MHz TSC frequency
pkg core CPU %c0 GHz TSC %c1 %c3 %c6 %pc3 %pc6
3.15 2.16 2.26 15.01 81.84 0.00 73.01 0.00
0 0 0 1.40 1.49 2.26 1.74 96.85 0.00 96.43 0.00
0 0 32 0.36 1.82 2.26 2.79 96.85 0.00 96.43 0.00
0 1 1 0.48 1.87 2.26 0.30 99.23 0.00 96.42 0.00
0 1 33 0.34 1.90 2.26 0.43 99.22 0.00 96.42 0.00
0 2 2 0.32 1.92 2.26 1.14 98.54 0.00 96.42 0.00
0 2 34 0.31 1.92 2.26 1.16 98.54 0.00 96.42 0.00
0 3 3 0.32 1.92 2.26 1.14 98.53 0.00 96.41 0.00
0 3 35 0.31 1.92 2.26 1.16 98.53 0.00 96.41 0.00
0 8 4 0.32 1.92 2.26 1.15 98.53 0.00 96.41 0.00
0 8 36 0.30 1.93 2.26 1.17 98.53 0.00 96.41 0.00
0 9 5 0.32 1.92 2.26 1.14 98.54 0.00 96.41 0.00
0 9 37 0.30 1.95 2.26 1.17 98.53 0.00 96.41 0.00
0 10 6 0.31 1.95 2.26 1.15 98.54 0.00 96.41 0.00
0 10 38 0.31 1.96 2.26 1.15 98.54 0.00 96.41 0.00
0 11 7 0.33 1.88 2.26 1.14 98.53 0.00 96.41 0.00
0 11 39 0.34 1.92 2.26 1.13 98.53 0.00 96.41 0.00
1 0 8 0.36 1.89 2.26 1.10 98.54 0.00 98.28 0.00
1 0 40 0.33 1.89 2.26 1.13 98.54 0.00 98.27 0.00
1 1 9 0.34 1.89 2.26 1.12 98.54 0.00 98.27 0.00
1 1 41 0.32 1.91 2.26 1.14 98.54 0.00 98.26 0.00
1 2 10 0.33 1.91 2.26 1.12 98.55 0.00 98.26 0.00
1 2 42 0.33 1.90 2.26 1.13 98.54 0.00 98.26 0.00
1 3 11 0.34 1.91 2.26 1.13 98.53 0.00 98.25 0.00
1 3 43 0.33 1.91 2.26 1.14 98.53 0.00 98.25 0.00
1 8 12 0.33 1.91 2.26 1.11 98.57 0.00 98.24 0.00
1 8 44 0.31 1.93 2.26 1.13 98.56 0.00 98.24 0.00
1 9 13 0.32 1.93 2.26 1.11 98.57 0.00 98.24 0.00
1 9 45 0.31 1.94 2.26 1.13 98.56 0.00 98.23 0.00
1 10 14 0.33 1.93 2.26 0.15 99.52 0.00 98.23 0.00
1 10 46 0.32 1.96 2.26 0.16 99.52 0.00 98.22 0.00
1 11 15 0.33 1.86 2.26 1.11 98.56 0.00 98.22 0.00
1 11 47 0.35 1.91 2.26 1.10 98.56 0.00 98.22 0.00
2 0 16 0.36 1.87 2.26 1.10 98.54 0.00 97.45 0.00
2 0 48 0.35 1.88 2.26 1.11 98.54 0.00 97.45 0.00
2 1 17 0.36 1.88 2.26 0.87 98.77 0.00 97.44 0.00
2 1 49 0.98 2.32 2.26 0.25 98.77 0.00 97.44 0.00
2 2 18 0.35 1.88 2.26 0.25 99.40 0.00 97.44 0.00
2 2 50 0.38 1.79 2.26 0.23 99.39 0.00 97.43 0.00
2 3 19 0.34 1.92 2.26 0.11 99.55 0.00 97.43 0.00
2 3 51 0.32 1.94 2.26 0.13 99.54 0.00 97.43 0.00
2 8 20 0.34 1.92 2.26 1.08 98.59 0.00 97.43 0.00
2 8 52 0.32 1.95 2.26 1.09 98.59 0.00 97.43 0.00
2 9 21 0.34 1.93 2.26 0.12 99.55 0.00 97.43 0.00
2 9 53 0.31 1.96 2.26 0.14 99.55 0.00 97.43 0.00
2 10 22 0.34 1.93 2.26 1.07 98.60 0.00 97.42 0.00
2 10 54 0.31 1.97 2.26 1.09 98.60 0.00 97.42 0.00
2 11 23 0.35 1.85 2.26 1.06 98.59 0.00 97.42 0.00
2 11 55 0.35 1.92 2.26 1.06 98.59 0.00 97.42 0.00
3 0 24 21.01 2.18 2.26 54.73 24.26 0.00 0.00 0.00
3 0 56 0.37 2.38 2.26 75.37 24.26 0.00 0.00 0.00
3 1 25 23.36 2.19 2.26 38.47 38.17 0.00 0.00 0.00
3 1 57 0.37 2.37 2.26 61.46 38.17 0.00 0.00 0.00
3 2 26 23.38 2.19 2.26 39.01 37.61 0.00 0.00 0.00
3 2 58 0.35 2.38 2.26 62.03 37.61 0.00 0.00 0.00
3 3 27 22.87 2.18 2.26 45.41 31.72 0.00 0.00 0.00
3 3 59 0.36 2.38 2.26 67.92 31.72 0.00 0.00 0.00
3 8 28 23.61 2.18 2.26 40.81 35.58 0.00 0.00 0.00
3 8 60 0.36 2.38 2.26 64.06 35.58 0.00 0.00 0.00
3 9 29 19.13 2.22 2.26 71.34 9.53 0.00 0.00 0.00
3 9 61 0.38 2.38 2.26 90.09 9.53 0.00 0.00 0.00
3 10 30 23.70 2.18 2.26 39.58 36.72 0.00 0.00 0.00
3 10 62 0.37 2.38 2.26 62.92 36.72 0.00 0.00 0.00
3 11 31 23.86 2.18 2.26 38.77 37.38 0.00 0.00 0.00
3 11 63 0.37 2.38 2.26 62.26 37.37 0.00 0.00 0.00
5.015708 sec
GenuineIntel 11 CPUID levels; family:model:stepping 0x6:2e:6 (6:46:6)
8 * 133 = 1067 MHz max efficiency
17 * 133 = 2267 MHz TSC frequency
pkg core CPU %c0 GHz TSC %c1 %c3 %c6 %pc3 %pc6
3.58 2.29 2.26 15.33 81.09 0.00 67.40 0.00
0 0 0 1.87 1.77 2.27 1.19 96.95 0.00 72.79 0.00
0 0 32 0.36 1.95 2.27 2.69 96.95 0.00 72.79 0.00
0 1 1 0.69 1.96 2.27 24.62 74.69 0.00 72.79 0.00
0 1 33 24.96 2.64 2.27 0.35 74.69 0.00 72.79 0.00
0 2 2 0.36 2.06 2.27 0.56 99.08 0.00 72.79 0.00
0 2 34 0.36 2.09 2.27 0.55 99.09 0.00 72.79 0.00
0 3 3 0.33 2.02 2.27 0.55 99.12 0.00 72.79 0.00
0 3 35 0.35 2.10 2.27 0.52 99.13 0.00 72.80 0.00
0 8 4 0.32 2.03 2.27 0.50 99.18 0.00 72.80 0.00
0 8 36 0.31 2.03 2.27 0.51 99.18 0.00 72.80 0.00
0 9 5 0.32 2.03 2.27 0.48 99.19 0.00 72.80 0.00
0 9 37 0.30 2.04 2.27 0.50 99.19 0.00 72.80 0.00
0 10 6 0.31 2.04 2.27 0.48 99.21 0.00 72.80 0.00
0 10 38 0.30 2.04 2.27 0.50 99.20 0.00 72.80 0.00
0 11 7 0.33 1.99 2.27 0.19 99.48 0.00 72.80 0.00
0 11 39 0.34 2.01 2.27 0.18 99.49 0.00 72.80 0.00
1 0 8 0.60 1.82 2.27 0.48 98.92 0.00 98.45 0.00
1 0 40 0.33 1.92 2.27 0.75 98.92 0.00 98.46 0.00
1 1 9 0.55 1.88 2.27 0.54 98.91 0.00 98.46 0.00
1 1 41 0.75 2.09 2.27 0.34 98.91 0.00 98.46 0.00
1 2 10 0.56 1.89 2.27 0.49 98.95 0.00 98.46 0.00
1 2 42 0.48 1.95 2.26 0.57 98.95 0.00 98.47 0.00
1 3 11 0.33 1.94 2.26 0.40 99.28 0.00 98.47 0.00
1 3 43 0.33 1.92 2.26 0.39 99.28 0.00 98.47 0.00
1 8 12 0.33 1.95 2.26 0.37 99.30 0.00 98.47 0.00
1 8 44 0.31 1.96 2.26 0.39 99.30 0.00 98.47 0.00
1 9 13 0.32 1.96 2.26 0.37 99.31 0.00 98.47 0.00
1 9 45 0.31 1.96 2.26 0.38 99.32 0.00 98.47 0.00
1 10 14 0.32 1.96 2.26 0.37 99.31 0.00 98.47 0.00
1 10 46 0.31 1.97 2.26 0.38 99.31 0.00 98.47 0.00
1 11 15 0.33 1.89 2.26 0.35 99.32 0.00 98.48 0.00
1 11 47 0.34 1.93 2.26 0.34 99.32 0.00 98.48 0.00
2 0 16 0.44 1.84 2.26 0.37 99.19 0.00 98.32 0.00
2 0 48 0.34 1.89 2.26 0.47 99.19 0.00 98.32 0.00
2 1 17 0.38 1.84 2.26 0.74 98.87 0.00 98.32 0.00
2 1 49 0.55 1.82 2.26 0.58 98.88 0.00 98.32 0.00
2 2 18 0.37 1.86 2.26 0.60 99.03 0.00 98.32 0.00
2 2 50 0.46 1.77 2.26 0.51 99.04 0.00 98.33 0.00
2 3 19 0.34 1.93 2.26 0.32 99.34 0.00 98.32 0.00
2 3 51 0.33 1.94 2.26 0.33 99.34 0.00 98.32 0.00
2 8 20 0.34 1.95 2.26 0.30 99.36 0.00 98.32 0.00
2 8 52 0.33 1.95 2.26 0.31 99.36 0.00 98.33 0.00
2 9 21 0.34 1.94 2.26 0.29 99.38 0.00 98.33 0.00
2 9 53 0.32 1.94 2.26 0.30 99.38 0.00 98.33 0.00
2 10 22 0.34 1.95 2.26 0.29 99.37 0.00 98.33 0.00
2 10 54 0.33 1.97 2.26 0.30 99.37 0.00 98.33 0.00
2 11 23 0.35 1.87 2.26 0.28 99.37 0.00 98.34 0.00
2 11 55 0.36 1.93 2.26 0.27 99.38 0.00 98.34 0.00
3 0 24 23.26 2.28 2.26 52.94 23.81 0.00 0.00 0.00
3 0 56 0.47 2.39 2.26 75.73 23.81 0.00 0.00 0.00
3 1 25 25.49 2.29 2.26 36.60 37.92 0.00 0.00 0.00
3 1 57 0.50 2.38 2.26 61.58 37.92 0.00 0.00 0.00
3 2 26 22.22 2.27 2.26 47.44 30.34 0.00 0.00 0.00
3 2 58 0.38 2.38 2.26 69.27 30.34 0.00 0.00 0.00
3 3 27 22.00 2.26 2.26 48.10 29.90 0.00 0.00 0.00
3 3 59 0.37 2.39 2.26 69.73 29.90 0.00 0.00 0.00
3 8 28 23.23 2.27 2.26 40.40 36.36 0.00 0.00 0.00
3 8 60 0.36 2.38 2.26 63.27 36.36 0.00 0.00 0.00
3 9 29 18.73 2.29 2.26 72.33 8.94 0.00 0.00 0.00
3 9 61 0.40 2.39 2.26 90.67 8.94 0.00 0.00 0.00
3 10 30 23.25 2.27 2.26 40.08 36.68 0.00 0.00 0.00
3 10 62 0.40 2.38 2.26 62.93 36.68 0.00 0.00 0.00
3 11 31 23.29 2.27 2.26 39.99 36.72 0.00 0.00 0.00
3 11 63 0.38 2.39 2.26 62.90 36.72 0.00 0.00 0.00
5.009804 sec
GenuineIntel 11 CPUID levels; family:model:stepping 0x6:2e:6 (6:46:6)
8 * 133 = 1067 MHz max efficiency
17 * 133 = 2267 MHz TSC frequency
pkg core CPU %c0 GHz TSC %c1 %c3 %c6 %pc3 %pc6
3.39 2.04 2.26 15.22 81.39 0.00 72.22 0.00
0 0 0 1.39 1.49 2.26 2.82 95.79 0.00 95.39 0.00
0 0 32 0.35 1.82 2.26 3.86 95.79 0.00 95.38 0.00
0 1 1 0.50 1.96 2.26 0.34 99.16 0.00 95.38 0.00
0 1 33 0.34 1.93 2.26 0.50 99.16 0.00 95.38 0.00
0 2 2 0.33 1.93 2.26 2.21 97.46 0.00 95.38 0.00
0 2 34 0.31 1.93 2.26 2.23 97.46 0.00 95.37 0.00
0 3 3 0.32 1.91 2.26 2.21 97.47 0.00 95.37 0.00
0 3 35 0.31 1.92 2.26 2.22 97.47 0.00 95.37 0.00
0 8 4 0.32 1.93 2.26 2.20 97.48 0.00 95.36 0.00
0 8 36 0.30 1.94 2.26 2.22 97.48 0.00 95.36 0.00
0 9 5 0.32 1.92 2.26 2.20 97.48 0.00 95.36 0.00
0 9 37 0.30 1.95 2.26 2.22 97.48 0.00 95.36 0.00
0 10 6 0.31 1.96 2.26 2.20 97.49 0.00 95.35 0.00
0 10 38 0.30 1.95 2.26 2.21 97.49 0.00 95.35 0.00
0 11 7 0.33 1.89 2.26 2.19 97.48 0.00 95.35 0.00
0 11 39 0.34 1.92 2.26 2.18 97.48 0.00 95.35 0.00
1 0 8 0.44 2.03 2.26 2.17 97.40 0.00 97.15 0.00
1 0 40 0.33 1.90 2.26 2.27 97.40 0.00 97.15 0.00
1 1 9 0.33 1.89 2.26 2.18 97.48 0.00 97.14 0.00
1 1 41 0.34 1.93 2.26 2.18 97.48 0.00 97.14 0.00
1 2 10 0.32 1.90 2.26 2.19 97.49 0.00 97.14 0.00
1 2 42 0.32 1.90 2.26 2.19 97.49 0.00 97.14 0.00
1 3 11 0.32 1.91 2.26 2.19 97.49 0.00 97.14 0.00
1 3 43 0.31 1.90 2.26 2.20 97.49 0.00 97.14 0.00
1 8 12 0.32 1.92 2.26 2.17 97.52 0.00 97.14 0.00
1 8 44 0.30 1.93 2.26 2.18 97.52 0.00 97.14 0.00
1 9 13 0.31 1.93 2.26 2.17 97.52 0.00 97.14 0.00
1 9 45 0.30 1.94 2.26 2.18 97.52 0.00 97.14 0.00
1 10 14 0.32 1.93 2.26 2.17 97.50 0.00 97.14 0.00
1 10 46 0.31 1.95 2.26 2.19 97.50 0.00 97.14 0.00
1 11 15 0.32 1.86 2.26 2.17 97.51 0.00 97.14 0.00
1 11 47 0.34 1.92 2.26 2.15 97.50 0.00 97.14 0.00
2 0 16 0.36 1.86 2.26 2.14 97.50 0.00 96.39 0.00
2 0 48 0.34 1.87 2.26 2.16 97.50 0.00 96.39 0.00
2 1 17 0.36 1.88 2.26 2.78 96.86 0.00 96.39 0.00
2 1 49 0.92 2.31 2.26 2.22 96.86 0.00 96.39 0.00
2 2 18 0.35 1.88 2.26 2.28 97.37 0.00 96.38 0.00
2 2 50 0.40 1.81 2.26 2.23 97.37 0.00 96.38 0.00
2 3 19 0.34 1.91 2.26 2.11 97.56 0.00 96.38 0.00
2 3 51 0.31 1.94 2.26 2.13 97.56 0.00 96.38 0.00
2 8 20 0.33 1.93 2.26 2.11 97.56 0.00 96.38 0.00
2 8 52 0.32 1.95 2.26 2.12 97.56 0.00 96.38 0.00
2 9 21 0.33 1.93 2.26 2.10 97.57 0.00 96.39 0.00
2 9 53 0.31 1.96 2.26 2.12 97.57 0.00 96.39 0.00
2 10 22 0.33 1.92 2.26 2.10 97.56 0.00 96.38 0.00
2 10 54 0.31 1.95 2.26 2.13 97.56 0.00 96.38 0.00
2 11 23 0.34 1.85 2.26 2.10 97.56 0.00 96.38 0.00
2 11 55 0.34 1.93 2.26 2.10 97.56 0.00 96.38 0.00
3 0 24 23.67 2.05 2.26 45.88 30.45 0.00 0.01 0.00
3 0 56 0.35 2.34 2.26 69.20 30.45 0.00 0.01 0.00
3 1 25 25.02 2.06 2.26 36.69 38.29 0.00 0.01 0.00
3 1 57 0.40 2.35 2.26 61.32 38.29 0.00 0.01 0.00
3 2 26 25.18 2.05 2.26 36.58 38.23 0.00 0.01 0.00
3 2 58 0.36 2.35 2.26 61.41 38.23 0.00 0.01 0.00
3 3 27 25.51 2.04 2.26 36.77 37.72 0.00 0.01 0.00
3 3 59 0.36 2.34 2.26 61.93 37.72 0.00 0.01 0.00
3 8 28 25.31 2.04 2.26 37.71 36.98 0.00 0.01 0.00
3 8 60 0.35 2.35 2.26 62.67 36.98 0.00 0.01 0.00
3 9 29 20.43 2.10 2.26 70.01 9.56 0.00 0.01 0.00
3 9 61 0.38 2.35 2.26 90.05 9.56 0.00 0.01 0.00
3 10 30 25.52 2.04 2.26 37.60 36.88 0.00 0.01 0.00
3 10 62 0.37 2.35 2.26 62.75 36.88 0.00 0.01 0.00
3 11 31 25.48 2.04 2.26 37.24 37.28 0.00 0.01 0.00
3 11 63 0.37 2.35 2.26 62.35 37.28 0.00 0.01 0.00
5.015194 sec
GenuineIntel 11 CPUID levels; family:model:stepping 0x6:2e:6 (6:46:6)
8 * 133 = 1067 MHz max efficiency
17 * 133 = 2267 MHz TSC frequency
pkg core CPU %c0 GHz TSC %c1 %c3 %c6 %pc3 %pc6
3.54 2.14 2.27 15.67 80.79 0.00 70.38 0.00
0 0 0 1.37 1.53 2.27 2.01 96.62 0.00 96.29 0.00
0 0 32 0.38 1.84 2.27 3.00 96.62 0.00 96.29 0.00
0 1 1 0.43 1.89 2.27 0.47 99.10 0.00 96.29 0.00
0 1 33 0.34 1.92 2.27 0.55 99.10 0.00 96.30 0.00
0 2 2 0.33 1.94 2.27 0.12 99.55 0.00 96.30 0.00
0 2 34 0.32 1.95 2.27 0.13 99.56 0.00 96.31 0.00
0 3 3 0.33 1.94 2.27 1.48 98.19 0.00 96.31 0.00
0 3 35 0.32 1.95 2.27 1.49 98.19 0.00 96.31 0.00
0 8 4 0.33 1.95 2.27 1.47 98.20 0.00 96.32 0.00
0 8 36 0.31 1.95 2.27 1.49 98.20 0.00 96.32 0.00
0 9 5 0.33 1.96 2.27 1.46 98.21 0.00 96.32 0.00
0 9 37 0.30 1.97 2.27 1.48 98.21 0.00 96.33 0.00
0 10 6 0.33 1.97 2.27 1.45 98.22 0.00 96.33 0.00
0 10 38 0.30 1.99 2.27 1.47 98.23 0.00 96.33 0.00
0 11 7 0.34 1.90 2.27 1.44 98.22 0.00 96.34 0.00
0 11 39 0.34 1.94 2.27 1.44 98.22 0.00 96.34 0.00
1 0 8 12.29 2.62 2.27 0.09 87.61 0.00 87.37 0.00
1 0 40 0.34 1.96 2.27 12.05 87.62 0.00 87.37 0.00
1 1 9 0.35 1.95 2.27 1.41 98.24 0.00 87.37 0.00
1 1 41 0.32 1.96 2.27 1.43 98.24 0.00 87.38 0.00
1 2 10 0.34 1.97 2.27 1.41 98.25 0.00 87.38 0.00
1 2 42 0.33 1.97 2.27 1.41 98.26 0.00 87.38 0.00
1 3 11 0.34 1.95 2.27 1.41 98.24 0.00 87.38 0.00
1 3 43 0.33 1.96 2.27 1.42 98.25 0.00 87.39 0.00
1 8 12 0.33 1.97 2.27 1.38 98.30 0.00 87.39 0.00
1 8 44 0.30 1.98 2.27 1.40 98.30 0.00 87.39 0.00
1 9 13 0.32 1.98 2.27 1.37 98.31 0.00 87.40 0.00
1 9 45 0.31 1.99 2.27 1.39 98.31 0.00 87.40 0.00
1 10 14 0.33 1.99 2.27 1.37 98.30 0.00 87.40 0.00
1 10 46 0.32 2.01 2.27 1.38 98.30 0.00 87.40 0.00
1 11 15 0.34 1.93 2.27 0.13 99.54 0.00 87.41 0.00
1 11 47 0.35 1.97 2.27 0.11 99.54 0.00 87.41 0.00
2 0 16 0.36 1.88 2.27 1.35 98.29 0.00 97.75 0.00
2 0 48 0.35 1.89 2.27 1.37 98.29 0.00 97.75 0.00
2 1 17 0.36 1.87 2.27 0.37 99.26 0.00 97.75 0.00
2 1 49 0.50 1.96 2.27 0.23 99.27 0.00 97.75 0.00
2 2 18 0.35 1.88 2.27 0.54 99.10 0.00 97.75 0.00
2 2 50 0.41 1.75 2.27 0.49 99.11 0.00 97.75 0.00
2 3 19 0.33 1.93 2.27 1.31 98.36 0.00 97.76 0.00
2 3 51 0.32 1.94 2.26 1.32 98.37 0.00 97.76 0.00
2 8 20 0.34 1.95 2.26 1.30 98.36 0.00 97.76 0.00
2 8 52 0.33 1.96 2.26 1.31 98.37 0.00 97.77 0.00
2 9 21 0.33 1.94 2.26 1.28 98.38 0.00 97.77 0.00
2 9 53 0.31 1.95 2.26 1.30 98.39 0.00 97.77 0.00
2 10 22 0.33 1.94 2.26 1.28 98.39 0.00 97.78 0.00
2 10 54 0.31 1.96 2.26 1.29 98.40 0.00 97.78 0.00
2 11 23 0.35 1.88 2.26 1.26 98.39 0.00 97.78 0.00
2 11 55 0.35 1.93 2.26 1.26 98.39 0.00 97.79 0.00
3 0 24 22.63 2.12 2.26 54.65 22.72 0.00 0.01 0.00
3 0 56 0.38 2.36 2.26 76.90 22.72 0.00 0.01 0.00
3 1 25 24.08 2.12 2.26 46.84 29.08 0.00 0.01 0.00
3 1 57 0.40 2.32 2.26 70.52 29.08 0.00 0.01 0.00
3 2 26 25.21 2.12 2.26 39.84 34.95 0.00 0.01 0.00
3 2 58 0.37 2.36 2.26 64.68 34.95 0.00 0.01 0.00
3 3 27 25.35 2.12 2.26 40.20 34.45 0.00 0.01 0.00
3 3 59 0.37 2.36 2.26 65.18 34.45 0.00 0.01 0.00
3 8 28 25.60 2.12 2.26 40.30 34.10 0.00 0.01 0.00
3 8 60 0.36 2.37 2.26 65.54 34.10 0.00 0.01 0.00
3 9 29 20.63 2.16 2.26 70.53 8.85 0.00 0.01 0.00
3 9 61 0.38 2.34 2.26 90.77 8.85 0.00 0.01 0.00
3 10 30 25.61 2.12 2.26 40.04 34.36 0.00 0.01 0.00
3 10 62 0.37 2.37 2.26 65.28 34.36 0.00 0.01 0.00
3 11 31 25.58 2.12 2.26 39.80 34.62 0.00 0.01 0.00
3 11 63 0.38 2.36 2.26 65.00 34.62 0.00 0.01 0.00
5.009084 sec
GenuineIntel 11 CPUID levels; family:model:stepping 0x6:2e:6 (6:46:6)
8 * 133 = 1067 MHz max efficiency
17 * 133 = 2267 MHz TSC frequency
pkg core CPU %c0 GHz TSC %c1 %c3 %c6 %pc3 %pc6
3.32 2.20 2.26 14.79 81.89 0.00 72.75 0.00
0 0 0 2.11 1.58 2.26 1.42 96.47 0.00 95.45 0.00
0 0 32 0.76 2.19 2.26 2.78 96.46 0.00 95.44 0.00
0 1 1 0.56 1.92 2.26 0.41 99.03 0.00 95.44 0.00
0 1 33 0.50 2.08 2.26 0.47 99.03 0.00 95.44 0.00
0 2 2 0.33 1.93 2.26 0.84 98.83 0.00 95.43 0.00
0 2 34 0.37 1.98 2.26 0.80 98.83 0.00 95.43 0.00
0 3 3 0.33 1.93 2.26 0.77 98.90 0.00 95.42 0.00
0 3 35 0.31 1.94 2.26 0.79 98.90 0.00 95.42 0.00
0 8 4 0.32 1.93 2.26 0.78 98.90 0.00 95.42 0.00
0 8 36 0.31 1.95 2.26 0.80 98.89 0.00 95.41 0.00
0 9 5 0.33 1.93 2.26 0.78 98.90 0.00 95.40 0.00
0 9 37 0.30 1.96 2.26 0.80 98.89 0.00 95.39 0.00
0 10 6 0.31 1.96 2.26 0.77 98.91 0.00 95.39 0.00
0 10 38 0.30 1.97 2.26 0.79 98.91 0.00 95.38 0.00
0 11 7 0.34 1.90 2.26 0.76 98.90 0.00 95.37 0.00
0 11 39 0.34 1.94 2.26 0.76 98.90 0.00 95.37 0.00
1 0 8 0.43 1.81 2.26 0.77 98.80 0.00 98.33 0.00
1 0 40 0.33 1.89 2.26 0.88 98.80 0.00 98.33 0.00
1 1 9 0.43 1.84 2.26 0.33 99.23 0.00 98.32 0.00
1 1 41 0.50 2.04 2.26 0.27 99.23 0.00 98.32 0.00
1 2 10 0.46 1.83 2.26 0.82 98.72 0.00 98.31 0.00
1 2 42 0.42 1.93 2.26 0.86 98.72 0.00 98.31 0.00
1 3 11 0.33 1.91 2.26 0.74 98.93 0.00 98.31 0.00
1 3 43 0.32 1.91 2.26 0.76 98.92 0.00 98.30 0.00
1 8 12 0.32 1.92 2.26 0.73 98.95 0.00 98.29 0.00
1 8 44 0.31 1.93 2.26 0.74 98.95 0.00 98.29 0.00
1 9 13 0.33 1.94 2.26 0.72 98.95 0.00 98.28 0.00
1 9 45 0.31 1.95 2.26 0.74 98.95 0.00 98.28 0.00
1 10 14 0.32 1.94 2.26 0.73 98.94 0.00 98.27 0.00
1 10 46 0.31 1.96 2.26 0.75 98.94 0.00 98.27 0.00
1 11 15 0.33 1.87 2.26 0.73 98.94 0.00 98.26 0.00
1 11 47 0.35 1.92 2.26 0.71 98.94 0.00 98.26 0.00
2 0 16 0.36 1.87 2.26 0.71 98.93 0.00 97.44 0.00
2 0 48 0.34 1.89 2.26 0.73 98.93 0.00 97.43 0.00
2 1 17 0.41 1.80 2.26 1.10 98.49 0.00 97.43 0.00
2 1 49 1.06 2.24 2.26 0.45 98.49 0.00 97.43 0.00
2 2 18 0.36 1.88 2.26 0.86 98.78 0.00 97.42 0.00
2 2 50 0.40 1.80 2.26 0.83 98.78 0.00 97.42 0.00
2 3 19 0.34 1.90 2.26 0.73 98.93 0.00 97.41 0.00
2 3 51 0.34 1.92 2.26 0.73 98.93 0.00 97.41 0.00
2 8 20 0.34 1.93 2.26 0.12 99.54 0.00 97.40 0.00
2 8 52 0.32 1.96 2.26 0.14 99.54 0.00 97.40 0.00
2 9 21 0.34 1.93 2.26 0.68 98.98 0.00 97.40 0.00
2 9 53 0.32 1.96 2.26 0.71 98.97 0.00 97.39 0.00
2 10 22 0.35 1.90 2.26 0.73 98.93 0.00 97.39 0.00
2 10 54 0.32 1.93 2.26 0.75 98.92 0.00 97.38 0.00
2 11 23 0.36 1.83 2.26 0.73 98.91 0.00 97.38 0.00
2 11 55 0.37 1.88 2.26 0.72 98.91 0.00 97.38 0.00
3 0 24 23.45 2.23 2.26 39.49 37.06 0.00 0.00 0.00
3 0 56 0.37 2.38 2.26 62.57 37.06 0.00 0.00 0.00
3 1 25 29.87 2.27 2.26 39.27 30.86 0.00 0.00 0.00
3 1 57 0.56 2.14 2.26 68.58 30.86 0.00 0.00 0.00
3 2 26 22.93 2.22 2.26 42.96 34.10 0.00 0.00 0.00
3 2 58 0.41 2.38 2.26 65.49 34.10 0.00 0.00 0.00
3 3 27 24.10 2.22 2.26 37.63 38.27 0.00 0.00 0.00
3 3 59 0.37 2.39 2.26 61.37 38.26 0.00 0.00 0.00
3 8 28 21.83 2.20 2.26 53.12 25.06 0.00 0.00 0.00
3 8 60 0.38 2.38 2.26 74.57 25.06 0.00 0.00 0.00
3 9 29 18.89 2.25 2.26 72.83 8.29 0.00 0.00 0.00
3 9 61 0.39 2.39 2.26 91.33 8.28 0.00 0.00 0.00
3 10 30 24.00 2.22 2.26 38.22 37.78 0.00 0.00 0.00
3 10 62 0.36 2.38 2.26 61.86 37.78 0.00 0.00 0.00
3 11 31 24.25 2.23 2.26 37.82 37.93 0.00 0.00 0.00
3 11 63 0.38 2.39 2.26 61.69 37.93 0.00 0.00 0.00
5.023682 sec
GenuineIntel 11 CPUID levels; family:model:stepping 0x6:2e:6 (6:46:6)
8 * 133 = 1067 MHz max efficiency
17 * 133 = 2267 MHz TSC frequency
pkg core CPU %c0 GHz TSC %c1 %c3 %c6 %pc3 %pc6
3.73 2.33 2.26 17.24 79.03 0.00 72.26 0.00
0 0 0 1.38 1.54 2.27 0.86 97.76 0.00 95.00 0.00
0 0 32 0.39 1.78 2.27 1.85 97.76 0.00 94.99 0.00
0 1 1 0.82 1.95 2.27 0.15 99.02 0.00 95.00 0.00
0 1 33 0.34 1.90 2.27 0.64 99.02 0.00 95.00 0.00
0 2 2 0.34 1.93 2.27 2.40 97.26 0.00 95.00 0.00
0 2 34 0.32 1.95 2.27 2.42 97.26 0.00 95.00 0.00
0 3 3 0.33 1.93 2.27 2.39 97.28 0.00 95.00 0.00
0 3 35 0.31 1.94 2.27 2.40 97.28 0.00 95.00 0.00
0 8 4 0.33 1.94 2.27 2.39 97.28 0.00 95.00 0.00
0 8 36 0.31 1.95 2.27 2.41 97.28 0.00 95.01 0.00
0 9 5 0.33 1.95 2.26 2.38 97.30 0.00 95.01 0.00
0 9 37 0.31 1.96 2.26 2.40 97.30 0.00 95.01 0.00
0 10 6 0.32 1.97 2.26 2.37 97.31 0.00 95.01 0.00
0 10 38 0.31 1.97 2.26 2.39 97.31 0.00 95.01 0.00
0 11 7 0.33 1.88 2.26 2.37 97.30 0.00 95.01 0.00
0 11 39 0.34 1.93 2.26 2.36 97.30 0.00 95.01 0.00
1 0 8 0.34 1.88 2.26 2.31 97.35 0.00 97.13 0.00
1 0 40 0.33 1.89 2.27 2.33 97.34 0.00 97.12 0.00
1 1 9 0.34 1.92 2.27 0.32 99.33 0.00 97.12 0.00
1 1 41 0.52 2.10 2.27 0.14 99.34 0.00 97.12 0.00
1 2 10 0.33 1.93 2.27 2.34 97.33 0.00 97.12 0.00
1 2 42 0.33 1.90 2.27 2.33 97.33 0.00 97.12 0.00
1 3 11 0.33 1.93 2.26 2.33 97.34 0.00 97.13 0.00
1 3 43 0.33 1.91 2.26 2.33 97.34 0.00 97.13 0.00
1 8 12 0.32 1.94 2.26 2.31 97.37 0.00 97.13 0.00
1 8 44 0.31 1.94 2.26 2.32 97.37 0.00 97.12 0.00
1 9 13 0.32 1.95 2.26 2.30 97.37 0.00 97.13 0.00
1 9 45 0.31 1.95 2.26 2.31 97.37 0.00 97.13 0.00
1 10 14 0.32 1.95 2.26 2.30 97.37 0.00 97.13 0.00
1 10 46 0.31 1.96 2.26 2.31 97.37 0.00 97.13 0.00
1 11 15 0.34 1.89 2.26 2.29 97.37 0.00 97.13 0.00
1 11 47 0.35 1.93 2.26 2.27 97.38 0.00 97.13 0.00
2 0 16 0.35 1.89 2.26 2.27 97.38 0.00 96.88 0.00
2 0 48 0.34 1.89 2.26 2.28 97.38 0.00 96.88 0.00
2 1 17 0.36 1.89 2.26 2.38 97.26 0.00 96.88 0.00
2 1 49 0.41 1.86 2.26 2.33 97.26 0.00 96.88 0.00
2 2 18 0.35 1.89 2.26 2.38 97.27 0.00 96.89 0.00
2 2 50 0.38 1.86 2.26 2.35 97.27 0.00 96.89 0.00
2 3 19 0.33 1.93 2.26 2.24 97.42 0.00 96.89 0.00
2 3 51 0.33 1.94 2.26 2.25 97.42 0.00 96.89 0.00
2 8 20 0.33 1.95 2.26 2.22 97.44 0.00 96.90 0.00
2 8 52 0.32 1.96 2.26 2.24 97.44 0.00 96.90 0.00
2 9 21 0.33 1.94 2.26 2.21 97.46 0.00 96.90 0.00
2 9 53 0.31 1.95 2.26 2.23 97.46 0.00 96.90 0.00
2 10 22 0.33 1.94 2.26 2.21 97.45 0.00 96.90 0.00
2 10 54 0.32 1.96 2.26 2.23 97.45 0.00 96.90 0.00
2 11 23 0.35 1.88 2.26 2.20 97.45 0.00 96.90 0.00
2 11 55 0.35 1.93 2.26 2.20 97.45 0.00 96.90 0.00
3 0 24 38.90 2.37 2.26 46.33 14.77 0.00 0.00 0.00
3 0 56 0.38 2.40 2.26 84.85 14.77 0.00 0.00 0.00
3 1 25 38.88 2.37 2.26 43.26 17.86 0.00 0.00 0.00
3 1 57 0.41 2.40 2.26 81.72 17.86 0.00 0.00 0.00
3 2 26 24.56 2.36 2.26 42.69 32.75 0.00 0.00 0.00
3 2 58 0.38 2.40 2.26 66.87 32.75 0.00 0.00 0.00
3 3 27 23.57 2.35 2.26 47.96 28.48 0.00 0.00 0.00
3 3 59 0.38 2.40 2.26 71.14 28.48 0.00 0.00 0.00
3 8 28 24.84 2.35 2.26 43.04 32.12 0.00 0.00 0.00
3 8 60 0.37 2.40 2.26 67.50 32.13 0.00 0.00 0.00
3 9 29 19.74 2.36 2.26 73.41 6.85 0.00 0.00 0.00
3 9 61 0.40 2.40 2.26 92.75 6.85 0.00 0.00 0.00
3 10 30 23.73 2.35 2.26 49.21 27.06 0.00 0.00 0.00
3 10 62 0.38 2.40 2.26 72.56 27.06 0.00 0.00 0.00
3 11 31 24.01 2.35 2.26 47.64 28.35 0.00 0.00 0.00
3 11 63 0.37 2.40 2.26 71.28 28.35 0.00 0.00 0.00
5.011165 sec
GenuineIntel 11 CPUID levels; family:model:stepping 0x6:2e:6 (6:46:6)
8 * 133 = 1067 MHz max efficiency
17 * 133 = 2267 MHz TSC frequency
pkg core CPU %c0 GHz TSC %c1 %c3 %c6 %pc3 %pc6
3.27 2.09 2.26 14.38 82.35 0.00 72.86 0.00
0 0 0 1.42 1.51 2.26 1.95 96.63 0.00 96.14 0.00
0 0 32 0.36 1.82 2.26 3.01 96.63 0.00 96.13 0.00
0 1 1 0.57 1.99 2.26 1.39 98.04 0.00 96.13 0.00
0 1 33 0.33 1.89 2.26 1.63 98.04 0.00 96.13 0.00
0 2 2 0.33 1.92 2.26 1.36 98.31 0.00 96.12 0.00
0 2 34 0.31 1.92 2.26 1.38 98.31 0.00 96.12 0.00
0 3 3 0.32 1.92 2.26 1.36 98.32 0.00 96.12 0.00
0 3 35 0.31 1.92 2.26 1.37 98.32 0.00 96.11 0.00
0 8 4 0.32 1.93 2.26 1.37 98.31 0.00 96.11 0.00
0 8 36 0.31 1.94 2.26 1.38 98.31 0.00 96.11 0.00
0 9 5 0.33 1.93 2.26 1.36 98.31 0.00 96.10 0.00
0 9 37 0.31 1.95 2.26 1.38 98.31 0.00 96.10 0.00
0 10 6 0.32 1.96 2.26 1.32 98.36 0.00 96.10 0.00
0 10 38 0.31 1.96 2.26 1.33 98.36 0.00 96.09 0.00
0 11 7 0.33 1.87 2.26 1.32 98.35 0.00 96.09 0.00
0 11 39 0.34 1.92 2.26 1.31 98.35 0.00 96.09 0.00
1 0 8 0.34 1.87 2.26 1.21 98.45 0.00 98.20 0.00
1 0 40 0.33 1.89 2.26 1.22 98.45 0.00 98.19 0.00
1 1 9 0.34 1.89 2.26 0.25 99.41 0.00 98.19 0.00
1 1 41 0.43 2.02 2.26 0.17 99.41 0.00 98.19 0.00
1 2 10 0.33 1.90 2.26 1.14 98.53 0.00 98.18 0.00
1 2 42 0.32 1.90 2.26 1.15 98.53 0.00 98.18 0.00
1 3 11 0.34 1.91 2.26 0.98 98.68 0.00 98.17 0.00
1 3 43 0.32 1.91 2.26 1.00 98.67 0.00 98.17 0.00
1 8 12 0.33 1.92 2.26 0.96 98.71 0.00 98.17 0.00
1 8 44 0.31 1.93 2.26 0.98 98.71 0.00 98.16 0.00
1 9 13 0.32 1.92 2.26 0.96 98.72 0.00 98.16 0.00
1 9 45 0.30 1.94 2.26 0.98 98.72 0.00 98.15 0.00
1 10 14 0.33 1.92 2.26 0.81 98.86 0.00 98.15 0.00
1 10 46 0.31 1.95 2.26 0.83 98.86 0.00 98.15 0.00
1 11 15 0.34 1.87 2.26 0.79 98.87 0.00 98.14 0.00
1 11 47 0.34 1.91 2.26 0.79 98.87 0.00 98.14 0.00
2 0 16 0.36 1.88 2.26 1.30 98.34 0.00 97.27 0.00
2 0 48 0.35 1.90 2.26 1.32 98.33 0.00 97.26 0.00
2 1 17 0.36 1.87 2.26 1.98 97.66 0.00 97.26 0.00
2 1 49 0.93 2.31 2.26 1.41 97.66 0.00 97.26 0.00
2 2 18 0.36 1.89 2.26 0.73 98.91 0.00 97.25 0.00
2 2 50 0.37 1.84 2.26 0.72 98.91 0.00 97.25 0.00
2 3 19 0.34 1.92 2.26 0.46 99.21 0.00 97.24 0.00
2 3 51 0.32 1.95 2.26 0.48 99.20 0.00 97.24 0.00
2 8 20 0.34 1.93 2.26 0.45 99.21 0.00 97.23 0.00
2 8 52 0.32 1.96 2.26 0.47 99.21 0.00 97.23 0.00
2 9 21 0.33 1.93 2.26 0.44 99.22 0.00 97.22 0.00
2 9 53 0.31 1.97 2.26 0.47 99.22 0.00 97.22 0.00
2 10 22 0.34 1.93 2.26 1.28 98.38 0.00 97.22 0.00
2 10 54 0.32 1.98 2.26 1.30 98.38 0.00 97.22 0.00
2 11 23 0.35 1.86 2.26 0.28 99.37 0.00 97.21 0.00
2 11 55 0.35 1.94 2.26 0.29 99.36 0.00 97.21 0.00
3 0 24 21.60 2.10 2.26 54.17 24.24 0.00 0.01 0.00
3 0 56 0.36 2.35 2.26 75.40 24.24 0.00 0.01 0.00
3 1 25 24.37 2.12 2.26 36.34 39.30 0.00 0.01 0.00
3 1 57 0.40 2.35 2.26 60.31 39.30 0.00 0.01 0.00
3 2 26 24.36 2.11 2.26 35.56 40.08 0.00 0.01 0.00
3 2 58 0.37 2.36 2.26 59.55 40.08 0.00 0.01 0.00
3 3 27 24.50 2.11 2.26 36.15 39.35 0.00 0.01 0.00
3 3 59 0.36 2.35 2.26 60.29 39.35 0.00 0.01 0.00
3 8 28 24.59 2.10 2.26 36.24 39.17 0.00 0.01 0.00
3 8 60 0.35 2.36 2.26 60.48 39.17 0.00 0.01 0.00
3 9 29 19.32 2.15 2.26 70.96 9.72 0.00 0.01 0.00
3 9 61 0.42 2.36 2.26 89.87 9.72 0.00 0.01 0.00
3 10 30 24.61 2.10 2.26 36.09 39.30 0.00 0.01 0.00
3 10 62 0.36 2.36 2.26 60.34 39.30 0.00 0.01 0.00
3 11 31 24.66 2.10 2.26 35.88 39.46 0.00 0.01 0.00
3 11 63 0.36 2.36 2.26 60.18 39.46 0.00 0.01 0.00
5.021344 sec
GenuineIntel 11 CPUID levels; family:model:stepping 0x6:2e:6 (6:46:6)
8 * 133 = 1067 MHz max efficiency
17 * 133 = 2267 MHz TSC frequency
pkg core CPU %c0 GHz TSC %c1 %c3 %c6 %pc3 %pc6
3.88 2.22 2.26 15.10 81.02 0.00 72.09 0.00
0 0 0 2.59 1.56 2.26 2.36 95.05 0.00 94.36 0.00
0 0 32 0.38 1.82 2.26 4.57 95.05 0.00 94.36 0.00
0 1 1 0.70 1.91 2.26 0.73 98.56 0.00 94.36 0.00
0 1 33 0.69 2.14 2.26 0.74 98.57 0.00 94.37 0.00
0 2 2 0.33 1.92 2.26 0.65 99.02 0.00 94.37 0.00
0 2 34 0.35 1.97 2.26 0.63 99.02 0.00 94.37 0.00
0 3 3 0.32 1.92 2.26 0.57 99.10 0.00 94.36 0.00
0 3 35 0.31 1.93 2.26 0.59 99.10 0.00 94.36 0.00
0 8 4 0.33 1.94 2.26 0.57 99.10 0.00 94.36 0.00
0 8 36 0.31 1.95 2.26 0.59 99.10 0.00 94.36 0.00
0 9 5 0.32 1.94 2.26 0.57 99.11 0.00 94.37 0.00
0 9 37 0.30 1.95 2.26 0.59 99.11 0.00 94.37 0.00
0 10 6 0.32 1.95 2.26 0.56 99.12 0.00 94.37 0.00
0 10 38 0.30 1.96 2.26 0.58 99.12 0.00 94.37 0.00
0 11 7 0.33 1.89 2.26 0.56 99.11 0.00 94.37 0.00
0 11 39 0.35 1.93 2.26 0.54 99.11 0.00 94.37 0.00
1 0 8 0.39 1.86 2.26 0.51 99.09 0.00 97.45 0.00
1 0 40 0.34 1.91 2.26 0.57 99.09 0.00 97.45 0.00
1 1 9 0.44 1.76 2.26 1.55 98.02 0.00 97.45 0.00
1 1 41 1.38 2.31 2.26 0.61 98.02 0.00 97.45 0.00
1 2 10 0.35 1.92 2.26 0.14 99.51 0.00 97.45 0.00
1 2 42 0.34 1.91 2.26 0.15 99.51 0.00 97.45 0.00
1 3 11 0.34 1.94 2.26 0.48 99.18 0.00 97.45 0.00
1 3 43 0.34 1.92 2.26 0.48 99.18 0.00 97.45 0.00
1 8 12 0.33 1.95 2.26 0.45 99.22 0.00 97.45 0.00
1 8 44 0.32 1.94 2.26 0.46 99.22 0.00 97.45 0.00
1 9 13 0.33 1.96 2.26 0.45 99.22 0.00 97.45 0.00
1 9 45 0.32 1.95 2.26 0.46 99.22 0.00 97.45 0.00
1 10 14 0.33 1.97 2.26 0.45 99.22 0.00 97.45 0.00
1 10 46 0.32 1.97 2.26 0.46 99.22 0.00 97.45 0.00
1 11 15 0.34 1.89 2.26 0.44 99.22 0.00 97.45 0.00
1 11 47 0.36 1.92 2.26 0.42 99.22 0.00 97.45 0.00
2 0 16 0.58 1.97 2.26 0.54 98.88 0.00 96.52 0.00
2 0 48 0.35 1.89 2.26 0.76 98.89 0.00 96.52 0.00
2 1 17 0.49 1.74 2.26 2.00 97.51 0.00 96.52 0.00
2 1 49 1.81 2.35 2.26 0.68 97.51 0.00 96.52 0.00
2 2 18 0.37 1.89 2.26 0.60 99.02 0.00 96.52 0.00
2 2 50 0.42 1.79 2.26 0.55 99.03 0.00 96.53 0.00
2 3 19 0.36 1.91 2.26 0.49 99.15 0.00 96.53 0.00
2 3 51 0.37 1.90 2.26 0.47 99.15 0.00 96.53 0.00
2 8 20 0.34 1.95 2.26 0.39 99.27 0.00 96.53 0.00
2 8 52 0.32 1.94 2.26 0.41 99.27 0.00 96.53 0.00
2 9 21 0.34 1.95 2.26 0.38 99.28 0.00 96.54 0.00
2 9 53 0.32 1.96 2.26 0.40 99.28 0.00 96.54 0.00
2 10 22 0.34 1.95 2.26 0.39 99.27 0.00 96.54 0.00
2 10 54 0.33 1.96 2.26 0.41 99.27 0.00 96.54 0.00
2 11 23 0.35 1.87 2.26 0.13 99.52 0.00 96.54 0.00
2 11 55 0.36 1.93 2.26 0.12 99.52 0.00 96.54 0.00
3 0 24 41.44 2.30 2.26 29.71 28.85 0.00 0.01 0.00
3 0 56 0.40 2.38 2.26 70.75 28.85 0.00 0.01 0.00
3 1 25 40.89 2.29 2.26 35.82 23.30 0.00 0.01 0.00
3 1 57 0.58 2.30 2.26 76.13 23.30 0.00 0.01 0.00
3 2 26 23.28 2.21 2.26 49.56 27.16 0.00 0.01 0.00
3 2 58 0.43 2.38 2.26 72.42 27.16 0.00 0.01 0.00
3 3 27 24.34 2.21 2.26 42.50 33.16 0.00 0.01 0.00
3 3 59 0.38 2.38 2.26 66.46 33.16 0.00 0.01 0.00
3 8 28 24.35 2.21 2.26 42.62 33.03 0.00 0.01 0.00
3 8 60 0.37 2.38 2.26 66.59 33.03 0.00 0.01 0.00
3 9 29 19.99 2.24 2.26 71.27 8.73 0.00 0.01 0.00
3 9 61 0.41 2.32 2.26 90.86 8.73 0.00 0.01 0.00
3 10 30 24.33 2.20 2.26 42.93 32.74 0.00 0.01 0.00
3 10 62 0.38 2.38 2.26 66.88 32.74 0.00 0.01 0.00
3 11 31 24.49 2.21 2.26 42.75 32.76 0.00 0.01 0.00
3 11 63 0.38 2.38 2.26 66.86 32.76 0.00 0.01 0.00
5.009698 sec
GenuineIntel 11 CPUID levels; family:model:stepping 0x6:2e:6 (6:46:6)
8 * 133 = 1067 MHz max efficiency
17 * 133 = 2267 MHz TSC frequency
pkg core CPU %c0 GHz TSC %c1 %c3 %c6 %pc3 %pc6
4.10 2.09 2.26 14.93 80.97 0.00 62.47 0.00
0 0 0 1.41 1.58 2.26 2.84 95.75 0.00 95.27 0.00
0 0 32 0.36 1.82 2.26 3.90 95.74 0.00 95.26 0.00
0 1 1 0.60 1.95 2.26 0.34 99.05 0.00 95.26 0.00
0 1 33 0.51 2.07 2.26 0.44 99.05 0.00 95.25 0.00
0 2 2 0.33 1.92 2.26 2.04 97.64 0.00 95.25 0.00
0 2 34 0.31 1.93 2.26 2.05 97.64 0.00 95.25 0.00
0 3 3 0.32 1.93 2.26 2.37 97.30 0.00 95.25 0.00
0 3 35 0.31 1.93 2.26 2.39 97.30 0.00 95.25 0.00
0 8 4 0.32 1.93 2.26 2.37 97.31 0.00 95.25 0.00
0 8 36 0.30 1.93 2.26 2.38 97.31 0.00 95.25 0.00
0 9 5 0.32 1.93 2.26 2.36 97.31 0.00 95.25 0.00
0 9 37 0.30 1.95 2.26 2.39 97.31 0.00 95.25 0.00
0 10 6 0.32 1.97 2.26 2.36 97.32 0.00 95.25 0.00
0 10 38 0.31 1.96 2.26 2.37 97.32 0.00 95.25 0.00
0 11 7 0.32 1.87 2.26 1.70 97.97 0.00 95.25 0.00
0 11 39 0.33 1.91 2.26 1.70 97.97 0.00 95.24 0.00
1 0 8 0.33 2.06 2.26 2.31 97.36 0.00 58.44 0.00
1 0 40 0.31 2.08 2.26 2.33 97.36 0.00 58.44 0.00
1 1 9 0.32 2.07 2.26 1.50 98.18 0.00 58.44 0.00
1 1 41 0.32 2.09 2.26 1.51 98.18 0.00 58.44 0.00
1 2 10 0.32 2.09 2.26 2.31 97.37 0.00 58.45 0.00
1 2 42 0.31 2.10 2.26 2.32 97.37 0.00 58.45 0.00
1 3 11 40.11 2.65 2.26 1.31 58.58 0.00 58.45 0.00
1 3 43 0.34 2.13 2.26 41.08 58.58 0.00 58.44 0.00
1 8 12 0.32 2.11 2.26 2.30 97.39 0.00 58.44 0.00
1 8 44 0.30 2.12 2.26 2.32 97.39 0.00 58.44 0.00
1 9 13 0.32 2.12 2.26 1.32 98.36 0.00 58.44 0.00
1 9 45 0.30 2.13 2.26 1.34 98.36 0.00 58.44 0.00
1 10 14 0.31 2.12 2.26 2.30 97.39 0.00 58.43 0.00
1 10 46 0.29 2.12 2.26 2.31 97.40 0.00 58.44 0.00
1 11 15 0.32 2.07 2.26 2.28 97.40 0.00 58.43 0.00
1 11 47 0.32 2.09 2.26 2.28 97.40 0.00 58.43 0.00
2 0 16 0.51 2.11 2.26 0.16 99.33 0.00 96.18 0.00
2 0 48 0.34 1.88 2.26 0.32 99.34 0.00 96.19 0.00
2 1 17 0.40 1.85 2.26 0.87 98.73 0.00 96.19 0.00
2 1 49 0.94 2.32 2.26 0.33 98.73 0.00 96.18 0.00
2 2 18 0.35 1.91 2.26 2.36 97.29 0.00 96.18 0.00
2 2 50 0.36 1.86 2.26 2.35 97.29 0.00 96.18 0.00
2 3 19 0.33 1.95 2.26 2.26 97.41 0.00 96.18 0.00
2 3 51 0.32 1.95 2.26 2.28 97.41 0.00 96.17 0.00
2 8 20 0.33 1.96 2.26 2.25 97.42 0.00 96.18 0.00
2 8 52 0.31 1.96 2.26 2.27 97.42 0.00 96.18 0.00
2 9 21 0.33 1.96 2.26 2.25 97.42 0.00 96.17 0.00
2 9 53 0.31 1.97 2.26 2.27 97.42 0.00 96.18 0.00
2 10 22 0.33 1.96 2.26 2.25 97.42 0.00 96.17 0.00
2 10 54 0.31 1.98 2.26 2.27 97.42 0.00 96.17 0.00
2 11 23 0.34 1.88 2.26 2.25 97.41 0.00 96.18 0.00
2 11 55 0.34 1.94 2.26 2.24 97.42 0.00 96.18 0.00
3 0 24 24.70 1.99 2.26 37.79 37.51 0.00 0.02 0.00
3 0 56 0.36 2.33 2.26 62.13 37.51 0.00 0.02 0.00
3 1 25 25.58 1.99 2.26 33.83 40.59 0.00 0.02 0.00
3 1 57 0.38 2.29 2.26 59.03 40.59 0.00 0.02 0.00
3 2 26 25.92 1.99 2.26 33.57 40.51 0.00 0.02 0.00
3 2 58 0.35 2.33 2.26 59.14 40.51 0.00 0.02 0.00
3 3 27 26.09 1.98 2.26 34.14 39.77 0.00 0.02 0.00
3 3 59 0.37 2.33 2.26 59.87 39.77 0.00 0.02 0.00
3 8 28 26.04 1.98 2.26 34.60 39.37 0.00 0.02 0.00
3 8 60 0.36 2.32 2.26 60.28 39.37 0.00 0.02 0.00
3 9 29 20.88 2.03 2.26 68.17 10.95 0.00 0.02 0.00
3 9 61 0.42 2.23 2.26 88.63 10.95 0.00 0.02 0.00
3 10 30 26.22 1.97 2.26 34.80 38.98 0.00 0.02 0.00
3 10 62 0.36 2.32 2.26 60.66 38.98 0.00 0.02 0.00
3 11 31 26.08 1.98 2.26 34.48 39.43 0.00 0.02 0.00
3 11 63 0.35 2.34 2.26 60.21 39.43 0.00 0.02 0.00
5.014038 sec
^ permalink raw reply
* Re: DSCP values in TCP handshake
From: Stephen Hemminger @ 2011-04-19 4:16 UTC (permalink / raw)
To: Mikael Abrahamsson; +Cc: Joe Buehler, Eric Dumazet, netdev
In-Reply-To: <alpine.DEB.2.00.1104190547300.14027@uplift.swm.pp.se>
On Tue, 19 Apr 2011 05:50:34 +0200 (CEST)
Mikael Abrahamsson <swmike@swm.pp.se> wrote:
> On Mon, 18 Apr 2011, Stephen Hemminger wrote:
>
> > If the DSCP bits are reflected, then it could allow for even better SYN
> > flood attack. Attacker could maliciously set DSCP to elevate priority
> > processing of his bogus SYN packets and also cause SYN-ACK on reverse
> > path to also take priority.
>
> Incoming, it's already too late. Outgoing, yes, that might be a problem,
> but if you have a QoS enabled network then you might as well solve that in
> the network, not in the host.
>
> Does Linux internally look at DSCP when deciding what SYNs to handle
> first? If not, I think the above reasoning is misdirected.
Linux does not look at DSCP of incoming packets (there is no queue).
Of course, you can do anything with qdisc, and iptables.
^ permalink raw reply
* Re: DSCP values in TCP handshake
From: Mikael Abrahamsson @ 2011-04-19 4:28 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Joe Buehler, Eric Dumazet, netdev
In-Reply-To: <20110418211637.57f1cfb8@nehalam>
On Mon, 18 Apr 2011, Stephen Hemminger wrote:
> Linux does not look at DSCP of incoming packets (there is no queue).
Then I see no reason for the policy of not reflecting DSCP.
If we receive the DSCP marked packet then it means the network is either
not QoS enabled (it doesn't care) or it's actually allowed through the
border router with DSCP unchanged. Either means it's safe to reflect the
DSCP value, either it will have no effect or it's actually meant to be
prioritized.
With precedence, it originally was mandated that if the precedence value
changed, the TCP session should be reset. Fortunately, this was changed
but I would still say that it's thought that DSCP values should be
reflected by the server.
For instance:
<http://tools.ietf.org/html/draft-ietf-ieprep-reflexive-dscp-02>
"The requester could initiate this. Thus, if the DSCP
received on one TCP segment differs from the TCP used on a prior TCP
segment in a session, the new DSCP SHOULD be reflected unless local
policy prevents this."
I don't know why this didn't make it into RFC, I can inquiry if there is
interest.
--
Mikael Abrahamsson email: swmike@swm.pp.se
^ permalink raw reply
* Re: [PATCH 2.6.36 1/1] IPv6: Create temp address based on advertised network prefix
From: Ben Hutchings @ 2011-04-19 5:01 UTC (permalink / raw)
To: Glenn Wurster
Cc: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI, Patrick McHardy,
Stephen Hemminger, Eric Dumazet, Herbert Xu, netdev, linux-kernel,
dbarrera
In-Reply-To: <201104182124.18866.glenn@wurster.ca>
On Mon, 2011-04-18 at 21:24 -0400, Glenn Wurster wrote:
> As discussed ;Login: Volume 36, number 1,
Either provide a non-paywalled reference or a *much* fuller explanation
in the commit message.
> create a temporary address
> by hashing a random value along with the advertised network
> prefix. This results on the temporary address changing whenever
> the network prefix changes (i.e., the host changes networks), or
> whenever the random value (which can be set by a user-space
> application with sufficient privilege) changes.
>
> Signed-off-by: Glenn Wurster <gwurster@scs.carleton.ca>
> ---
> Documentation/networking/ip-sysctl.txt | 20 ++++-
> include/linux/ipv6.h | 4 +
> include/net/if_inet6.h | 3 +
> net/ipv6/Kconfig | 22 +++++
> net/ipv6/addrconf.c | 159
> +++++++++++++++++++++++++-------
> 5 files changed, 175 insertions(+), 33 deletions(-)
>
> diff --git a/Documentation/networking/ip-sysctl.txt
> b/Documentation/networking/ip-sysctl.txt
> index f350c69..b366c28 100644
> --- a/Documentation/networking/ip-sysctl.txt
> +++ b/Documentation/networking/ip-sysctl.txt
> @@ -1128,11 +1128,18 @@ router_solicitations - INTEGER
>
> use_tempaddr - INTEGER
> Preference for Privacy Extensions (RFC3041).
> + Bits 0 and 1:
> <= 0 : disable Privacy Extensions
> == 1 : enable Privacy Extensions, but prefer public
> addresses over temporary addresses.
> - > 1 : enable Privacy Extensions and prefer temporary
> + >= 2 : enable Privacy Extensions and prefer temporary
> addresses over public addresses.
> + Bit 2:
> + == 0 : Use RFC3041 random algorithm for generating
> + temporary addresses.
> + == 1 : Use the output of a hash based on the network prefix
> + and random number from temp_random.
> +
> Default: 0 (for most devices)
> -1 (for point-to-point devices and loopback devices)
This is pretty awful already, for a sysctl whose name suggests a
boolean. I think you should add another boolean rather than compounding
it.
> @@ -1144,6 +1151,17 @@ temp_prefered_lft - INTEGER
> Preferred lifetime (in seconds) for temporary addresses.
> Default: 86400 (1 day)
>
> +temp_random - INTEGER[4]
> + Random number used as input to the hash function when
> + generating temporary addresses also based on the network
> + prefix.
What's with the
random
indentation?
> + == 0 : Generate a new random value when a temporary address
> + is created. This random value replaces the 0 in
> + temp_random
> + > 0 : A random number used as input to the hash
> +
> + Default: 0
We have a fairly good random number generator in the kernel; I'm not
sure this setting is really necessary. We don't do that for e.g. TCP
sequence number generation.
> max_desync_factor - INTEGER
> Maximum value for DESYNC_FACTOR, which is a random value
> that ensures that clients don't synchronize with each
> diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
> index e62683b..b9bd404 100644
> --- a/include/linux/ipv6.h
> +++ b/include/linux/ipv6.h
> @@ -172,6 +172,9 @@ struct ipv6_devconf {
> __s32 disable_ipv6;
> __s32 accept_dad;
> __s32 force_tllao;
> +#ifdef CONFIG_IPV6_PRIVACY_HASH
> + __u32 temp_random[4];
> +#endif
> void *sysctl;
> };
>
> @@ -213,6 +216,7 @@ enum {
> DEVCONF_DISABLE_IPV6,
> DEVCONF_ACCEPT_DAD,
> DEVCONF_FORCE_TLLAO,
> + DEVCONF_TEMP_RANDOM,
> DEVCONF_MAX
> };
>
> diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
> index f95ff8d..99428bf 100644
> --- a/include/net/if_inet6.h
> +++ b/include/net/if_inet6.h
> @@ -183,6 +183,9 @@ struct inet6_dev {
>
> #ifdef CONFIG_IPV6_PRIVACY
> u8 rndid[8];
> +#ifdef CONFIG_IPV6_PRIVACY_HASH
> + __u32 rndid_inc;
> +#endif
> struct timer_list regen_timer;
> struct list_head tempaddr_list;
> #endif
> diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig
> index 36d7437..c0bc79a 100644
> --- a/net/ipv6/Kconfig
> +++ b/net/ipv6/Kconfig
> @@ -39,6 +39,28 @@ config IPV6_PRIVACY
>
> See <file:Documentation/networking/ip-sysctl.txt> for details.
>
> +if IPV6_PRIVACY
> +
> +config IPV6_PRIVACY_HASH
> + bool "IPv6: Privacy Extension Hash Support"
> + select CRYPTO
> + select CRYPTO_SHA256
> + ---help---
> + Generate the pseudo-random global-scope unicast address(es) based on
> + the output of hashing together the broadcast prefix with a random
> + value. The algorithm is discussed in Volume 36, Number 1 of the USENIX
> + ;Login: publication.
> +
> + To use hash-based temorary addresses, do
> +
> + echo 6 >/proc/sys/net/ipv6/conf/all/use_tempaddr
> +
> + To modify the input to the hash, do
> +
> + echo <random> >/proc/sys/net/ipv6/conf/all/temp_random
> +
> +endif # if IPV6_PRIVACY
> +
> config IPV6_ROUTER_PREF
> bool "IPv6: Router Preference (RFC 4191) support"
> ---help---
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 89bcb62..4a2eaca 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -118,6 +118,7 @@ static inline void addrconf_sysctl_unregister(struct
> inet6_dev *idev)
> #endif
>
> #ifdef CONFIG_IPV6_PRIVACY
> +static int __ipv6_is_invalid_rndid(const __u8 * rndid);
> static int __ipv6_regen_rndid(struct inet6_dev *idev);
> static int __ipv6_try_regen_rndid(struct inet6_dev *idev, struct in6_addr
> *tmpaddr);
> static void ipv6_regen_rndid(unsigned long data);
> @@ -177,6 +178,9 @@ static struct ipv6_devconf ipv6_devconf __read_mostly = {
> .temp_prefered_lft = TEMP_PREFERRED_LIFETIME,
> .regen_max_retry = REGEN_MAX_RETRY,
> .max_desync_factor = MAX_DESYNC_FACTOR,
> +#ifdef CONFIG_IPV6_PRIVACY_HASH
> + .temp_random = { 0, 0, 0, 0 },
> +#endif
> #endif
> .max_addresses = IPV6_MAX_ADDRESSES,
> .accept_ra_defrtr = 1,
> @@ -211,6 +215,9 @@ static struct ipv6_devconf ipv6_devconf_dflt __read_mostly
> = {
Your mail client is misconfigured; it wrapped the line above and many
others,
> .temp_prefered_lft = TEMP_PREFERRED_LIFETIME,
> .regen_max_retry = REGEN_MAX_RETRY,
> .max_desync_factor = MAX_DESYNC_FACTOR,
> +#ifdef CONFIG_IPV6_PRIVACY_HASH
> + .temp_random = { 0, 0, 0, 0 },
> +#endif
> #endif
> .max_addresses = IPV6_MAX_ADDRESSES,
> .accept_ra_defrtr = 1,
> @@ -849,6 +856,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp,
> struct inet6_ifaddr *i
> memcpy(&addr.s6_addr[8], &ift->addr.s6_addr[8], 8);
> spin_unlock_bh(&ift->lock);
> tmpaddr = &addr;
> + ift = NULL;
> } else {
> tmpaddr = NULL;
> }
> @@ -875,17 +883,71 @@ retry:
> }
> in6_ifa_hold(ifp);
> memcpy(addr.s6_addr, ifp->addr.s6_addr, 8);
> - if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) {
> - spin_unlock_bh(&ifp->lock);
> - write_unlock(&idev->lock);
> - printk(KERN_WARNING
> - "ipv6_create_tempaddr(): regeneration of randomized
> interface id failed.\n");
> - in6_ifa_put(ifp);
> - in6_dev_put(idev);
> - ret = -1;
> - goto out;
> +#ifdef CONFIG_IPV6_PRIVACY_HASH
> + while (idev->cnf.use_tempaddr > 4) {
Given that you redefined this as a bitfield, you need to mask out bits
3-31.
> + char hash[32];
> + __u32 temp_random[4];
> + int i;
> +
> + struct hash_desc desc = { .tfm = NULL, .flags = 0 };
> + struct scatterlist sg;
> +
> + BUG_ON (sizeof(temp_random) != sizeof(idev->cnf.temp_random));
BUILD_BUG_ON, please. And no space after the macro name.
> + for (i = 0; unlikely(idev->cnf.temp_random[i] == 0) && i < 4; i++);
Last semi-colon goes on a separate line.
Run scripts/checkpatch.pl on your patch and fix the style errors it
points out.
> + if (unlikely(i == 4))
> + get_random_bytes(idev->cnf.temp_random, sizeof(idev-
> >cnf.temp_random));
> +
> + desc.tfm = crypto_alloc_hash ("sha256", 0, CRYPTO_ALG_ASYNC);
> + if (IS_ERR(desc.tfm)) {
> + idev->cnf.use_tempaddr &= 0x03;
> + printk (KERN_WARNING
> + "ipv6_create_tempaddr(): Hash unavailable,
> reverting use_tempaddr to %d.\n",
> + idev->cnf.use_tempaddr);
> + break;
> + }
> +
> + BUG_ON (crypto_hash_digestsize(desc.tfm) > sizeof(hash));
> + BUG_ON (sizeof(idev->rndid) < 8);
Last of those can be a BUILD_BUG_ON.
> + crypto_hash_init (&desc);
> +
> + sg_init_one (&sg, (u8 *)addr.s6_addr, 8);
> + crypto_hash_update (&desc, &sg, 8);
> +
> + memcpy (temp_random, idev->cnf.temp_random, sizeof(temp_random));
> + temp_random[3] += idev->rndid_inc;
> + sg_init_one (&sg, (u8 *)temp_random, sizeof(temp_random));
> + crypto_hash_update (&desc, &sg, sizeof(temp_random));
> +
> + crypto_hash_final (&desc, hash);
> + crypto_free_hash (desc.tfm);
> +
> + memcpy (&addr.s6_addr[8], hash, 8);
> + if (__ipv6_is_invalid_rndid(&addr.s6_addr[8])) {
> + idev->rndid_inc++;
> + continue;
> + }
> +
> + ift = ipv6_get_ifaddr (dev_net(idev->dev), &addr, idev->dev, 0);
> + break;
> + }
> +#else
> + idev->cnf.use_tempaddr &= 0x03;
Broken when use_tempaddr < 0.
Also if use_tempaddr > 4 then this should warn that the alternate
algorithm is not actually being used.
> +#endif
> + if (idev->cnf.use_tempaddr < 4) {
What if it's equal to 4?
> + if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) {
> + spin_unlock_bh(&ifp->lock);
> + write_unlock(&idev->lock);
> + printk(KERN_WARNING
> + "ipv6_create_tempaddr(): regeneration of randomized
> interface id failed.\n");
> + in6_ifa_put(ifp);
> + in6_dev_put(idev);
> + ret = -1;
> + goto out;
> + }
> + memcpy(&addr.s6_addr[8], idev->rndid, 8);
> }
> - memcpy(&addr.s6_addr[8], idev->rndid, 8);
> age = (jiffies - ifp->tstamp) / HZ;
> tmp_valid_lft = min_t(__u32,
> ifp->valid_lft,
> @@ -922,11 +984,11 @@ retry:
> if (ifp->flags & IFA_F_OPTIMISTIC)
> addr_flags |= IFA_F_OPTIMISTIC;
>
> - ift = !max_addresses ||
> - ipv6_count_addresses(idev) < max_addresses ?
> - ipv6_add_addr(idev, &addr, tmp_plen,
> - ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK,
> - addr_flags) : NULL;
> + if (!ift && (!max_addresses || ipv6_count_addresses(idev) <
> max_addresses)) {
> + ift = ipv6_add_addr(idev, &addr, tmp_plen,
> + ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK,
> + addr_flags);
> + }
> if (!ift || IS_ERR(ift)) {
> in6_ifa_put(ifp);
> in6_dev_put(idev);
> @@ -943,9 +1005,11 @@ retry:
> ift->prefered_lft = tmp_prefered_lft;
> ift->cstamp = tmp_cstamp;
> ift->tstamp = tmp_tstamp;
> + ift->regen_count = 0;
> spin_unlock_bh(&ift->lock);
>
> - addrconf_dad_start(ift, 0);
> + if (ift->flags & IFA_F_TENTATIVE)
> + addrconf_dad_start(ift, 0);
> in6_ifa_put(ift);
> in6_dev_put(idev);
> out:
> @@ -1090,7 +1154,7 @@ static int ipv6_get_saddr_eval(struct net *net,
> */
> int preftmp = dst->prefs & (IPV6_PREFER_SRC_PUBLIC|
> IPV6_PREFER_SRC_TMP) ?
> !!(dst->prefs & IPV6_PREFER_SRC_TMP) :
> - score->ifa->idev->cnf.use_tempaddr >= 2;
> + !!(score->ifa->idev->cnf.use_tempaddr & 2);
[...]
Broken when use_tempaddr < 0.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: ip_rt_bug questions.
From: David Miller @ 2011-04-19 5:04 UTC (permalink / raw)
To: davej; +Cc: netdev
In-Reply-To: <20110418215922.GA17818@redhat.com>
From: Dave Jones <davej@redhat.com>
Date: Mon, 18 Apr 2011 17:59:23 -0400
> On Mon, Apr 18, 2011 at 02:50:23PM -0700, David Miller wrote:
>
> > BTW, if you could modify this thing to spit out a stack
> > trace (probably by using WARN_ON() or similar) that will
> > probably show us where the bug is coming from.
>
> Ok, I'll add that, and see if I can reproduce it again.
Thanks a lot Dave.
^ permalink raw reply
* [PATCH net-next-2.6 0/8] sctp: some cleanup and tiny fix for add/del ip
From: Wei Yongjun @ 2011-04-19 5:07 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, lksctp
Series of 8 patches against net-next-2.6, include some cleanup
and tiny fix for add/del ip, which have been waiting on vlad's
lksctp-dev tree for long times.
Shan Wei (5):
sctp: delete unused macro definition of sctp_chunk_is_control
sctp: fix the comment of sctp_sf_violation_paramlen()
sctp: use common head of addr parameter to access member in addr-unrelated code
sctp: kill abandoned SCTP_CMD_TRANSMIT command
sctp: use memdup_user to copy data from userspace
Vlad Yasevich (3):
sctp: teach CACC algorithm about removed transports
sctp: Allow bindx_del to accept 0 port.
sctp: Release all routes when processing acks ADD_IP or DEL_IP
include/net/sctp/command.h | 1 -
include/net/sctp/constants.h | 1 -
net/sctp/input.c | 2 +-
net/sctp/outqueue.c | 11 ++++++++---
net/sctp/sm_make_chunk.c | 18 +++++++-----------
net/sctp/sm_sideeffect.c | 6 ------
net/sctp/sm_statefuns.c | 5 +++--
net/sctp/socket.c | 28 +++++++++++-----------------
8 files changed, 30 insertions(+), 42 deletions(-)
^ permalink raw reply
* [PATCH net-next-2.6 1/8] sctp: delete unused macro definition of sctp_chunk_is_control
From: Wei Yongjun @ 2011-04-19 5:09 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, lksctp
In-Reply-To: <4DAD18AB.3040401@cn.fujitsu.com>
The macro never be used.
And if needed, can use !sctp_chunk_is_data instead of.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
include/net/sctp/constants.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index c70d8cc..deac13d 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -150,7 +150,6 @@ SCTP_SUBTYPE_CONSTRUCTOR(OTHER, sctp_event_other_t, other)
SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, sctp_event_primitive_t, primitive)
-#define sctp_chunk_is_control(a) (a->chunk_hdr->type != SCTP_CID_DATA)
#define sctp_chunk_is_data(a) (a->chunk_hdr->type == SCTP_CID_DATA)
/* Calculate the actual data size in a data chunk */
--
1.6.5.2
^ permalink raw reply related
* [PATCH net-next-2.6 3/8] sctp: use common head of addr parameter to access member in addr-unrelated code
From: Wei Yongjun @ 2011-04-19 5:11 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, lksctp
In-Reply-To: <4DAD18AB.3040401@cn.fujitsu.com>
From: Shan Wei <shanwei@cn.fujitsu.com>
The 'p' member of struct sctp_paramhdr is common part for
IPv4 addr parameter and IPv6 addr parameter in union sctp_addr_param.
For addr-related code, use specified addr parameter.
Otherwise, use common header to access type/length member.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
net/sctp/input.c | 2 +-
net/sctp/sm_make_chunk.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 5436c69..30cec77 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -1017,7 +1017,7 @@ static struct sctp_association *__sctp_rcv_asconf_lookup(
/* Skip over the ADDIP header and find the Address parameter */
param = (union sctp_addr_param *)(asconf + 1);
- af = sctp_get_af_specific(param_type2af(param->v4.param_hdr.type));
+ af = sctp_get_af_specific(param_type2af(param->p.type));
if (unlikely(!af))
return NULL;
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index b3434cc..844adfd 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -2923,7 +2923,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
asconf_param->param_hdr.type != SCTP_PARAM_SET_PRIMARY)
return SCTP_ERROR_UNKNOWN_PARAM;
- switch (addr_param->v4.param_hdr.type) {
+ switch (addr_param->p.type) {
case SCTP_PARAM_IPV6_ADDRESS:
if (!asoc->peer.ipv6_address)
return SCTP_ERROR_DNS_FAILED;
@@ -2936,7 +2936,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
return SCTP_ERROR_DNS_FAILED;
}
- af = sctp_get_af_specific(param_type2af(addr_param->v4.param_hdr.type));
+ af = sctp_get_af_specific(param_type2af(addr_param->p.type));
if (unlikely(!af))
return SCTP_ERROR_DNS_FAILED;
@@ -3100,7 +3100,7 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc,
/* Skip the address parameter and store a pointer to the first
* asconf parameter.
*/
- length = ntohs(addr_param->v4.param_hdr.length);
+ length = ntohs(addr_param->p.length);
asconf_param = (sctp_addip_param_t *)((void *)addr_param + length);
chunk_len -= length;
@@ -3177,7 +3177,7 @@ static void sctp_asconf_param_success(struct sctp_association *asoc,
((void *)asconf_param + sizeof(sctp_addip_param_t));
/* We have checked the packet before, so we do not check again. */
- af = sctp_get_af_specific(param_type2af(addr_param->v4.param_hdr.type));
+ af = sctp_get_af_specific(param_type2af(addr_param->p.type));
af->from_addr_param(&addr, addr_param, htons(bp->port), 0);
switch (asconf_param->param_hdr.type) {
@@ -3304,7 +3304,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc,
/* Skip the address parameter in the last asconf sent and store a
* pointer to the first asconf parameter.
*/
- length = ntohs(addr_param->v4.param_hdr.length);
+ length = ntohs(addr_param->p.length);
asconf_param = (sctp_addip_param_t *)((void *)addr_param + length);
asconf_len -= length;
--
1.6.5.2
^ permalink raw reply related
* [PATCH net-next-2.6 2/8] sctp: fix the comment of sctp_sf_violation_paramlen()
From: Wei Yongjun @ 2011-04-19 5:11 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, lksctp
In-Reply-To: <4DAD18AB.3040401@cn.fujitsu.com>
From: Shan Wei <shanwei@cn.fujitsu.com>
Update the comment about sctp_sf_violation_paramlen() to be
more precise.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
net/sctp/sm_statefuns.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 7679208..c085472 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -4343,8 +4343,9 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
/*
* Handle a protocol violation when the parameter length is invalid.
- * "Invalid" length is identified as smaller than the minimal length a
- * given parameter can be.
+ * If the length is smaller than the minimum length of a given parameter,
+ * or accumulated length in multi parameters exceeds the end of the chunk,
+ * the length is considered as invalid.
*/
static sctp_disposition_t sctp_sf_violation_paramlen(
const struct sctp_endpoint *ep,
--
1.6.5.2
^ permalink raw reply related
* [PATCH net-next-2.6 4/8] sctp: kill abandoned SCTP_CMD_TRANSMIT command
From: Wei Yongjun @ 2011-04-19 5:12 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, lksctp
In-Reply-To: <4DAD18AB.3040401@cn.fujitsu.com>
From: Shan Wei <shanwei@cn.fujitsu.com>
Remove SCTP_CMD_TRANSMIT command as it never be used.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
include/net/sctp/command.h | 1 -
net/sctp/sm_sideeffect.c | 6 ------
2 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index c01dc99..2b44764 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -73,7 +73,6 @@ typedef enum {
SCTP_CMD_INIT_FAILED, /* High level, do init failure work. */
SCTP_CMD_REPORT_DUP, /* Report a duplicate TSN. */
SCTP_CMD_STRIKE, /* Mark a strike against a transport. */
- SCTP_CMD_TRANSMIT, /* Transmit the outqueue. */
SCTP_CMD_HB_TIMERS_START, /* Start the heartbeat timers. */
SCTP_CMD_HB_TIMER_UPDATE, /* Update a heartbeat timers. */
SCTP_CMD_HB_TIMERS_STOP, /* Stop the heartbeat timers. */
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index 5f86ee4..3b80fe2 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1415,12 +1415,6 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
SCTP_RTXR_T3_RTX);
break;
- case SCTP_CMD_TRANSMIT:
- /* Kick start transmission. */
- error = sctp_outq_uncork(&asoc->outqueue);
- local_cork = 0;
- break;
-
case SCTP_CMD_ECN_CE:
/* Do delayed CE processing. */
sctp_do_ecn_ce_work(asoc, cmd->obj.u32);
--
1.6.5.2
^ permalink raw reply related
* [PATCH net-next-2.6 5/8] sctp: use memdup_user to copy data from userspace
From: Wei Yongjun @ 2011-04-19 5:13 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, lksctp
In-Reply-To: <4DAD18AB.3040401@cn.fujitsu.com>
From: Shan Wei <shanwei@cn.fujitsu.com>
Use common function to simply code.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
net/sctp/socket.c | 22 ++++++----------------
1 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index deb82e3..5c9980a 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3215,14 +3215,9 @@ static int sctp_setsockopt_hmac_ident(struct sock *sk,
if (optlen < sizeof(struct sctp_hmacalgo))
return -EINVAL;
- hmacs = kmalloc(optlen, GFP_KERNEL);
- if (!hmacs)
- return -ENOMEM;
-
- if (copy_from_user(hmacs, optval, optlen)) {
- err = -EFAULT;
- goto out;
- }
+ hmacs= memdup_user(optval, optlen);
+ if (IS_ERR(hmacs))
+ return PTR_ERR(hmacs);
idents = hmacs->shmac_num_idents;
if (idents == 0 || idents > SCTP_AUTH_NUM_HMACS ||
@@ -3257,14 +3252,9 @@ static int sctp_setsockopt_auth_key(struct sock *sk,
if (optlen <= sizeof(struct sctp_authkey))
return -EINVAL;
- authkey = kmalloc(optlen, GFP_KERNEL);
- if (!authkey)
- return -ENOMEM;
-
- if (copy_from_user(authkey, optval, optlen)) {
- ret = -EFAULT;
- goto out;
- }
+ authkey= memdup_user(optval, optlen);
+ if (IS_ERR(authkey))
+ return PTR_ERR(authkey);
if (authkey->sca_keylength > optlen - sizeof(struct sctp_authkey)) {
ret = -EINVAL;
--
1.6.5.2
^ permalink raw reply related
* [PATCH net-next-2.6 6/8] sctp: teach CACC algorithm about removed transports
From: Wei Yongjun @ 2011-04-19 5:13 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, lksctp
In-Reply-To: <4DAD18AB.3040401@cn.fujitsu.com>
From: Vlad Yasevich <vladislav.yasevich@hp.com>
When we have have to remove a transport due to ASCONF, we move
the data to a new active path. This can trigger CACC algorithm
to not mark that data as missing when SACKs arrive. This is
because the transport passed to the CACC algorithm is the one
this data is sitting on, not the one it was sent on (that one
may be gone). So, by sending the original transport (even if
it's NULL), we may start marking data as missing.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
net/sctp/outqueue.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index bf92a5b..7812772 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -131,7 +131,8 @@ static inline int sctp_cacc_skip_3_1_d(struct sctp_transport *primary,
static inline int sctp_cacc_skip_3_1_f(struct sctp_transport *transport,
int count_of_newacks)
{
- if (count_of_newacks < 2 && !transport->cacc.cacc_saw_newack)
+ if (count_of_newacks < 2 &&
+ (transport && !transport->cacc.cacc_saw_newack))
return 1;
return 0;
}
@@ -618,9 +619,12 @@ redo:
/* If we are retransmitting, we should only
* send a single packet.
+ * Otherwise, try appending this chunk again.
*/
if (rtx_timeout || fast_rtx)
done = 1;
+ else
+ goto redo;
/* Bundle next chunk in the next round. */
break;
@@ -1683,8 +1687,9 @@ static void sctp_mark_missing(struct sctp_outq *q,
/* SFR-CACC may require us to skip marking
* this chunk as missing.
*/
- if (!transport || !sctp_cacc_skip(primary, transport,
- count_of_newacks, tsn)) {
+ if (!transport || !sctp_cacc_skip(primary,
+ chunk->transport,
+ count_of_newacks, tsn)) {
chunk->tsn_missing_report++;
SCTP_DEBUG_PRINTK(
--
1.6.5.2
^ permalink raw reply related
* [PATCH net-next-2.6 7/8] sctp: Allow bindx_del to accept 0 port
From: Wei Yongjun @ 2011-04-19 5:14 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, lksctp
In-Reply-To: <4DAD18AB.3040401@cn.fujitsu.com>
From: Vlad Yasevich <vladislav.yasevich@hp.com>
We allow 0 port when adding new addresses. It only
makes sence to allow 0 port when removing addresses.
When removing the currently bound port will be used
when the port in the address is set to 0.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
net/sctp/socket.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 5c9980a..431b890 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -658,11 +658,15 @@ static int sctp_bindx_rem(struct sock *sk, struct sockaddr *addrs, int addrcnt)
goto err_bindx_rem;
}
- if (sa_addr->v4.sin_port != htons(bp->port)) {
+ if (sa_addr->v4.sin_port &&
+ sa_addr->v4.sin_port != htons(bp->port)) {
retval = -EINVAL;
goto err_bindx_rem;
}
+ if (!sa_addr->v4.sin_port)
+ sa_addr->v4.sin_port = htons(bp->port);
+
/* FIXME - There is probably a need to check if sk->sk_saddr and
* sk->sk_rcv_addr are currently set to one of the addresses to
* be removed. This is something which needs to be looked into
--
1.6.5.2
^ 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