lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 30 Nov 2007 11:14:17 +0100
From:	Thomas Renninger <trenn@...e.de>
To:	Shaohua Li <shaohua.li@...el.com>
Cc:	Rene Herman <rene.herman@...access.nl>,
	Dave Young <hidave.darkstar@...il.com>, lenb@...nel.org,
	linux-acpi@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	Zhao Yakui <yakui.zhao@...el.com>,
	Bjorn Helgaas <bjorn.helgaas@...com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: [PATCH] Set pnp_init_resource_table, pnp_resource_change,
	pnp_manual_config_dev deprecated

On Fri, 2007-11-30 at 10:32 +0800, Shaohua Li wrote:
> On Fri, 2007-11-30 at 03:18 +0100, Rene Herman wrote:
> > On 29-11-07 10:11, Dave Young wrote:
> > 
> > > The pnpacpi rsparser.c report warnings of:
> > > exceeded the max number of IO resources: 24
> > > 
> > > dmesg|grep exceeded|wc
> > >     66     594    3564
> > 
> > Heavens... (added CCs of people who just upped it from 8 -- I suppose the 
> > problem is not new then?)
> Properly we should make a bit bigger till Thomas's patch is ready.
> Thomas, your patch isn't 2.6.24 staff, right?

Definitely not.
I also wonder how sever this is..., we now at least register 24, we
didn't reserve more than 8 for at least 2 kernel iterations AFAIK.
Another workaround could be:
AFAIK IO resources below 0x100 are (still?) ignored atm.
If they are ignored earlier, at parse time
({pnpbios,pnpacpi}/rsparser.c) and they are not added to the
pnp_resource_table of the device, we would save another maybe 4-6 IO
ports which are ignored anyway.


I don't know how many externally built drivers, which are making use of
this, could still be out there?
What is the general policy for removing such old, rarely used and "being
more a workaround than an interface" exported symbols?

This should be 2.6.24 material:

Mark pnp_init_resource_table, pnp_resource_change, pnp_manual_config_dev deprecated

Thanks to Rene Herman, the remaining calls to those functions got eliminated
in the sound/isa layer recently.
Those functions are a workaround for wrong BIOS pnp information and give
drivers the possibility to override BIOS exported PNP resources.
This can be done through sysfs since 2.6, therefore these functions should
vanish rather soon, as dynamic allocation for PNP resources is depending
on it.

Signed-off-by: Thomas Renninger <trenn@...e.de>

---
 include/linux/pnp.h |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Index: linux-2.6.24-rc3-mm2/include/linux/pnp.h
===================================================================
--- linux-2.6.24-rc3-mm2.orig/include/linux/pnp.h
+++ linux-2.6.24-rc3-mm2/include/linux/pnp.h
@@ -387,8 +387,8 @@ int pnp_register_dma_resource(struct pnp
 int pnp_register_port_resource(struct pnp_option *option,
 			       struct pnp_port *data);
 int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data);
-void pnp_init_resource_table(struct pnp_resource_table *table);
-int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res,
+void __deprecated pnp_init_resource_table(struct pnp_resource_table *table);
+int __deprecated pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res,
 			  int mode);
 int pnp_auto_config_dev(struct pnp_dev *dev);
 int pnp_validate_config(struct pnp_dev *dev);
@@ -396,8 +396,8 @@ int pnp_start_dev(struct pnp_dev *dev);
 int pnp_stop_dev(struct pnp_dev *dev);
 int pnp_activate_dev(struct pnp_dev *dev);
 int pnp_disable_dev(struct pnp_dev *dev);
-void pnp_resource_change(struct resource *resource, resource_size_t start,
-			 resource_size_t size);
+void __deprecated pnp_resource_change(struct resource *resource, resource_size_t start,
+				      resource_size_t size);
 
 /* protocol helpers */
 int pnp_is_active(struct pnp_dev *dev);
@@ -436,15 +436,15 @@ static inline int pnp_register_irq_resou
 static inline int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data) { return -ENODEV; }
 static inline int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data) { return -ENODEV; }
 static inline int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data) { return -ENODEV; }
-static inline void pnp_init_resource_table(struct pnp_resource_table *table) { }
-static inline int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode) { return -ENODEV; }
+static inline void __deprecated pnp_init_resource_table(struct pnp_resource_table *table) { }
+static inline int __deprecated pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode) { return -ENODEV; }
 static inline int pnp_auto_config_dev(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_validate_config(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
-static inline void pnp_resource_change(struct resource *resource, resource_size_t start, resource_size_t size) { }
+static inline void __deprecated pnp_resource_change(struct resource *resource, resource_size_t start, resource_size_t size) { }
 
 /* protocol helpers */
 static inline int pnp_is_active(struct pnp_dev *dev) { return 0; }


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ