* Re: [PATCH 00/10]: Netfilter IPsec support
From: David S. Miller @ 2005-11-11 5:17 UTC (permalink / raw)
To: kaber; +Cc: netdev, netfilter-devel
In-Reply-To: <43740D9C.80003@trash.net>
From: Patrick McHardy <kaber@trash.net>
Date: Fri, 11 Nov 2005 04:18:52 +0100
> This is the latest set patches for netfilter IPsec support.
> The use of netif_rx for the innermost SA if it used transport
> mode has been replaced by explicit NF_HOOK calls in
> xfrm{4,6}_input.c.
Note that I consider this stuff 2.6.16 material.
We do have a lot of networking changes in 2.6.15
as it is, and also it would be good for these changes
to get some review and discussion time.
^ permalink raw reply
* Re: [PATCH 00/10]: Netfilter IPsec support
From: Patrick McHardy @ 2005-11-11 5:24 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, netfilter-devel
In-Reply-To: <20051110.211724.83727693.davem@davemloft.net>
David S. Miller wrote:
> Note that I consider this stuff 2.6.16 material.
>
> We do have a lot of networking changes in 2.6.15
> as it is, and also it would be good for these changes
> to get some review and discussion time.
Sure, they will probably also need some changes for nf_conntrack.
For now I'm happy if we can just agree on the way transport mode
is handled.
^ permalink raw reply
* [PATCH 11/10]: [NETFILTER]: Export ip6_masked_addrcmp, don't pass IPv6 addresses on stack
From: Patrick McHardy @ 2005-11-11 5:25 UTC (permalink / raw)
To: Kernel Netdev Mailing List, Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 65 bytes --]
For completeness, the next two patches contain the policy match.
[-- Attachment #2: 11.diff --]
[-- Type: text/x-patch, Size: 3003 bytes --]
[NETFILTER]: Export ip6_masked_addrcmp, don't pass IPv6 addresses on stack
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit f12c4452cdb1b7d0d33a00120145e301507458e4
tree 4762d9addca1746390024fcf437c73759b90955c
parent 5365555b302ffc8a31170833ca33636e9e66ff9a
author Patrick McHardy <kaber@trash.net> Fri, 11 Nov 2005 06:14:09 +0100
committer Patrick McHardy <kaber@trash.net> Fri, 11 Nov 2005 06:14:09 +0100
include/linux/netfilter_ipv6/ip6_tables.h | 4 ++++
net/ipv6/netfilter/ip6_tables.c | 18 ++++++++++--------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index 2efc046..1e11010 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -476,6 +476,10 @@ extern int ip6t_ext_hdr(u8 nexthdr);
extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
u8 target);
+extern int ip6_masked_addrcmp(const struct in6_addr *addr1,
+ const struct in6_addr *mask,
+ const struct in6_addr *addr2);
+
#define IP6T_ALIGN(s) (((s) + (__alignof__(struct ip6t_entry)-1)) & ~(__alignof__(struct ip6t_entry)-1))
#endif /*__KERNEL__*/
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 7d49222..71a80e0 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -128,13 +128,14 @@ static LIST_HEAD(ip6t_tables);
#define up(x) do { printk("UP:%u:" #x "\n", __LINE__); up(x); } while(0)
#endif
-static int ip6_masked_addrcmp(struct in6_addr addr1, struct in6_addr mask,
- struct in6_addr addr2)
+int
+ip6_masked_addrcmp(const struct in6_addr *addr1, const struct in6_addr *mask,
+ const struct in6_addr *addr2)
{
int i;
for( i = 0; i < 16; i++){
- if((addr1.s6_addr[i] & mask.s6_addr[i]) !=
- (addr2.s6_addr[i] & mask.s6_addr[i]))
+ if((addr1->s6_addr[i] & mask->s6_addr[i]) !=
+ (addr2->s6_addr[i] & mask->s6_addr[i]))
return 1;
}
return 0;
@@ -168,10 +169,10 @@ ip6_packet_match(const struct sk_buff *s
#define FWINV(bool,invflg) ((bool) ^ !!(ip6info->invflags & invflg))
- if (FWINV(ip6_masked_addrcmp(ipv6->saddr,ip6info->smsk,ip6info->src),
- IP6T_INV_SRCIP)
- || FWINV(ip6_masked_addrcmp(ipv6->daddr,ip6info->dmsk,ip6info->dst),
- IP6T_INV_DSTIP)) {
+ if (FWINV(ip6_masked_addrcmp(&ipv6->saddr, &ip6info->smsk,
+ &ip6info->src), IP6T_INV_SRCIP)
+ || FWINV(ip6_masked_addrcmp(&ipv6->daddr, &ip6info->dmsk,
+ &ip6info->dst), IP6T_INV_DSTIP)) {
dprintf("Source or dest mismatch.\n");
/*
dprintf("SRC: %u. Mask: %u. Target: %u.%s\n", ip->saddr,
@@ -2094,6 +2095,7 @@ EXPORT_SYMBOL(ip6t_register_target);
EXPORT_SYMBOL(ip6t_unregister_target);
EXPORT_SYMBOL(ip6t_ext_hdr);
EXPORT_SYMBOL(ipv6_find_hdr);
+EXPORT_SYMBOL(ip6_masked_addrcmp);
module_init(init);
module_exit(fini);
^ permalink raw reply related
* [PATCH 12/10]: [NETFILTER]: Add policy match
From: Patrick McHardy @ 2005-11-11 5:26 UTC (permalink / raw)
To: Kernel Netdev Mailing List, Netfilter Development Mailinglist
[-- Attachment #1: 12.diff --]
[-- Type: text/x-patch, Size: 15363 bytes --]
[NETFILTER]: Add policy match
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 84053f60747fa31fc46ccba57df29b639e509130
tree c9f2133a0b5b6df2fce4d15349d7e6ce433fc425
parent f12c4452cdb1b7d0d33a00120145e301507458e4
author Patrick McHardy <kaber@trash.net> Fri, 11 Nov 2005 06:16:45 +0100
committer Patrick McHardy <kaber@trash.net> Fri, 11 Nov 2005 06:16:45 +0100
include/linux/netfilter_ipv4/ipt_policy.h | 52 ++++++++
include/linux/netfilter_ipv6/ip6t_policy.h | 52 ++++++++
net/ipv4/netfilter/Kconfig | 10 ++
net/ipv4/netfilter/Makefile | 1
net/ipv4/netfilter/ipt_policy.c | 170 +++++++++++++++++++++++++++
net/ipv6/netfilter/Kconfig | 10 ++
net/ipv6/netfilter/Makefile | 1
net/ipv6/netfilter/ip6t_policy.c | 175 ++++++++++++++++++++++++++++
8 files changed, 471 insertions(+), 0 deletions(-)
diff --git a/include/linux/netfilter_ipv4/ipt_policy.h b/include/linux/netfilter_ipv4/ipt_policy.h
new file mode 100644
index 0000000..7fd1bec
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ipt_policy.h
@@ -0,0 +1,52 @@
+#ifndef _IPT_POLICY_H
+#define _IPT_POLICY_H
+
+#define IPT_POLICY_MAX_ELEM 4
+
+enum ipt_policy_flags
+{
+ IPT_POLICY_MATCH_IN = 0x1,
+ IPT_POLICY_MATCH_OUT = 0x2,
+ IPT_POLICY_MATCH_NONE = 0x4,
+ IPT_POLICY_MATCH_STRICT = 0x8,
+};
+
+enum ipt_policy_modes
+{
+ IPT_POLICY_MODE_TRANSPORT,
+ IPT_POLICY_MODE_TUNNEL
+};
+
+struct ipt_policy_spec
+{
+ u_int8_t saddr:1,
+ daddr:1,
+ proto:1,
+ mode:1,
+ spi:1,
+ reqid:1;
+};
+
+struct ipt_policy_elem
+{
+ u_int32_t saddr;
+ u_int32_t smask;
+ u_int32_t daddr;
+ u_int32_t dmask;
+ u_int32_t spi;
+ u_int32_t reqid;
+ u_int8_t proto;
+ u_int8_t mode;
+
+ struct ipt_policy_spec match;
+ struct ipt_policy_spec invert;
+};
+
+struct ipt_policy_info
+{
+ struct ipt_policy_elem pol[IPT_POLICY_MAX_ELEM];
+ u_int16_t flags;
+ u_int16_t len;
+};
+
+#endif /* _IPT_POLICY_H */
diff --git a/include/linux/netfilter_ipv6/ip6t_policy.h b/include/linux/netfilter_ipv6/ip6t_policy.h
new file mode 100644
index 0000000..5a93afc
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6t_policy.h
@@ -0,0 +1,52 @@
+#ifndef _IP6T_POLICY_H
+#define _IP6T_POLICY_H
+
+#define IP6T_POLICY_MAX_ELEM 4
+
+enum ip6t_policy_flags
+{
+ IP6T_POLICY_MATCH_IN = 0x1,
+ IP6T_POLICY_MATCH_OUT = 0x2,
+ IP6T_POLICY_MATCH_NONE = 0x4,
+ IP6T_POLICY_MATCH_STRICT = 0x8,
+};
+
+enum ip6t_policy_modes
+{
+ IP6T_POLICY_MODE_TRANSPORT,
+ IP6T_POLICY_MODE_TUNNEL
+};
+
+struct ip6t_policy_spec
+{
+ u_int8_t saddr:1,
+ daddr:1,
+ proto:1,
+ mode:1,
+ spi:1,
+ reqid:1;
+};
+
+struct ip6t_policy_elem
+{
+ struct in6_addr saddr;
+ struct in6_addr smask;
+ struct in6_addr daddr;
+ struct in6_addr dmask;
+ u_int32_t spi;
+ u_int32_t reqid;
+ u_int8_t proto;
+ u_int8_t mode;
+
+ struct ip6t_policy_spec match;
+ struct ip6t_policy_spec invert;
+};
+
+struct ip6t_policy_info
+{
+ struct ip6t_policy_elem pol[IP6T_POLICY_MAX_ELEM];
+ u_int16_t flags;
+ u_int16_t len;
+};
+
+#endif /* _IP6T_POLICY_H */
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig
index 7d917e4..1317c15 100644
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
@@ -468,6 +468,16 @@ config IP_NF_MATCH_STRING
To compile it as a module, choose M here. If unsure, say N.
+config IP_NF_MATCH_POLICY
+ tristate "IPsec policy match support"
+ depends on IP_NF_IPTABLES && XFRM
+ help
+ Policy matching allows you to match packets based on the
+ IPsec policy that was used during decapsulation/will
+ be used during encapsulation.
+
+ To compile it as a module, choose M here. If unsure, say N.
+
# `filter', generic and specific targets
config IP_NF_FILTER
tristate "Packet filtering"
diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
index dab4b58..e8ee790 100644
--- a/net/ipv4/netfilter/Makefile
+++ b/net/ipv4/netfilter/Makefile
@@ -71,6 +71,7 @@ obj-$(CONFIG_IP_NF_MATCH_TCPMSS) += ipt_
obj-$(CONFIG_IP_NF_MATCH_REALM) += ipt_realm.o
obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
obj-$(CONFIG_IP_NF_MATCH_PHYSDEV) += ipt_physdev.o
+obj-$(CONFIG_IP_NF_MATCH_POLICY) += ipt_policy.o
obj-$(CONFIG_IP_NF_MATCH_COMMENT) += ipt_comment.o
obj-$(CONFIG_IP_NF_MATCH_STRING) += ipt_string.o
diff --git a/net/ipv4/netfilter/ipt_policy.c b/net/ipv4/netfilter/ipt_policy.c
new file mode 100644
index 0000000..709debc
--- /dev/null
+++ b/net/ipv4/netfilter/ipt_policy.c
@@ -0,0 +1,170 @@
+/* IP tables module for matching IPsec policy
+ *
+ * Copyright (c) 2004,2005 Patrick McHardy, <kaber@trash.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/init.h>
+#include <net/xfrm.h>
+
+#include <linux/netfilter_ipv4.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+#include <linux/netfilter_ipv4/ipt_policy.h>
+
+MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
+MODULE_DESCRIPTION("IPtables IPsec policy matching module");
+MODULE_LICENSE("GPL");
+
+
+static inline int
+match_xfrm_state(struct xfrm_state *x, const struct ipt_policy_elem *e)
+{
+#define MATCH(x,y) (!e->match.x || ((e->x == (y)) ^ e->invert.x))
+
+ return MATCH(saddr, x->props.saddr.a4 & e->smask) &&
+ MATCH(daddr, x->id.daddr.a4 & e->dmask) &&
+ MATCH(proto, x->id.proto) &&
+ MATCH(mode, x->props.mode) &&
+ MATCH(spi, x->id.spi) &&
+ MATCH(reqid, x->props.reqid);
+}
+
+static int
+match_policy_in(const struct sk_buff *skb, const struct ipt_policy_info *info)
+{
+ const struct ipt_policy_elem *e;
+ struct sec_path *sp = skb->sp;
+ int strict = info->flags & IPT_POLICY_MATCH_STRICT;
+ int i, pos;
+
+ if (sp == NULL)
+ return -1;
+ if (strict && info->len != sp->len)
+ return 0;
+
+ for (i = sp->len - 1; i >= 0; i--) {
+ pos = strict ? i - sp->len + 1 : 0;
+ if (pos >= info->len)
+ return 0;
+ e = &info->pol[pos];
+
+ if (match_xfrm_state(sp->x[i].xvec, e)) {
+ if (!strict)
+ return 1;
+ } else if (strict)
+ return 0;
+ }
+
+ return strict ? 1 : 0;
+}
+
+static int
+match_policy_out(const struct sk_buff *skb, const struct ipt_policy_info *info)
+{
+ const struct ipt_policy_elem *e;
+ struct dst_entry *dst = skb->dst;
+ int strict = info->flags & IPT_POLICY_MATCH_STRICT;
+ int i, pos;
+
+ if (dst->xfrm == NULL)
+ return -1;
+
+ for (i = 0; dst && dst->xfrm; dst = dst->child, i++) {
+ pos = strict ? i : 0;
+ if (pos >= info->len)
+ return 0;
+ e = &info->pol[pos];
+
+ if (match_xfrm_state(dst->xfrm, e)) {
+ if (!strict)
+ return 1;
+ } else if (strict)
+ return 0;
+ }
+
+ return strict ? 1 : 0;
+}
+
+static int match(const struct sk_buff *skb,
+ const struct net_device *in,
+ const struct net_device *out,
+ const void *matchinfo, int offset, int *hotdrop)
+{
+ const struct ipt_policy_info *info = matchinfo;
+ int ret;
+
+ if (info->flags & IPT_POLICY_MATCH_IN)
+ ret = match_policy_in(skb, info);
+ else
+ ret = match_policy_out(skb, info);
+
+ if (ret < 0)
+ ret = info->flags & IPT_POLICY_MATCH_NONE ? 1 : 0;
+ else if (info->flags & IPT_POLICY_MATCH_NONE)
+ ret = 0;
+
+ return ret;
+}
+
+static int checkentry(const char *tablename, const struct ipt_ip *ip,
+ void *matchinfo, unsigned int matchsize,
+ unsigned int hook_mask)
+{
+ struct ipt_policy_info *info = matchinfo;
+
+ if (matchsize != IPT_ALIGN(sizeof(*info))) {
+ printk(KERN_ERR "ipt_policy: matchsize %u != %zu\n",
+ matchsize, IPT_ALIGN(sizeof(*info)));
+ return 0;
+ }
+ if (!(info->flags & (IPT_POLICY_MATCH_IN|IPT_POLICY_MATCH_OUT))) {
+ printk(KERN_ERR "ipt_policy: neither incoming nor "
+ "outgoing policy selected\n");
+ return 0;
+ }
+ if (hook_mask & (1 << NF_IP_PRE_ROUTING | 1 << NF_IP_LOCAL_IN)
+ && info->flags & IPT_POLICY_MATCH_OUT) {
+ printk(KERN_ERR "ipt_policy: output policy not valid in "
+ "PRE_ROUTING and INPUT\n");
+ return 0;
+ }
+ if (hook_mask & (1 << NF_IP_POST_ROUTING | 1 << NF_IP_LOCAL_OUT)
+ && info->flags & IPT_POLICY_MATCH_IN) {
+ printk(KERN_ERR "ipt_policy: input policy not valid in "
+ "POST_ROUTING and OUTPUT\n");
+ return 0;
+ }
+ if (info->len > IPT_POLICY_MAX_ELEM) {
+ printk(KERN_ERR "ipt_policy: too many policy elements\n");
+ return 0;
+ }
+
+ return 1;
+}
+
+static struct ipt_match policy_match = {
+ .name = "policy",
+ .match = match,
+ .checkentry = checkentry,
+ .me = THIS_MODULE,
+};
+
+static int __init init(void)
+{
+ return ipt_register_match(&policy_match);
+}
+
+static void __exit fini(void)
+{
+ ipt_unregister_match(&policy_match);
+}
+
+module_init(init);
+module_exit(fini);
diff --git a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig
index bb7ccfe..1450700 100644
--- a/net/ipv6/netfilter/Kconfig
+++ b/net/ipv6/netfilter/Kconfig
@@ -170,6 +170,16 @@ config IP6_NF_MATCH_PHYSDEV
To compile it as a module, choose M here. If unsure, say N.
+config IP6_NF_MATCH_POLICY
+ tristate "IPsec policy match support"
+ depends on IP6_NF_IPTABLES && XFRM
+ help
+ Policy matching allows you to match packets based on the
+ IPsec policy that was used during decapsulation/will
+ be used during encapsulation.
+
+ To compile it as a module, choose M here. If unsure, say N.
+
# dep_tristate ' Multiple port match support' CONFIG_IP6_NF_MATCH_MULTIPORT $CONFIG_IP6_NF_IPTABLES
# dep_tristate ' TOS match support' CONFIG_IP6_NF_MATCH_TOS $CONFIG_IP6_NF_IPTABLES
# if [ "$CONFIG_IP6_NF_CONNTRACK" != "n" ]; then
diff --git a/net/ipv6/netfilter/Makefile b/net/ipv6/netfilter/Makefile
index 2b2c370..4ef82e9 100644
--- a/net/ipv6/netfilter/Makefile
+++ b/net/ipv6/netfilter/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_
obj-$(CONFIG_IP6_NF_MATCH_IPV6HEADER) += ip6t_ipv6header.o
obj-$(CONFIG_IP6_NF_MATCH_FRAG) += ip6t_frag.o
obj-$(CONFIG_IP6_NF_MATCH_AHESP) += ip6t_esp.o ip6t_ah.o
+obj-$(CONFIG_IP6_NF_MATCH_POLICY) += ip6t_policy.o
obj-$(CONFIG_IP6_NF_MATCH_EUI64) += ip6t_eui64.o
obj-$(CONFIG_IP6_NF_MATCH_MULTIPORT) += ip6t_multiport.o
obj-$(CONFIG_IP6_NF_MATCH_OWNER) += ip6t_owner.o
diff --git a/net/ipv6/netfilter/ip6t_policy.c b/net/ipv6/netfilter/ip6t_policy.c
new file mode 100644
index 0000000..13fedad
--- /dev/null
+++ b/net/ipv6/netfilter/ip6t_policy.c
@@ -0,0 +1,175 @@
+/* IP tables module for matching IPsec policy
+ *
+ * Copyright (c) 2004,2005 Patrick McHardy, <kaber@trash.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/init.h>
+#include <net/xfrm.h>
+
+#include <linux/netfilter_ipv6.h>
+#include <linux/netfilter_ipv6/ip6_tables.h>
+#include <linux/netfilter_ipv6/ip6t_policy.h>
+
+MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
+MODULE_DESCRIPTION("IPtables IPsec policy matching module");
+MODULE_LICENSE("GPL");
+
+
+static inline int
+match_xfrm_state(struct xfrm_state *x, const struct ip6t_policy_elem *e)
+{
+#define MATCH_ADDR(x,y,z) (!e->match.x || \
+ ((ip6_masked_addrcmp((z), &e->x, &e->y)) == 0) ^ e->invert.x)
+#define MATCH(x,y) (!e->match.x || ((e->x == (y)) ^ e->invert.x))
+
+ return MATCH_ADDR(saddr, smask, (struct in6_addr *)&x->props.saddr.a6) &&
+ MATCH_ADDR(daddr, dmask, (struct in6_addr *)&x->id.daddr.a6) &&
+ MATCH(proto, x->id.proto) &&
+ MATCH(mode, x->props.mode) &&
+ MATCH(spi, x->id.spi) &&
+ MATCH(reqid, x->props.reqid);
+}
+
+static int
+match_policy_in(const struct sk_buff *skb, const struct ip6t_policy_info *info)
+{
+ const struct ip6t_policy_elem *e;
+ struct sec_path *sp = skb->sp;
+ int strict = info->flags & IP6T_POLICY_MATCH_STRICT;
+ int i, pos;
+
+ if (sp == NULL)
+ return -1;
+ if (strict && info->len != sp->len)
+ return 0;
+
+ for (i = sp->len - 1; i >= 0; i--) {
+ pos = strict ? i - sp->len + 1 : 0;
+ if (pos >= info->len)
+ return 0;
+ e = &info->pol[pos];
+
+ if (match_xfrm_state(sp->x[i].xvec, e)) {
+ if (!strict)
+ return 1;
+ } else if (strict)
+ return 0;
+ }
+
+ return strict ? 1 : 0;
+}
+
+static int
+match_policy_out(const struct sk_buff *skb, const struct ip6t_policy_info *info)
+{
+ const struct ip6t_policy_elem *e;
+ struct dst_entry *dst = skb->dst;
+ int strict = info->flags & IP6T_POLICY_MATCH_STRICT;
+ int i, pos;
+
+ if (dst->xfrm == NULL)
+ return -1;
+
+ for (i = 0; dst && dst->xfrm; dst = dst->child, i++) {
+ pos = strict ? i : 0;
+ if (pos >= info->len)
+ return 0;
+ e = &info->pol[pos];
+
+ if (match_xfrm_state(dst->xfrm, e)) {
+ if (!strict)
+ return 1;
+ } else if (strict)
+ return 0;
+ }
+
+ return strict ? 1 : 0;
+}
+
+static int match(const struct sk_buff *skb,
+ const struct net_device *in,
+ const struct net_device *out,
+ const void *matchinfo,
+ int offset,
+ unsigned int protoff,
+ int *hotdrop)
+{
+ const struct ip6t_policy_info *info = matchinfo;
+ int ret;
+
+ if (info->flags & IP6T_POLICY_MATCH_IN)
+ ret = match_policy_in(skb, info);
+ else
+ ret = match_policy_out(skb, info);
+
+ if (ret < 0)
+ ret = info->flags & IP6T_POLICY_MATCH_NONE ? 1 : 0;
+ else if (info->flags & IP6T_POLICY_MATCH_NONE)
+ ret = 0;
+
+ return ret;
+}
+
+static int checkentry(const char *tablename, const struct ip6t_ip6 *ip,
+ void *matchinfo, unsigned int matchsize,
+ unsigned int hook_mask)
+{
+ struct ip6t_policy_info *info = matchinfo;
+
+ if (matchsize != IP6T_ALIGN(sizeof(*info))) {
+ printk(KERN_ERR "ip6t_policy: matchsize %u != %zu\n",
+ matchsize, IP6T_ALIGN(sizeof(*info)));
+ return 0;
+ }
+ if (!(info->flags & (IP6T_POLICY_MATCH_IN|IP6T_POLICY_MATCH_OUT))) {
+ printk(KERN_ERR "ip6t_policy: neither incoming nor "
+ "outgoing policy selected\n");
+ return 0;
+ }
+ if (hook_mask & (1 << NF_IP6_PRE_ROUTING | 1 << NF_IP6_LOCAL_IN)
+ && info->flags & IP6T_POLICY_MATCH_OUT) {
+ printk(KERN_ERR "ip6t_policy: output policy not valid in "
+ "PRE_ROUTING and INPUT\n");
+ return 0;
+ }
+ if (hook_mask & (1 << NF_IP6_POST_ROUTING | 1 << NF_IP6_LOCAL_OUT)
+ && info->flags & IP6T_POLICY_MATCH_IN) {
+ printk(KERN_ERR "ip6t_policy: input policy not valid in "
+ "POST_ROUTING and OUTPUT\n");
+ return 0;
+ }
+ if (info->len > IP6T_POLICY_MAX_ELEM) {
+ printk(KERN_ERR "ip6t_policy: too many policy elements\n");
+ return 0;
+ }
+
+ return 1;
+}
+
+static struct ip6t_match policy_match = {
+ .name = "policy",
+ .match = match,
+ .checkentry = checkentry,
+ .me = THIS_MODULE,
+};
+
+static int __init init(void)
+{
+ return ip6t_register_match(&policy_match);
+}
+
+static void __exit fini(void)
+{
+ ip6t_unregister_match(&policy_match);
+}
+
+module_init(init);
+module_exit(fini);
^ permalink raw reply related
* [PATCH] TCP build fix
From: Jeff Garzik @ 2005-11-11 9:43 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds, davem, shemminger; +Cc: linux-kernel, netdev
Recent TCP changes broke the build.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index 4376814..b7d296a 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -236,7 +236,7 @@ static void tcp_vegas_cong_avoid(struct
/* We don't have enough RTT samples to do the Vegas
* calculation, so we'll behave like Reno.
*/
- tcp_reno_cong_avoid(sk, ack, seq_rtt, in_flight, cnt);
+ tcp_reno_cong_avoid(sk, ack, seq_rtt, in_flight, flag);
} else {
u32 rtt, target_cwnd, diff;
^ permalink raw reply related
* Re: [PATCH 00/10]: Netfilter IPsec support
From: Gerd v. Egidy @ 2005-11-11 10:13 UTC (permalink / raw)
To: netfilter-devel; +Cc: Kernel Netdev Mailing List, Patrick McHardy
In-Reply-To: <43740D9C.80003@trash.net>
Hi,
> This is the latest set patches for netfilter IPsec support.
> The use of netif_rx for the innermost SA if it used transport
> mode has been replaced by explicit NF_HOOK calls in
> xfrm{4,6}_input.c.
Could you please describe the solution you implemented a bit more? There was
just so many back and forth that I'm confused now.
If I use it with iptables, do the transport mode packets go through INPUT and
OUTPUT twice, decrypted and encrypted?
If I use it with iptables, do the tunnel mode packets go through FORWARD or
INPUT and OUTPUT twice, decrypted and encrypted?
Can I do NAT in tunnel and transport mode?
what about the policy match patches, why are they only posted "for
completeness" and as 11/12 of 10? Aren't they ready yet?
Thanks for enlightment.
Kind regards,
Gerd
^ permalink raw reply
* Re: [PATCH 00/10]: Netfilter IPsec support
From: Patrick McHardy @ 2005-11-11 12:09 UTC (permalink / raw)
To: Gerd v. Egidy; +Cc: Kernel Netdev Mailing List, netfilter-devel
In-Reply-To: <200511111113.32591.lists@egidy.de>
On Fri, 11 Nov 2005, Gerd v. Egidy wrote:
> Hi,
>
>> This is the latest set patches for netfilter IPsec support.
>> The use of netif_rx for the innermost SA if it used transport
>> mode has been replaced by explicit NF_HOOK calls in
>> xfrm{4,6}_input.c.
>
> Could you please describe the solution you implemented a bit more? There was
> just so many back and forth that I'm confused now.
OK, some explanation. In tunnel mode, packets go through the stack
again after decapsulation and hit the PRE_ROUTING and LOCAL_IN or FORWARD
hook, depending on if it is a local packet or is forwarded. For symetry,
there are now some additional hooks on the output path which pass the
packet through LOCAL_OUT and POST_ROUTING after tunnel mode transforms.
This part behaves just as any other tunnel. Transport mode is special,
we usually don't want to see packets before or after transport mode
transforms except if it was the plain text packet (the transport
mode SA is the innermost SA of the bundle). On the output path this
already works because packets always hit netfilter before reaching
the transforms, on the input path packets are manually passed through
PRE_ROUTING and INPUT in this case. For NAT we do two things:
when a packet is NATed after already beeing routed (including
the xfrm lookup), it is routed again. If an incoming packet is NATed
before the policy check, the policy check reconstructs how the packet
looked before NAT.
>
> If I use it with iptables, do the transport mode packets go through INPUT and
> OUTPUT twice, decrypted and encrypted?
Yes, if the transport mode transform in the innermost transform
of the bundle (or the only one).
>
> If I use it with iptables, do the tunnel mode packets go through FORWARD or
> INPUT and OUTPUT twice, decrypted and encrypted?
Yes.
> Can I do NAT in tunnel and transport mode?
Yes, even NATing forwarded packets and protecting them using a transport
mode SA works.
> what about the policy match patches, why are they only posted "for
> completeness" and as 11/12 of 10? Aren't they ready yet?
They should be fine.
^ permalink raw reply
* Re: [PATCH] [IPV4] Fix secondary IP addresses after promotion
From: Patrick McHardy @ 2005-11-11 13:16 UTC (permalink / raw)
To: Thomas Graf
Cc: Brian Pomerantz, netdev, davem, kuznet, pekkas, jmorris, yoshfuji,
kaber, linux-kernel
In-Reply-To: <20051109005658.GL23537@postel.suug.ch>
Thomas Graf wrote:
> * Patrick McHardy <kaber@trash.net> 2005-11-08 15:11
>
>>I have a patch to do this, but it needs some debugging, for some
>>unknown reason it crashes sometimes if I remove addresses without
>>specifying the mask.
>
> Interesting, do you use an iproute2 version with the wildcard
> address deletion fix attached below?
No, its some old debian version. I'm going to try if it makes a
difference, but it needs to be fixed to work (or at least not crash)
with old versions anyway.
^ permalink raw reply
* Re: [patch 1/7] s390: synthax checking for VIPA addresses fixed
From: Jeff Garzik @ 2005-11-11 13:24 UTC (permalink / raw)
To: Frank Pavlic; +Cc: netdev, linux-kernel
In-Reply-To: <20051110124902.GA7936@pavlic>
Frank Pavlic wrote:
> [patch 1/7] s390: synthax checking for VIPA addresses fixed
>
> From: Peter Tiedemann <ptiedem@de.ibm.com>
> - synthax checking for VIPA addresses fixed
>
> Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
>
> diffstat:
> qeth.h | 65 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
> qeth_sys.c | 6 ++---
> 2 files changed, 55 insertions(+), 16 deletions(-)
>
>
> diff -Naupr orig/drivers/s390/net/qeth.h patched-linux/drivers/s390/net/qeth.h
> --- orig/drivers/s390/net/qeth.h 2005-11-09 20:06:57.000000000 +0100
> +++ patched-linux/drivers/s390/net/qeth.h 2005-11-09 20:11:20.000000000 +0100
> @@ -8,6 +8,7 @@
> #include <linux/trdevice.h>
> #include <linux/etherdevice.h>
> #include <linux/if_vlan.h>
> +#include <linux/ctype.h>
>
> #include <net/ipv6.h>
> #include <linux/in6.h>
> @@ -24,7 +25,7 @@
>
> #include "qeth_mpc.h"
>
> -#define VERSION_QETH_H "$Revision: 1.142 $"
> +#define VERSION_QETH_H "$Revision: 1.151 $"
>
> #ifdef CONFIG_QETH_IPV6
> #define QETH_VERSION_IPV6 ":IPv6"
> @@ -1074,6 +1075,26 @@ qeth_get_qdio_q_format(struct qeth_card
> }
> }
>
> +static inline int
> +qeth_isdigit(char * buf)
> +{
> + while (*buf) {
> + if (!isdigit(*buf++))
> + return 0;
> + }
> + return 1;
> +}
> +
> +static inline int
> +qeth_isxdigit(char * buf)
> +{
> + while (*buf) {
> + if (!isxdigit(*buf++))
> + return 0;
> + }
> + return 1;
> +}
> +
> static inline void
> qeth_ipaddr4_to_string(const __u8 *addr, char *buf)
> {
> @@ -1090,18 +1111,27 @@ qeth_string_to_ipaddr4(const char *buf,
> int i;
>
> start = buf;
> - for (i = 0; i < 3; i++) {
> - if (!(end = strchr(start, '.')))
> + for (i = 0; i < 4; i++) {
> + if (i == 3) {
> + end = strchr(start,0xa);
> + if (end)
> + len = end - start;
> + else
> + len = strlen(start);
> + }
> + else {
> + end = strchr(start, '.');
> + len = end - start;
> + }
> + if ((len <= 0) || (len > 3))
> return -EINVAL;
> - len = end - start;
> memset(abuf, 0, 4);
> strncpy(abuf, start, len);
> + if (!qeth_isdigit(abuf))
> + return -EINVAL;
> addr[i] = simple_strtoul(abuf, &tmp, 10);
> start = end + 1;
> }
> - memset(abuf, 0, 4);
> - strcpy(abuf, start);
> - addr[3] = simple_strtoul(abuf, &tmp, 10);
> return 0;
> }
>
> @@ -1128,18 +1158,27 @@ qeth_string_to_ipaddr6(const char *buf,
>
> tmp_addr = (u16 *)addr;
> start = buf;
> - for (i = 0; i < 7; i++) {
> - if (!(end = strchr(start, ':')))
> + for (i = 0; i < 8; i++) {
> + if (i == 7) {
> + end = strchr(start,0xa);
> + if (end)
> + len = end - start;
> + else
> + len = strlen(start);
> + }
> + else {
> + end = strchr(start, ':');
> + len = end - start;
> + }
> + if ((len <= 0) || (len > 4))
> return -EINVAL;
> - len = end - start;
> memset(abuf, 0, 5);
> strncpy(abuf, start, len);
> + if (!qeth_isxdigit(abuf))
> + return -EINVAL;
> tmp_addr[i] = simple_strtoul(abuf, &tmp, 16);
> start = end + 1;
OK for now, but please submit a patch that updates this code to use
sscanf().
Jeff
^ permalink raw reply
* Re: [patch 1/7] s390: synthax checking for VIPA addresses fixed
From: Jeff Garzik @ 2005-11-11 13:26 UTC (permalink / raw)
To: Frank Pavlic; +Cc: netdev, linux-kernel
In-Reply-To: <20051110124902.GA7936@pavlic>
applied 1-7
^ permalink raw reply
* Re: [PATCH] gianfar mii needs to zero out the mii_bus structure
From: Jeff Garzik @ 2005-11-11 13:27 UTC (permalink / raw)
To: Kumar Gala; +Cc: netdev, linuxppc-embedded
In-Reply-To: <Pine.LNX.4.44.0511091211030.26349-100000@gate.crashing.org>
applied
^ permalink raw reply
* Re: RED qdisc not working...
From: Andy Furniss @ 2005-11-11 15:15 UTC (permalink / raw)
To: Daniel J Blueman; +Cc: netdev, lartc
In-Reply-To: <6278d2220511071626j3646afa7n5ac33228e8b3fc82@mail.gmail.com>
Daniel J Blueman wrote:
> Has anyone been able to get the RED (random early detection) qdisc
> working lately?
>
> I can't get anything going through it to be dropped or marked; the
> 'marked', 'early', 'pdrop' and 'other' fields remain at 0 [1]. In my
> example script [2], I get the 3072Kbits/s transfer into eth0, which
> you'd expect if the RED qdisc wasn't there.
>
> I have tried with a recent 2.6.12 debian kernel and stock 2.6.14 on
> x86_64 debian. I built new iproute and iptables packages from latest
> clean upstream sources, but to no avail.
>
> Any ideas? Please CC me on replies, as I am not subscribed.
>
> Dan
>
> --- [1]
>
> # tc -s qdisc show dev eth0
> qdisc htb 1: r2q 10 default 10 direct_packets_stat 0
> Sent 53985530 bytes 36757 pkts (dropped 0, overlimits 45125)
> qdisc red 10: parent 1:10 limit 512Kb min 64Kb max 128Kb
> Sent 53985530 bytes 36757 pkts (dropped 0, overlimits 0)
> marked 0 early 0 pdrop 0 other 0
>
> --- [2]
>
> tc qdisc del dev eth0 root
>
> tc qdisc add dev eth0 root handle 1: htb default 10
> tc class add dev eth0 parent 1: classid 1:1 htb rate 4096kbit ceil 4096kbit
> tc class add dev eth0 parent 1:1 classid 1:10 htb rate 3072kbit ceil 3072kbit
> tc qdisc add dev eth0 parent 1:10 handle 10: red \
> limit 4096kbit min 512kbit max 1024kbit avpkt 1000 \
> burst 100 probability 0.02 bandwidth 1024kbit
> ___
> Daniel J Blueman
You need to test with several tcp connections, one will not have a big
enough rwin to fill the queue enough to reach the buffer thresholds -
which for clarity I would specify in kb not kbit.
Andy.
Andy.
^ permalink raw reply
* Re: [PATCH] TCP build fix
From: Stephen Hemminger @ 2005-11-11 18:41 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, davem, linux-kernel, netdev
In-Reply-To: <20051111094347.GA10876@havoc.gtf.org>
Jeff Garzik wrote:
>Recent TCP changes broke the build.
>
>Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
>
>diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
>index 4376814..b7d296a 100644
>--- a/net/ipv4/tcp_vegas.c
>+++ b/net/ipv4/tcp_vegas.c
>@@ -236,7 +236,7 @@ static void tcp_vegas_cong_avoid(struct
> /* We don't have enough RTT samples to do the Vegas
> * calculation, so we'll behave like Reno.
> */
>- tcp_reno_cong_avoid(sk, ack, seq_rtt, in_flight, cnt);
>+ tcp_reno_cong_avoid(sk, ack, seq_rtt, in_flight, flag);
> } else {
> u32 rtt, target_cwnd, diff;
>
>
>
Sorry, must have happened when juggling the test and release tree.
^ permalink raw reply
* [2.6 patch] drivers/net/sk98lin/skge.c: make SkPciWriteCfgDWord() a static inline
From: Adrian Bunk @ 2005-11-11 19:44 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, linux-kernel
No external user and that small - such a function should be static
inline and not a global function.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/net/sk98lin/h/skvpd.h | 8 ------
drivers/net/sk98lin/skge.c | 43 ++++++++++++++++------------------
2 files changed, 21 insertions(+), 30 deletions(-)
--- linux-2.6.14-mm2-full/drivers/net/sk98lin/h/skvpd.h.old 2005-11-11 20:30:25.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/net/sk98lin/h/skvpd.h 2005-11-11 20:30:44.000000000 +0100
@@ -130,14 +130,12 @@
#ifndef VPD_DO_IO
#define VPD_OUT8(pAC,IoC,Addr,Val) (void)SkPciWriteCfgByte(pAC,Addr,Val)
#define VPD_OUT16(pAC,IoC,Addr,Val) (void)SkPciWriteCfgWord(pAC,Addr,Val)
-#define VPD_OUT32(pAC,IoC,Addr,Val) (void)SkPciWriteCfgDWord(pAC,Addr,Val)
#define VPD_IN8(pAC,IoC,Addr,pVal) (void)SkPciReadCfgByte(pAC,Addr,pVal)
#define VPD_IN16(pAC,IoC,Addr,pVal) (void)SkPciReadCfgWord(pAC,Addr,pVal)
#define VPD_IN32(pAC,IoC,Addr,pVal) (void)SkPciReadCfgDWord(pAC,Addr,pVal)
#else /* VPD_DO_IO */
#define VPD_OUT8(pAC,IoC,Addr,Val) SK_OUT8(IoC,PCI_C(Addr),Val)
#define VPD_OUT16(pAC,IoC,Addr,Val) SK_OUT16(IoC,PCI_C(Addr),Val)
-#define VPD_OUT32(pAC,IoC,Addr,Val) SK_OUT32(IoC,PCI_C(Addr),Val)
#define VPD_IN8(pAC,IoC,Addr,pVal) SK_IN8(IoC,PCI_C(Addr),pVal)
#define VPD_IN16(pAC,IoC,Addr,pVal) SK_IN16(IoC,PCI_C(Addr),pVal)
#define VPD_IN32(pAC,IoC,Addr,pVal) SK_IN32(IoC,PCI_C(Addr),pVal)
@@ -155,12 +153,6 @@
else \
SK_OUT16(pAC,PCI_C(Addr),Val); \
}
-#define VPD_OUT32(pAC,Ioc,Addr,Val) { \
- if ((pAC)->DgT.DgUseCfgCycle) \
- SkPciWriteCfgDWord(pAC,Addr,Val); \
- else \
- SK_OUT32(pAC,PCI_C(Addr),Val); \
- }
#define VPD_IN8(pAC,Ioc,Addr,pVal) { \
if ((pAC)->DgT.DgUseCfgCycle) \
SkPciReadCfgByte(pAC,Addr,pVal); \
--- linux-2.6.14-mm2-full/drivers/net/sk98lin/skge.c.old 2005-11-11 20:31:05.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/net/sk98lin/skge.c 2005-11-11 20:32:39.000000000 +0100
@@ -279,6 +279,27 @@
/*****************************************************************************
*
+ * SkPciWriteCfgDWord - write a 32 bit value to pci config space
+ *
+ * Description:
+ * This routine writes a 32 bit value to the pci configuration
+ * space.
+ *
+ * Returns:
+ * 0 - indicate everything worked ok.
+ * != 0 - error indication
+ */
+static inline int SkPciWriteCfgDWord(
+SK_AC *pAC, /* Adapter Control structure pointer */
+int PciAddr, /* PCI register address */
+SK_U32 Val) /* pointer to store the read value */
+{
+ pci_write_config_dword(pAC->PciDev, PciAddr, Val);
+ return(0);
+} /* SkPciWriteCfgDWord */
+
+/*****************************************************************************
+ *
* SkGeInitPCI - Init the PCI resources
*
* Description:
@@ -4085,28 +4106,6 @@
/*****************************************************************************
*
- * SkPciWriteCfgDWord - write a 32 bit value to pci config space
- *
- * Description:
- * This routine writes a 32 bit value to the pci configuration
- * space.
- *
- * Returns:
- * 0 - indicate everything worked ok.
- * != 0 - error indication
- */
-int SkPciWriteCfgDWord(
-SK_AC *pAC, /* Adapter Control structure pointer */
-int PciAddr, /* PCI register address */
-SK_U32 Val) /* pointer to store the read value */
-{
- pci_write_config_dword(pAC->PciDev, PciAddr, Val);
- return(0);
-} /* SkPciWriteCfgDWord */
-
-
-/*****************************************************************************
- *
* SkPciWriteCfgWord - write a 16 bit value to pci config space
*
* Description:
^ permalink raw reply
* Re: [PATCH] TCP build fix
From: David S. Miller @ 2005-11-11 19:57 UTC (permalink / raw)
To: jgarzik; +Cc: akpm, torvalds, shemminger, linux-kernel, netdev
In-Reply-To: <20051111094347.GA10876@havoc.gtf.org>
From: Jeff Garzik <jgarzik@pobox.com>
Date: Fri, 11 Nov 2005 04:43:47 -0500
> Recent TCP changes broke the build.
>
> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Thanks for catching this Jeff.
^ permalink raw reply
* [-mm patch] drivers/net/wireless/tiacx/: add missing #include <linux/vmalloc.h>'a
From: Adrian Bunk @ 2005-11-11 20:07 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, linux-kernel
This is required for always getting the vmalloc()/vfree() prototypes.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/net/wireless/tiacx/common.c | 1 +
drivers/net/wireless/tiacx/pci.c | 1 +
drivers/net/wireless/tiacx/usb.c | 1 +
3 files changed, 3 insertions(+)
--- linux-2.6.14-mm2-full/drivers/net/wireless/tiacx/common.c.old 2005-11-11 20:51:52.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/net/wireless/tiacx/common.c 2005-11-11 20:52:07.000000000 +0100
@@ -45,6 +45,7 @@
#include <linux/etherdevice.h>
#include <linux/wireless.h>
#include <linux/pm.h>
+#include <linux/vmalloc.h>
#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
#endif /* WE >= 13 */
--- linux-2.6.14-mm2-full/drivers/net/wireless/tiacx/pci.c.old 2005-11-11 21:04:38.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/net/wireless/tiacx/pci.c 2005-11-11 21:05:09.000000000 +0100
@@ -52,6 +52,7 @@
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/pm.h>
+#include <linux/vmalloc.h>
#include "acx.h"
--- linux-2.6.14-mm2-full/drivers/net/wireless/tiacx/usb.c.old 2005-11-11 21:06:13.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/net/wireless/tiacx/usb.c 2005-11-11 21:06:31.000000000 +0100
@@ -64,6 +64,7 @@
#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
#endif
+#include <linux/vmalloc.h>
#include "acx.h"
^ permalink raw reply
* [RFC: 2.6 patch] remove ISA legacy functions
From: Adrian Bunk @ 2005-11-12 4:52 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, linux-scsi, netdev, jonathan, tlinux-users,
Jaroslav Kysela
In-Reply-To: <20051111203601.GR5376@stusta.de>
This patch removes the ISA legacy functions that are deprecated since
kernel 2.4 and that aren't available on all architectures.
The 7 drivers that were still using this obsolete API are now marked
as BROKEN.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
Documentation/DocBook/deviceiobook.tmpl | 19 -----
arch/i386/Kconfig | 1
drivers/net/Kconfig | 6 -
drivers/net/arcnet/Kconfig | 4 -
drivers/scsi/Kconfig | 2
include/asm-alpha/io.h | 83 ------------------------
include/asm-arm/arch-aaec2000/io.h | 1
include/asm-arm/arch-clps711x/io.h | 1
include/asm-arm/arch-ebsa285/io.h | 8 --
include/asm-arm/arch-integrator/io.h | 1
include/asm-arm/arch-iop3xx/io.h | 1
include/asm-arm/arch-l7200/io.h | 1
include/asm-arm/arch-lh7a40x/io.h | 1
include/asm-arm/arch-omap/io.h | 1
include/asm-arm/arch-pxa/io.h | 1
include/asm-arm/arch-realview/io.h | 1
include/asm-arm/arch-sa1100/io.h | 1
include/asm-arm/arch-versatile/io.h | 1
include/asm-arm/io.h | 36 ----------
include/asm-i386/io.h | 11 ---
include/asm-m68k/io.h | 21 ++----
include/asm-mips/io.h | 23 ------
include/asm-parisc/io.h | 18 -----
include/asm-sh/io.h | 13 ---
include/asm-x86_64/io.h | 11 ---
25 files changed, 15 insertions(+), 252 deletions(-)
--- linux-2.6.14-mm2-full/Documentation/DocBook/deviceiobook.tmpl.old 2005-11-11 21:44:08.000000000 +0100
+++ linux-2.6.14-mm2-full/Documentation/DocBook/deviceiobook.tmpl 2005-11-11 21:44:18.000000000 +0100
@@ -270,25 +270,6 @@
</para>
</sect1>
- <sect1>
- <title>ISA legacy functions</title>
- <para>
- On older kernels (2.2 and earlier) the ISA bus could be read or
- written with these functions and without ioremap being used. This is
- no longer true in Linux 2.4. A set of equivalent functions exist for
- easy legacy driver porting. The functions available are prefixed
- with 'isa_' and are <function>isa_readb</function>,
- <function>isa_writeb</function>, <function>isa_readw</function>,
- <function>isa_writew</function>, <function>isa_readl</function>,
- <function>isa_writel</function>, <function>isa_memcpy_fromio</function>
- and <function>isa_memcpy_toio</function>
- </para>
- <para>
- These functions should not be used in new drivers, and will
- eventually be going away.
- </para>
- </sect1>
-
</chapter>
<chapter>
--- linux-2.6.14-mm2-full/include/asm-alpha/io.h.old 2005-11-11 21:39:55.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-alpha/io.h 2005-11-11 21:59:27.000000000 +0100
@@ -534,9 +534,6 @@
#define eth_io_copy_and_sum(skb,src,len,unused) \
memcpy_fromio((skb)->data,src,len)
-#define isa_eth_io_copy_and_sum(skb,src,len,unused) \
- isa_memcpy_fromio((skb)->data,src,len)
-
static inline int
check_signature(const volatile void __iomem *io_addr,
const unsigned char *signature, int length)
@@ -552,86 +549,6 @@
/*
- * ISA space is mapped to some machine-specific location on Alpha.
- * Call into the existing hooks to get the address translated.
- */
-
-static inline u8
-isa_readb(unsigned long offset)
-{
- void __iomem *addr = ioremap(offset, 1);
- u8 ret = readb(addr);
- iounmap(addr);
- return ret;
-}
-
-static inline u16
-isa_readw(unsigned long offset)
-{
- void __iomem *addr = ioremap(offset, 2);
- u16 ret = readw(addr);
- iounmap(addr);
- return ret;
-}
-
-static inline u32
-isa_readl(unsigned long offset)
-{
- void __iomem *addr = ioremap(offset, 2);
- u32 ret = readl(addr);
- iounmap(addr);
- return ret;
-}
-
-static inline void
-isa_writeb(u8 b, unsigned long offset)
-{
- void __iomem *addr = ioremap(offset, 2);
- writeb(b, addr);
- iounmap(addr);
-}
-
-static inline void
-isa_writew(u16 w, unsigned long offset)
-{
- void __iomem *addr = ioremap(offset, 2);
- writew(w, addr);
- iounmap(addr);
-}
-
-static inline void
-isa_writel(u32 l, unsigned long offset)
-{
- void __iomem *addr = ioremap(offset, 2);
- writel(l, addr);
- iounmap(addr);
-}
-
-static inline void
-isa_memset_io(unsigned long offset, u8 val, long n)
-{
- void __iomem *addr = ioremap(offset, n);
- memset_io(addr, val, n);
- iounmap(addr);
-}
-
-static inline void
-isa_memcpy_fromio(void *dest, unsigned long offset, long n)
-{
- void __iomem *addr = ioremap(offset, n);
- memcpy_fromio(dest, addr, n);
- iounmap(addr);
-}
-
-static inline void
-isa_memcpy_toio(unsigned long offset, const void *src, long n)
-{
- void __iomem *addr = ioremap(offset, n);
- memcpy_toio(addr, src, n);
- iounmap(addr);
-}
-
-/*
* The Alpha Jensen hardware for some rather strange reason puts
* the RTC clock at 0x170 instead of 0x70. Probably due to some
* misguided idea about using 0x70 for NMI stuff.
--- linux-2.6.14-mm2-full/include/asm-arm/io.h.old 2005-11-11 21:40:42.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/io.h 2005-11-11 21:59:36.000000000 +0100
@@ -215,42 +215,6 @@
#endif /* __mem_pci */
/*
- * If this architecture has ISA IO, then define the isa_read/isa_write
- * macros.
- */
-#ifdef __mem_isa
-
-#define isa_readb(addr) __raw_readb(__mem_isa(addr))
-#define isa_readw(addr) __raw_readw(__mem_isa(addr))
-#define isa_readl(addr) __raw_readl(__mem_isa(addr))
-#define isa_writeb(val,addr) __raw_writeb(val,__mem_isa(addr))
-#define isa_writew(val,addr) __raw_writew(val,__mem_isa(addr))
-#define isa_writel(val,addr) __raw_writel(val,__mem_isa(addr))
-#define isa_memset_io(a,b,c) _memset_io(__mem_isa(a),(b),(c))
-#define isa_memcpy_fromio(a,b,c) _memcpy_fromio((a),__mem_isa(b),(c))
-#define isa_memcpy_toio(a,b,c) _memcpy_toio(__mem_isa((a)),(b),(c))
-
-#define isa_eth_io_copy_and_sum(a,b,c,d) \
- eth_copy_and_sum((a),__mem_isa(b),(c),(d))
-
-#else /* __mem_isa */
-
-#define isa_readb(addr) (__readwrite_bug("isa_readb"),0)
-#define isa_readw(addr) (__readwrite_bug("isa_readw"),0)
-#define isa_readl(addr) (__readwrite_bug("isa_readl"),0)
-#define isa_writeb(val,addr) __readwrite_bug("isa_writeb")
-#define isa_writew(val,addr) __readwrite_bug("isa_writew")
-#define isa_writel(val,addr) __readwrite_bug("isa_writel")
-#define isa_memset_io(a,b,c) __readwrite_bug("isa_memset_io")
-#define isa_memcpy_fromio(a,b,c) __readwrite_bug("isa_memcpy_fromio")
-#define isa_memcpy_toio(a,b,c) __readwrite_bug("isa_memcpy_toio")
-
-#define isa_eth_io_copy_and_sum(a,b,c,d) \
- __readwrite_bug("isa_eth_io_copy_and_sum")
-
-#endif /* __mem_isa */
-
-/*
* ioremap and friends.
*
* ioremap takes a PCI memory address, as specified in
--- linux-2.6.14-mm2-full/include/asm-i386/io.h.old 2005-11-11 21:41:07.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-i386/io.h 2005-11-12 00:37:26.000000000 +0100
@@ -214,23 +214,12 @@
*/
#define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET))
-#define isa_readb(a) readb(__ISA_IO_base + (a))
-#define isa_readw(a) readw(__ISA_IO_base + (a))
-#define isa_readl(a) readl(__ISA_IO_base + (a))
-#define isa_writeb(b,a) writeb(b,__ISA_IO_base + (a))
-#define isa_writew(w,a) writew(w,__ISA_IO_base + (a))
-#define isa_writel(l,a) writel(l,__ISA_IO_base + (a))
-#define isa_memset_io(a,b,c) memset_io(__ISA_IO_base + (a),(b),(c))
-#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (b),(c))
-#define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (a),(b),(c))
-
/*
* Again, i386 does not require mem IO specific function.
*/
#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d))
-#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(__ISA_IO_base + (b)),(c),(d))
/**
* check_signature - find BIOS signatures
--- linux-2.6.14-mm2-full/include/asm-mips/io.h.old 2005-11-11 21:41:23.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-mips/io.h 2005-11-11 22:00:31.000000000 +0100
@@ -563,33 +563,10 @@
extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
/*
- * ISA space is 'always mapped' on currently supported MIPS systems, no need
- * to explicitly ioremap() it. The fact that the ISA IO space is mapped
- * to PAGE_OFFSET is pure coincidence - it does not mean ISA values
- * are physical addresses. The following constant pointer can be
- * used as the IO-area pointer (it can be iounmapped as well, so the
- * analogy with PCI is quite large):
- */
-#define __ISA_IO_base ((char *)(isa_slot_offset))
-
-#define isa_readb(a) readb(__ISA_IO_base + (a))
-#define isa_readw(a) readw(__ISA_IO_base + (a))
-#define isa_readl(a) readl(__ISA_IO_base + (a))
-#define isa_readq(a) readq(__ISA_IO_base + (a))
-#define isa_writeb(b,a) writeb(b,__ISA_IO_base + (a))
-#define isa_writew(w,a) writew(w,__ISA_IO_base + (a))
-#define isa_writel(l,a) writel(l,__ISA_IO_base + (a))
-#define isa_writeq(q,a) writeq(q,__ISA_IO_base + (a))
-#define isa_memset_io(a,b,c) memset_io(__ISA_IO_base + (a),(b),(c))
-#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (b),(c))
-#define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (a),(b),(c))
-
-/*
* We don't have csum_partial_copy_fromio() yet, so we cheat here and
* just copy it. The net code will then do the checksum later.
*/
#define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len))
-#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(b),(c),(d))
/*
* check_signature - find BIOS signatures
--- linux-2.6.14-mm2-full/include/asm-parisc/io.h.old 2005-11-11 21:41:44.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-parisc/io.h 2005-11-11 22:01:12.000000000 +0100
@@ -294,22 +294,6 @@
void memcpy_fromio(void *dst, const volatile void __iomem *src, int count);
void memcpy_toio(volatile void __iomem *dst, const void *src, int count);
-/* Support old drivers which don't ioremap.
- * NB this interface is scheduled to disappear in 2.5
- */
-
-#define __isa_addr(x) (void __iomem *)(F_EXTEND(0xfc000000) | (x))
-#define isa_readb(a) readb(__isa_addr(a))
-#define isa_readw(a) readw(__isa_addr(a))
-#define isa_readl(a) readl(__isa_addr(a))
-#define isa_writeb(b,a) writeb((b), __isa_addr(a))
-#define isa_writew(b,a) writew((b), __isa_addr(a))
-#define isa_writel(b,a) writel((b), __isa_addr(a))
-#define isa_memset_io(a,b,c) memset_io(__isa_addr(a), (b), (c))
-#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a), __isa_addr(b), (c))
-#define isa_memcpy_toio(a,b,c) memcpy_toio(__isa_addr(a), (b), (c))
-
-
/*
* XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and
* just copy it. The net code will then do the checksum later. Presently
@@ -318,8 +302,6 @@
#define eth_io_copy_and_sum(skb,src,len,unused) \
memcpy_fromio((skb)->data,(src),(len))
-#define isa_eth_io_copy_and_sum(skb,src,len,unused) \
- isa_memcpy_fromio((skb)->data,(src),(len))
/* Port-space IO */
--- linux-2.6.14-mm2-full/include/asm-x86_64/io.h.old 2005-11-11 21:41:58.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-x86_64/io.h 2005-11-12 00:38:07.000000000 +0100
@@ -264,23 +264,12 @@
*/
#define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET))
-#define isa_readb(a) readb(__ISA_IO_base + (a))
-#define isa_readw(a) readw(__ISA_IO_base + (a))
-#define isa_readl(a) readl(__ISA_IO_base + (a))
-#define isa_writeb(b,a) writeb(b,__ISA_IO_base + (a))
-#define isa_writew(w,a) writew(w,__ISA_IO_base + (a))
-#define isa_writel(l,a) writel(l,__ISA_IO_base + (a))
-#define isa_memset_io(a,b,c) memset_io(__ISA_IO_base + (a),(b),(c))
-#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (b),(c))
-#define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (a),(b),(c))
-
/*
* Again, x86-64 does not require mem IO specific function.
*/
#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d))
-#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(__ISA_IO_base + (b)),(c),(d))
/**
* check_signature - find BIOS signatures
--- linux-2.6.14-mm2-full/include/asm-m68k/io.h.old 2005-11-11 21:49:11.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-m68k/io.h 2005-11-11 21:56:15.000000000 +0100
@@ -191,15 +191,6 @@
#define isa_outb(val,port) out_8(isa_itb(port),(val))
#define isa_outw(val,port) (ISA_SEX ? out_be16(isa_itw(port),(val)) : out_le16(isa_itw(port),(val)))
-#define isa_readb(p) in_8(isa_mtb((unsigned long)(p)))
-#define isa_readw(p) \
- (ISA_SEX ? in_be16(isa_mtw((unsigned long)(p))) \
- : in_le16(isa_mtw((unsigned long)(p))))
-#define isa_writeb(val,p) out_8(isa_mtb((unsigned long)(p)),(val))
-#define isa_writew(val,p) \
- (ISA_SEX ? out_be16(isa_mtw((unsigned long)(p)),(val)) \
- : out_le16(isa_mtw((unsigned long)(p)),(val)))
-
static inline void isa_delay(void)
{
switch(ISA_TYPE)
@@ -254,10 +245,14 @@
#define insw isa_insw
#define outsb isa_outsb
#define outsw isa_outsw
-#define readb isa_readb
-#define readw isa_readw
-#define writeb isa_writeb
-#define writew isa_writew
+#define readb(p) in_8(isa_mtb((unsigned long)(p)))
+#define readw(p) \
+ (ISA_SEX ? in_be16(isa_mtw((unsigned long)(p))) \
+ : in_le16(isa_mtw((unsigned long)(p))))
+#define writeb(val,p) out_8(isa_mtb((unsigned long)(p)),(val))
+#define writew(val,p) \
+ (ISA_SEX ? out_be16(isa_mtw((unsigned long)(p)),(val)) \
+ : out_le16(isa_mtw((unsigned long)(p)),(val)))
#endif /* CONFIG_ISA */
#if defined(CONFIG_PCI)
--- linux-2.6.14-mm2-full/include/asm-sh/io.h.old 2005-11-11 21:50:43.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-sh/io.h 2005-11-11 22:01:37.000000000 +0100
@@ -159,19 +159,6 @@
generic_io_base = pbase;
}
-#define isa_readb(a) readb(isa_port2addr(a))
-#define isa_readw(a) readw(isa_port2addr(a))
-#define isa_readl(a) readl(isa_port2addr(a))
-#define isa_writeb(b,a) writeb(b,isa_port2addr(a))
-#define isa_writew(w,a) writew(w,isa_port2addr(a))
-#define isa_writel(l,a) writel(l,isa_port2addr(a))
-#define isa_memset_io(a,b,c) \
- memset((void *)(isa_port2addr((unsigned long)a)),(b),(c))
-#define isa_memcpy_fromio(a,b,c) \
- memcpy((a),(void *)(isa_port2addr((unsigned long)(b))),(c))
-#define isa_memcpy_toio(a,b,c) \
- memcpy((void *)(isa_port2addr((unsigned long)(a))),(b),(c))
-
/* We really want to try and get these to memcpy etc */
extern void memcpy_fromio(void *, unsigned long, unsigned long);
extern void memcpy_toio(unsigned long, const void *, unsigned long);
--- linux-2.6.14-mm2-full/arch/i386/Kconfig.old 2005-11-11 21:44:56.000000000 +0100
+++ linux-2.6.14-mm2-full/arch/i386/Kconfig 2005-11-11 21:45:09.000000000 +0100
@@ -307,6 +307,7 @@
config TOSHIBA
tristate "Toshiba Laptop support"
+ depends on BROKEN
---help---
This adds a driver to safely access the System Management Mode of
the CPU on Toshiba portables with a genuine Toshiba BIOS. It does
--- linux-2.6.14-mm2-full/drivers/net/Kconfig.old 2005-11-11 21:52:55.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/net/Kconfig 2005-11-11 22:02:32.000000000 +0100
@@ -726,7 +726,7 @@
config LANCE
tristate "AMD LANCE and PCnet (AT1500 and NE2100) support"
- depends on NET_ETHERNET && ISA && ISA_DMA_API
+ depends on NET_ETHERNET && ISA && ISA_DMA_API && BROKEN
help
If you have a network (Ethernet) card of this type, say Y and read
the Ethernet-HOWTO, available from
@@ -935,7 +935,7 @@
config HP100
tristate "HP 10/100VG PCLAN (ISA, EISA, PCI) support"
- depends on NET_ETHERNET && (ISA || EISA || PCI)
+ depends on NET_ETHERNET && (ISA || EISA || PCI) && BROKEN
help
If you have a network (Ethernet) card of this type, say Y and read
the Ethernet-HOWTO, available from
@@ -1021,7 +1021,7 @@
config HPLAN_PLUS
tristate "HP PCLAN+ (27247B and 27252A) support"
- depends on NET_ISA
+ depends on NET_ISA && BROKEN
select CRC32
help
If you have a network (Ethernet) card of this type, say Y and read
--- linux-2.6.14-mm2-full/drivers/net/arcnet/Kconfig.old 2005-11-11 21:45:50.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/net/arcnet/Kconfig 2005-11-11 21:46:22.000000000 +0100
@@ -80,7 +80,7 @@
config ARCNET_COM90xx
tristate "ARCnet COM90xx (normal) chipset driver"
- depends on ARCNET
+ depends on ARCNET && BROKEN
help
This is the chipset driver for the standard COM90xx cards. If you
have always used the old ARCnet driver without knowing what type of
@@ -105,7 +105,7 @@
config ARCNET_RIM_I
tristate "ARCnet COM90xx (RIM I) chipset driver"
- depends on ARCNET
+ depends on ARCNET && BROKEN
---help---
This is yet another chipset driver for the COM90xx cards, but this
time only using memory-mapped mode, and no IO ports at all. This
--- linux-2.6.14-mm2-full/drivers/scsi/Kconfig.old 2005-11-11 21:47:56.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/scsi/Kconfig 2005-11-11 21:48:17.000000000 +0100
@@ -474,7 +474,7 @@
config SCSI_IN2000
tristate "Always IN2000 SCSI support"
- depends on ISA && SCSI
+ depends on ISA && SCSI && BROKEN
help
This is support for an ISA bus SCSI host adapter. You'll find more
information in <file:Documentation/scsi/in2000.txt>. If it doesn't work
--- linux-2.6.14-mm2-full/include/asm-arm/arch-aaec2000/io.h.old 2005-11-12 05:46:17.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-aaec2000/io.h 2005-11-12 05:46:35.000000000 +0100
@@ -16,6 +16,5 @@
*/
#define __io(a) ((void __iomem *)(a))
#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
#endif
--- linux-2.6.14-mm2-full/include/asm-arm/arch-clps711x/io.h.old 2005-11-12 05:46:40.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-clps711x/io.h 2005-11-12 05:46:47.000000000 +0100
@@ -26,7 +26,6 @@
#define __io(a) ((void __iomem *)(a))
#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
/*
* We don't support ins[lb]/outs[lb]. Make them fault.
--- linux-2.6.14-mm2-full/include/asm-arm/arch-ebsa285/io.h.old 2005-11-12 05:47:02.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-ebsa285/io.h 2005-11-12 05:47:43.000000000 +0100
@@ -24,7 +24,6 @@
#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
#if 1
#define __mem_pci(a) (a)
-#define __mem_isa(a) ((a) + PCIMEM_BASE)
#else
static inline void __iomem *___mem_pci(void __iomem *p)
@@ -34,14 +33,7 @@
return p;
}
-static inline void __iomem *___mem_isa(void __iomem *p)
-{
- unsigned long a = (unsigned long)p;
- BUG_ON(a >= 16*1048576);
- return p + PCIMEM_BASE;
-}
#define __mem_pci(a) ___mem_pci(a)
-#define __mem_isa(a) ___mem_isa(a)
#endif
#endif
--- linux-2.6.14-mm2-full/include/asm-arm/arch-integrator/io.h.old 2005-11-12 05:48:52.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-integrator/io.h 2005-11-12 05:48:56.000000000 +0100
@@ -32,6 +32,5 @@
#define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a)))
#define __mem_pci(a) (a)
-#define __mem_isa(a) ((a) + PCI_MEMORY_VADDR)
#endif
--- linux-2.6.14-mm2-full/include/asm-arm/arch-iop3xx/io.h.old 2005-11-12 05:49:04.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-iop3xx/io.h 2005-11-12 05:49:07.000000000 +0100
@@ -17,6 +17,5 @@
#define __io(p) ((void __iomem *)(p))
#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
#endif
--- linux-2.6.14-mm2-full/include/asm-arm/arch-l7200/io.h.old 2005-11-12 05:49:23.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-l7200/io.h 2005-11-12 05:49:28.000000000 +0100
@@ -19,7 +19,6 @@
*/
#define __io_pci(a) ((void __iomem *)(PCIO_BASE + (a)))
#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
#define __ioaddr(p) __io_pci(p)
--- linux-2.6.14-mm2-full/include/asm-arm/arch-lh7a40x/io.h.old 2005-11-12 05:49:42.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-lh7a40x/io.h 2005-11-12 05:49:47.000000000 +0100
@@ -18,6 +18,5 @@
/* No ISA or PCI bus on this machine. */
#define __io(a) ((void __iomem *)(a))
#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
#endif /* __ASM_ARCH_IO_H */
--- linux-2.6.14-mm2-full/include/asm-arm/arch-omap/io.h.old 2005-11-12 05:49:57.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-omap/io.h 2005-11-12 05:50:01.000000000 +0100
@@ -44,7 +44,6 @@
*/
#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
/*
* ----------------------------------------------------------------------------
--- linux-2.6.14-mm2-full/include/asm-arm/arch-pxa/io.h.old 2005-11-12 05:50:11.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-pxa/io.h 2005-11-12 05:50:14.000000000 +0100
@@ -16,6 +16,5 @@
*/
#define __io(a) ((void __iomem *)(a))
#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
#endif
--- linux-2.6.14-mm2-full/include/asm-arm/arch-sa1100/io.h.old 2005-11-12 05:50:22.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-sa1100/io.h 2005-11-12 05:50:25.000000000 +0100
@@ -24,6 +24,5 @@
}
#define __io(a) __io(a)
#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
#endif
--- linux-2.6.14-mm2-full/include/asm-arm/arch-versatile/io.h.old 2005-11-12 05:50:34.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-versatile/io.h 2005-11-12 05:50:37.000000000 +0100
@@ -28,6 +28,5 @@
}
#define __io(a) __io(a)
#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
#endif
--- linux-2.6.14-mm2-full/include/asm-arm/arch-realview/io.h.old 2005-11-12 05:50:45.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-arm/arch-realview/io.h 2005-11-12 05:50:48.000000000 +0100
@@ -29,6 +29,5 @@
#define __io(a) __io(a)
#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
#endif
^ permalink raw reply
* Re: [RFC: 2.6 patch] remove ISA legacy functions
From: Jeff Garzik @ 2005-11-12 5:08 UTC (permalink / raw)
To: Adrian Bunk
Cc: Andrew Morton, linux-kernel, linux-scsi, netdev, jonathan,
tlinux-users, Jaroslav Kysela
In-Reply-To: <20051112045216.GY5376@stusta.de>
Adrian Bunk wrote:
> This patch removes the ISA legacy functions that are deprecated since
> kernel 2.4 and that aren't available on all architectures.
>
> The 7 drivers that were still using this obsolete API are now marked
> as BROKEN.
>
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
it's not valid to mark working drivers broken, IMO.
Mark them x86-only, perhaps.
Jeff
^ permalink raw reply
* Re: [RFC: 2.6 patch] remove ISA legacy functions
From: Matthew Wilcox @ 2005-11-12 5:11 UTC (permalink / raw)
To: Jeff Garzik
Cc: Adrian Bunk, Andrew Morton, linux-kernel, linux-scsi, netdev,
jonathan, tlinux-users, Jaroslav Kysela
In-Reply-To: <437578CD.1080501@pobox.com>
On Sat, Nov 12, 2005 at 12:08:29AM -0500, Jeff Garzik wrote:
> it's not valid to mark working drivers broken, IMO.
>
> Mark them x86-only, perhaps.
hp100 works fine on parisc.
^ permalink raw reply
* [2.6.15-rc1] VFS: file-max limit 400490 reached
From: Jeff Garzik @ 2005-11-12 5:26 UTC (permalink / raw)
To: Linux Kernel, Netdev List
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
I rebooted my RHEL4-based ipv4/ipv6 gateway/server into 2.6.15-rc1, and
very soon the box was brought to its knees, spewing
VFS: file-max limit 400490 reached
with the resultant userspace breakage associated with that. Data points:
* recent 2.6.14-git-recent works
* 2.6.15-rc1 fails
* besides the above error, the only other notable syslog item is
complaints from radvd (ipv6 router advertisement daemon)
* past logs don't show this radvd error
* machine: Intel x86 HT SMP SATA e1000 8139too (kernel config attached)
So, my guess is that something broke in rtnetlink ipv6.
But I could be wildly wrong. This might not have anything to do with
the net stack at all.
[-- Attachment #2: log.txt.bz2 --]
[-- Type: application/x-bzip2, Size: 1507 bytes --]
[-- Attachment #3: config.bz2 --]
[-- Type: application/x-bzip2, Size: 7304 bytes --]
^ permalink raw reply
* Re: [RFC: 2.6 patch] remove ISA legacy functions
From: Jeff Garzik @ 2005-11-12 5:27 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Adrian Bunk, Andrew Morton, linux-kernel, linux-scsi, netdev,
jonathan, tlinux-users, Jaroslav Kysela
In-Reply-To: <20051112051102.GF1658@parisc-linux.org>
Matthew Wilcox wrote:
> On Sat, Nov 12, 2005 at 12:08:29AM -0500, Jeff Garzik wrote:
>
>>it's not valid to mark working drivers broken, IMO.
>>
>>Mark them x86-only, perhaps.
>
>
> hp100 works fine on parisc.
Certainly. The point was, don't mark them broken, limit them to the
arches where they work.
Jeff
^ permalink raw reply
* Re: [RFC: 2.6 patch] remove ISA legacy functions
From: Matthew Wilcox @ 2005-11-12 5:29 UTC (permalink / raw)
To: Jeff Garzik
Cc: Adrian Bunk, Andrew Morton, linux-kernel, linux-scsi, netdev,
jonathan, tlinux-users, Jaroslav Kysela
In-Reply-To: <43757D5C.8030308@pobox.com>
On Sat, Nov 12, 2005 at 12:27:56AM -0500, Jeff Garzik wrote:
> Matthew Wilcox wrote:
> >On Sat, Nov 12, 2005 at 12:08:29AM -0500, Jeff Garzik wrote:
> >
> >>it's not valid to mark working drivers broken, IMO.
> >>
> >>Mark them x86-only, perhaps.
> >
> >
> >hp100 works fine on parisc.
>
> Certainly. The point was, don't mark them broken, limit them to the
> arches where they work.
I think they work fine everywhere. Adrian wants to remove the API they
use.
I think this is a bad idea. The drivers should be converted.
^ permalink raw reply
* Re: [2.6.15-rc1] VFS: file-max limit 400490 reached
From: Chris Wedgwood @ 2005-11-12 5:30 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Linux Kernel, Netdev List
In-Reply-To: <43757D18.9090109@pobox.com>
On Sat, Nov 12, 2005 at 12:26:48AM -0500, Jeff Garzik wrote:
> VFS: file-max limit 400490 reached
does lsof show anything useful?
^ permalink raw reply
* Re: [2.6.15-rc1] VFS: file-max limit 400490 reached
From: Jeff Garzik @ 2005-11-12 5:34 UTC (permalink / raw)
To: Chris Wedgwood; +Cc: Linux Kernel, Netdev List
In-Reply-To: <20051112053052.GA1210@taniwha.stupidest.org>
Chris Wedgwood wrote:
> On Sat, Nov 12, 2005 at 12:26:48AM -0500, Jeff Garzik wrote:
>
>
>> VFS: file-max limit 400490 reached
>
>
> does lsof show anything useful?
Alas, no. [from memory, I've since rebooted]
lsof | wc -l
808
^ permalink raw reply
* Re: [2.6.15-rc1] VFS: file-max limit 400490 reached
From: Jeff Garzik @ 2005-11-12 6:03 UTC (permalink / raw)
To: Linux Kernel, Netdev List
In-Reply-To: <43757D18.9090109@pobox.com>
[-- Attachment #1: Type: text/plain, Size: 441 bytes --]
Jeff Garzik wrote:
>
> I rebooted my RHEL4-based ipv4/ipv6 gateway/server into 2.6.15-rc1, and
> very soon the box was brought to its knees, spewing
>
> VFS: file-max limit 400490 reached
Follow-up: I may have excised too much from the head of the log I posted.
It now looks like the radvd troubles may have started with a link
up/down event.
Attached is some additional lines found at the -head- of the previously
posted log.
[-- Attachment #2: log2.txt --]
[-- Type: text/plain, Size: 2485 bytes --]
Nov 11 22:38:32 pretzel dhcpd: dhcpd startup succeeded
Nov 11 22:38:33 pretzel exim: exim startup succeeded
Nov 11 22:38:34 pretzel httpd: httpd startup succeeded
Nov 11 22:38:34 pretzel crond: crond startup succeeded
Nov 11 22:38:34 pretzel anacron: anacron startup succeeded
Nov 11 22:38:35 pretzel atd: atd startup succeeded
Nov 11 22:38:40 pretzel login(pam_unix)[4705]: session opened for user root by LOGIN(uid=0)
Nov 11 22:38:40 pretzel -- root[4705]: ROOT LOGIN ON tty1
Nov 11 22:38:55 pretzel login(pam_unix)[4705]: session closed for user root
Nov 11 22:45:54 pretzel sshd(pam_unix)[5241]: session opened for user jgarzik by (uid=0)
Nov 11 22:45:58 pretzel sshd(pam_unix)[5283]: session opened for user jgarzik by (uid=0)
Nov 11 23:01:01 pretzel crond(pam_unix)[28125]: session opened for user root by (uid=0)
Nov 11 23:01:02 pretzel crond(pam_unix)[28125]: session closed for user root
Nov 11 23:01:39 pretzel sshd(pam_unix)[29561]: session opened for user jgarzik by (uid=0)
Nov 11 23:01:48 pretzel sshd(pam_unix)[29561]: session closed for user jgarzik
Nov 11 23:34:00 pretzel kernel: e1000: eth1: e1000_watchdog_task: NIC Link is Down
Nov 11 23:34:01 pretzel netplugd[4112]: eth1: state ACTIVE flags 0x00001043 UP,BROADCAST,RUNNING,MULTICAST -> 0x00001003 UP,BROADCAST,MULTICAST
Nov 11 23:34:01 pretzel netplugd[25700]: /etc/netplug.d/netplug eth1 out -> pid 25700
Nov 11 23:34:01 pretzel radvd[4428]: resetting ipv6-allrouters membership on eth1
Nov 11 23:34:01 pretzel radvd[4428]: can't join ipv6-allrouters on eth1
Nov 11 23:34:07 pretzel kernel: e1000: eth1: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex
Nov 11 23:34:07 pretzel netplugd[4112]: eth1: state OUTING flags 0x00001003 UP,BROADCAST,MULTICAST -> 0x00001043 UP,BROADCAST,RUNNING,MULTICAST
Nov 11 23:34:10 pretzel radvd[4428]: resetting ipv6-allrouters membership on eth1
Nov 11 23:34:10 pretzel radvd[4428]: can't join ipv6-allrouters on eth1
Nov 11 23:34:16 pretzel radvd[4428]: resetting ipv6-allrouters membership on eth1
Nov 11 23:34:16 pretzel radvd[4428]: can't join ipv6-allrouters on eth1
Nov 11 23:34:23 pretzel radvd[4428]: resetting ipv6-allrouters membership on eth1
Nov 11 23:34:23 pretzel radvd[4428]: can't join ipv6-allrouters on eth1
Nov 11 23:34:31 pretzel radvd[4428]: resetting ipv6-allrouters membership on eth1
Nov 11 23:34:31 pretzel radvd[4428]: can't join ipv6-allrouters on eth1
Nov 11 23:34:37 pretzel radvd[4428]: resetting ipv6-allrouters membership on eth1
[...]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox