[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.1.10.0809252243090.3389@pegasus.suse.cz>
Date: Thu, 25 Sep 2008 22:45:24 +0200 (CEST)
From: Jiri Kosina <jkosina@...e.cz>
To: Jesse Barnes <jbarnes@...tuousgeek.org>
cc: David Miller <davem@...emloft.net>, jeffrey.t.kirsher@...el.com,
airlied@...il.com, david.vrabel@....com, rjw@...k.pl,
linux-kernel@...r.kernel.org, kernel-testers@...r.kernel.org,
chrisl@...are.com, Ingo Molnar <mingo@...e.hu>
Subject: Re: [Bug #11382] e1000e: 2.6.27-rc1 corrupts EEPROM/NVM
On Thu, 25 Sep 2008, Jesse Barnes wrote:
> Here's a patch that adds range checking to the sysfs mappings at least.
> This patch should catch the case where X (or some other process) tries
> to map beyond the specific BAR it's (supposedly) trying to access,
> making things safer in general. FWIW both my F9 and development
> versions of X start up fine with this patch applied.
Good. We will use this on affected machines after we start some real
debugging of this.
> + /*
> + * Make sure the range the user is trying to map falls within
> + * the resource
> + */
> + if (map_offset + map_len > pci_resource_len(pdev, i))
> + return -EINVAL;
> +
At least for debugging purposes I'd propose to put a printk() there with
process name, and the range it tries to map.
Thanks,
--
Jiri Kosina
SUSE Labs
--
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