Skip to contentSkip to conversation

move ICHx GbE NVM write-protection from e1000e to PCI quirk

PATCH David Miller 4 participants 7 messages Nov 17, 2008

Subsystems (2)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

I'm less than thrilled with this patch so I'm not going to apply it.

I mean, what are we going to do, for every single device that has a NVRAM we're going to add some PCI quirk and some new global foo_* kernel command line option to turn it off?

That doesn't make any sense at all, sorry.

#1 lore raw
Quoted 7 lines · David Miller

I'm less than thrilled with this patch so I'm not going to apply it.

I mean, what are we going to do, for every single device that has a NVRAM we're going to add some PCI quirk and some new global foo_* kernel command line option to turn it off?

That doesn't make any sense at all, sorry.

Could we protect it in a PCI quirk, and optionally unprotect it in the driver?

-- Chris

author maintainer
#2 lore raw

From: Chris Snook <[email protected]>
Date: Mon, 17 Nov 2008 14:40:32 -0500

Quoted 8 lines
Quoted 5 lines · David Miller

I'm less than thrilled with this patch so I'm not going to apply it. I mean, what are we going to do, for every single device that has a NVRAM we're going to add some PCI quirk and some new global foo_* kernel command line option to turn it off?
That doesn't make any sense at all, sorry.

Could we protect it in a PCI quirk, and optionally unprotect it in the driver?

I think it's an overreaction, frankly.

Doing it purely in the driver should be fine.

Again are we going to add a NVRAM protect quirk for every PCI device on the planet that has a NVRAM?

It's not appropriate at all.

#3 lore raw

Well, no, not for every device with an NVRAM; just those LOM parts in the ICH-based family of products that has an unprotected region of NVRAM and a not-so-difficult set of steps necessary to corrupt the NVRAM by taking advantage of that. By leaving the write-protection in the driver, the NVRAM can still be damaged before the driver loads (as seen with corruptions from ftrace in 2.6.27) or if the driver is never loaded.

Once the NVRAM is write-protected the driver cannot revoke that protection, only a system reset will do that. The kernel command line option to disable the write protection is so that if/when a user needs to change a value in the NVRAM it can still be done.

Quoted 29 lines

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Monday, November 17, 2008 11:50 AM
To: [email protected]
Cc: Kirsher, Jeffrey T; Allan, Bruce W; [email protected]
Subject: Re: [v2,PCI] move ICHx GbE NVM write-protection from e1000e to PCI quirk

From: Chris Snook <[email protected]>
Date: Mon, 17 Nov 2008 14:40:32 -0500

Quoted 8 lines
Quoted 5 lines · David Miller

I'm less than thrilled with this patch so I'm not going to apply it. I mean, what are we going to do, for every single device that has a NVRAM we're going to add some PCI quirk and some new global foo_* kernel command line option to turn it off?
That doesn't make any sense at all, sorry.

Could we protect it in a PCI quirk, and optionally unprotect it in the

driver?

I think it's an overreaction, frankly.

Doing it purely in the driver should be fine.

Again are we going to add a NVRAM protect quirk for every PCI device on the planet that has a NVRAM?

It's not appropriate at all.

#4 lore raw

On Mon, 2008-11-17 at 12:02 -0800, Allan, Bruce W wrote:
[...]

Quoted 4 lines

Once the NVRAM is write-protected the driver cannot revoke that protection, only a system reset will do that. The kernel command line option to disable the write protection is so that if/when a user needs to change a value in the NVRAM it can still be done.

Although the ICHx write-protection bit is irreversible without a reset, it works with SPI flash chips and these normally have their own write- protection bits that can be switched on and off.

Ben.

Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
author maintainer
#5 lore raw
In reply to Allan, Bruce W

From: "Allan, Bruce W" <[email protected]>
Date: Mon, 17 Nov 2008 12:02:32 -0800

Quoted 8 lines

Well, no, not for every device with an NVRAM; just those LOM parts in the ICH-based family of products that has an unprotected region of NVRAM and a not-so-difficult set of steps necessary to corrupt the NVRAM by taking advantage of that. By leaving the write-protection in the driver, the NVRAM can still be damaged before the driver loads (as seen with corruptions from ftrace in 2.6.27) or if the driver is never loaded.

Quoted 4 lines

Once the NVRAM is write-protected the driver cannot revoke that protection, only a system reset will do that. The kernel command line option to disable the write protection is so that if/when a user needs to change a value in the NVRAM it can still be done.

It seems to me the ftrace case could have triggered before PCI even initializes.

Why not, therefore, write a very-early-initcall mini-driver that does this instead?

#6 lore raw

Hmmm, I'll look into it. Thanks.

Quoted 29 lines

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Monday, November 17, 2008 12:21 PM
To: Allan, Bruce W
Cc: [email protected]; Kirsher, Jeffrey T; [email protected]
Subject: Re: [v2,PCI] move ICHx GbE NVM write-protection from e1000e to PCI quirk

From: "Allan, Bruce W" <[email protected]>
Date: Mon, 17 Nov 2008 12:02:32 -0800

Quoted 8 lines

Well, no, not for every device with an NVRAM; just those LOM parts in the ICH-based family of products that has an unprotected region of NVRAM and a not-so-difficult set of steps necessary to corrupt the NVRAM by taking advantage of that. By leaving the write-protection in the driver, the NVRAM can still be damaged before the driver loads (as seen with corruptions from ftrace in 2.6.27) or if the driver is never loaded.

Quoted 4 lines

Once the NVRAM is write-protected the driver cannot revoke that protection, only a system reset will do that. The kernel command line option to disable the write protection is so that if/when a user needs to change a value in the NVRAM it can still be done.

It seems to me the ftrace case could have triggered before PCI even initializes.

Why not, therefore, write a very-early-initcall mini-driver that does this instead?