Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[00/11] -stable review

0 views
Skip to first unread message

Greg KH

unread,
Jul 13, 2005, 5:34:14 PM7/13/05
to linux-...@vger.kernel.org, sta...@kernel.org, Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap, Chuck Wolber, torv...@osdl.org, ak...@osdl.org, al...@lxorguk.ukuu.org.uk
This is the start of the stable review cycle for the 2.6.12.3 release.
There are 11 patches in this series, all will be posted as a response to
this one. If anyone has any issues with these being applied, please let
us know. If anyone is a maintainer of the proper subsystem, and wants
to add a signed-off-by: line to the patch, please respond with it.

These patches are sent out with a number of different people on the Cc:
line. If you wish to be a reviewer, please email sta...@kernel.org to
add your name to the list. If you want to be off the reviewer list,
also email us.

Responses should be made by Friday, July 15, 20:00:00 UTC 2005.
Anything received after that time, might be too late.

thanks,

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

Greg KH

unread,
Jul 13, 2005, 2:52:01 PM7/13/05
to je...@cola.voip.idv.tw, linux-...@vger.kernel.org, sta...@kernel.org, Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy.Dunlap, Chuck Wolber, torv...@osdl.org, ak...@osdl.org, al...@lxorguk.ukuu.org.uk
-stable review patch. If anyone has any objections, please let us know.

------------------

This up() should be down() instead.

Signed-off-by: Wen-chien Jesse Sung <je...@cola.voip.idv.tw>
Signed-off-by: Chris Wright <chr...@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>
---
fs/char_dev.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.12.2.orig/fs/char_dev.c 2005-06-17 12:48:29.000000000 -0700
+++ linux-2.6.12.2/fs/char_dev.c 2005-07-13 10:54:19.000000000 -0700
@@ -139,7 +139,7 @@
struct char_device_struct *cd = NULL, **cp;
int i = major_to_index(major);

- up(&chrdevs_lock);
+ down(&chrdevs_lock);
for (cp = &chrdevs[i]; *cp; cp = &(*cp)->next)
if ((*cp)->major == major &&
(*cp)->baseminor == baseminor &&

Greg KH

unread,
Jul 13, 2005, 6:33:59 PM7/13/05
to be...@kernel.crashing.org, john...@us.ibm.com, tr...@kernel.crashing.org, linux-...@vger.kernel.org, sta...@kernel.org, Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy.Dunlap, Chuck Wolber, torv...@osdl.org, ak...@osdl.org, al...@lxorguk.ukuu.org.uk
-stable review patch. If anyone has any objections, please let us know.

------------------

From: john stultz <john...@us.ibm.com>

As part of my timeofday rework, I've been looking at the NTP code and I
noticed that the PPC architecture is apparently misusing the NTP's
time_offset (it is a terrible name!) value as some form of timezone offset.

This could cause problems when time_offset changed by the NTP code. This
patch changes the PPC code so it uses a more clear local variable:
timezone_offset.

Signed-off-by: John Stultz <john...@us.ibm.com>
Acked-by: Tom Rini <tr...@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <be...@kernel.crashing.org>
Signed-off-by: Andrew Morton <ak...@osdl.org>


Signed-off-by: Chris Wright <chr...@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>
---

arch/ppc/kernel/time.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)

--- linux-2.6.12.2.orig/arch/ppc/kernel/time.c 2005-06-17 12:48:29.000000000 -0700
+++ linux-2.6.12.2/arch/ppc/kernel/time.c 2005-07-13 10:56:23.000000000 -0700
@@ -89,6 +89,9 @@

extern unsigned long wall_jiffies;

+/* used for timezone offset */
+static long timezone_offset;
+
DEFINE_SPINLOCK(rtc_lock);

EXPORT_SYMBOL(rtc_lock);
@@ -170,7 +173,7 @@
xtime.tv_sec - last_rtc_update >= 659 &&
abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&
jiffies - wall_jiffies == 1) {
- if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
+ if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0)
last_rtc_update = xtime.tv_sec+1;
else
/* Try again one minute later */
@@ -286,7 +289,7 @@
unsigned old_stamp, stamp, elapsed;

if (ppc_md.time_init != NULL)
- time_offset = ppc_md.time_init();
+ timezone_offset = ppc_md.time_init();

if (__USE_RTC()) {
/* 601 processor: dec counts down by 128 every 128ns */
@@ -331,10 +334,10 @@
set_dec(tb_ticks_per_jiffy);

/* If platform provided a timezone (pmac), we correct the time */
- if (time_offset) {
- sys_tz.tz_minuteswest = -time_offset / 60;
+ if (timezone_offset) {
+ sys_tz.tz_minuteswest = -timezone_offset / 60;
sys_tz.tz_dsttime = 0;
- xtime.tv_sec -= time_offset;
+ xtime.tv_sec -= timezone_offset;
}
set_normalized_timespec(&wall_to_monotonic,
-xtime.tv_sec, -xtime.tv_nsec);

Greg KH

unread,
Jul 13, 2005, 2:49:26 PM7/13/05
to kjh...@us.ibm.com, bjorn....@hp.com, tpmdd...@lists.sourceforge.net, linux-...@vger.kernel.org, sta...@kernel.org, Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy.Dunlap, Chuck Wolber, torv...@osdl.org, ak...@osdl.org, al...@lxorguk.ukuu.org.uk
-stable review patch. If anyone has any objections, please let us know.

------------------

A problem was reported that the tpm driver was interfereing with
networking on the 8139 chipset. The tpm driver was using a hard coded
the memory address instead of the value the BIOS was putting the chip
at. This was in the tpm_lpc_bus_init function. That function can be
replaced with querying the value at Vendor specific locations. This
patch replaces all calls to tpm_lpc_bus_init and the hardcoding of the
base address with a lookup of the address at the correct vendor
location.

Signed-off-by: Kylene Hall <kjh...@us.ibm.com>


Signed-off-by: Chris Wright <chr...@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>
---

drivers/char/tpm/tpm.c | 76 -------------------------------------------
drivers/char/tpm/tpm.h | 2 -
drivers/char/tpm/tpm_atmel.c | 16 +++++----
drivers/char/tpm/tpm_nsc.c | 16 +++++----
4 files changed, 20 insertions(+), 90 deletions(-)

--- linux-2.6.12.2.orig/drivers/char/tpm/tpm_atmel.c 2005-06-17 12:48:29.000000000 -0700
+++ linux-2.6.12.2/drivers/char/tpm/tpm_atmel.c 2005-07-13 10:56:27.000000000 -0700
@@ -22,7 +22,10 @@
#include "tpm.h"

/* Atmel definitions */
-#define TPM_ATML_BASE 0x400
+enum tpm_atmel_addr {
+ TPM_ATMEL_BASE_ADDR_LO = 0x08,
+ TPM_ATMEL_BASE_ADDR_HI = 0x09
+};

/* write status bits */
#define ATML_STATUS_ABORT 0x01
@@ -127,7 +130,6 @@
.cancel = tpm_atml_cancel,
.req_complete_mask = ATML_STATUS_BUSY | ATML_STATUS_DATA_AVAIL,
.req_complete_val = ATML_STATUS_DATA_AVAIL,
- .base = TPM_ATML_BASE,
.miscdev = { .fops = &atmel_ops, },
};

@@ -136,14 +138,16 @@
{
u8 version[4];
int rc = 0;
+ int lo, hi;

if (pci_enable_device(pci_dev))
return -EIO;

- if (tpm_lpc_bus_init(pci_dev, TPM_ATML_BASE)) {
- rc = -ENODEV;
- goto out_err;
- }
+ lo = tpm_read_index( TPM_ATMEL_BASE_ADDR_LO );
+ hi = tpm_read_index( TPM_ATMEL_BASE_ADDR_HI );
+
+ tpm_atmel.base = (hi<<8)|lo;
+ dev_dbg( &pci_dev->dev, "Operating with base: 0x%x\n", tpm_atmel.base);

/* verify that it is an Atmel part */
if (tpm_read_index(4) != 'A' || tpm_read_index(5) != 'T'
--- linux-2.6.12.2.orig/drivers/char/tpm/tpm.c 2005-06-17 12:48:29.000000000 -0700
+++ linux-2.6.12.2/drivers/char/tpm/tpm.c 2005-07-13 10:56:27.000000000 -0700
@@ -32,12 +32,6 @@

#define TPM_BUFSIZE 2048

-/* PCI configuration addresses */
-#define PCI_GEN_PMCON_1 0xA0
-#define PCI_GEN1_DEC 0xE4
-#define PCI_LPC_EN 0xE6
-#define PCI_GEN2_DEC 0xEC
-
static LIST_HEAD(tpm_chip_list);
static DEFINE_SPINLOCK(driver_lock);
static int dev_mask[32];
@@ -61,72 +55,6 @@
EXPORT_SYMBOL_GPL(tpm_time_expired);

/*
- * Initialize the LPC bus and enable the TPM ports
- */
-int tpm_lpc_bus_init(struct pci_dev *pci_dev, u16 base)
-{
- u32 lpcenable, tmp;
- int is_lpcm = 0;
-
- switch (pci_dev->vendor) {
- case PCI_VENDOR_ID_INTEL:
- switch (pci_dev->device) {
- case PCI_DEVICE_ID_INTEL_82801CA_12:
- case PCI_DEVICE_ID_INTEL_82801DB_12:
- is_lpcm = 1;
- break;
- }
- /* init ICH (enable LPC) */
- pci_read_config_dword(pci_dev, PCI_GEN1_DEC, &lpcenable);
- lpcenable |= 0x20000000;
- pci_write_config_dword(pci_dev, PCI_GEN1_DEC, lpcenable);
-
- if (is_lpcm) {
- pci_read_config_dword(pci_dev, PCI_GEN1_DEC,
- &lpcenable);
- if ((lpcenable & 0x20000000) == 0) {
- dev_err(&pci_dev->dev,
- "cannot enable LPC\n");
- return -ENODEV;
- }
- }
-
- /* initialize TPM registers */
- pci_read_config_dword(pci_dev, PCI_GEN2_DEC, &tmp);
-
- if (!is_lpcm)
- tmp = (tmp & 0xFFFF0000) | (base & 0xFFF0);
- else
- tmp =
- (tmp & 0xFFFF0000) | (base & 0xFFF0) |
- 0x00000001;
-
- pci_write_config_dword(pci_dev, PCI_GEN2_DEC, tmp);
-
- if (is_lpcm) {
- pci_read_config_dword(pci_dev, PCI_GEN_PMCON_1,
- &tmp);
- tmp |= 0x00000004; /* enable CLKRUN */
- pci_write_config_dword(pci_dev, PCI_GEN_PMCON_1,
- tmp);
- }
- tpm_write_index(0x0D, 0x55); /* unlock 4F */
- tpm_write_index(0x0A, 0x00); /* int disable */
- tpm_write_index(0x08, base); /* base addr lo */
- tpm_write_index(0x09, (base & 0xFF00) >> 8); /* base addr hi */
- tpm_write_index(0x0D, 0xAA); /* lock 4F */
- break;
- case PCI_VENDOR_ID_AMD:
- /* nothing yet */
- break;
- }
-
- return 0;
-}
-
-EXPORT_SYMBOL_GPL(tpm_lpc_bus_init);
-
-/*
* Internal kernel interface to transmit TPM commands
*/
static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
@@ -590,10 +518,6 @@
if (chip == NULL)
return -ENODEV;

- spin_lock(&driver_lock);
- tpm_lpc_bus_init(pci_dev, chip->vendor->base);
- spin_unlock(&driver_lock);
-
return 0;
}

--- linux-2.6.12.2.orig/drivers/char/tpm/tpm.h 2005-06-17 12:48:29.000000000 -0700
+++ linux-2.6.12.2/drivers/char/tpm/tpm.h 2005-07-13 10:56:27.000000000 -0700
@@ -79,8 +79,6 @@
}

extern void tpm_time_expired(unsigned long);
-extern int tpm_lpc_bus_init(struct pci_dev *, u16);
-
extern int tpm_register_hardware(struct pci_dev *,
struct tpm_vendor_specific *);
extern int tpm_open(struct inode *, struct file *);
--- linux-2.6.12.2.orig/drivers/char/tpm/tpm_nsc.c 2005-06-17 12:48:29.000000000 -0700
+++ linux-2.6.12.2/drivers/char/tpm/tpm_nsc.c 2005-07-13 10:56:27.000000000 -0700
@@ -24,6 +24,10 @@
/* National definitions */
#define TPM_NSC_BASE 0x360
#define TPM_NSC_IRQ 0x07
+#define TPM_NSC_BASE0_HI 0x60
+#define TPM_NSC_BASE0_LO 0x61
+#define TPM_NSC_BASE1_HI 0x62
+#define TPM_NSC_BASE1_LO 0x63

#define NSC_LDN_INDEX 0x07
#define NSC_SID_INDEX 0x20
@@ -234,7 +238,6 @@
.cancel = tpm_nsc_cancel,
.req_complete_mask = NSC_STATUS_OBF,
.req_complete_val = NSC_STATUS_OBF,
- .base = TPM_NSC_BASE,
.miscdev = { .fops = &nsc_ops, },

};
@@ -243,15 +246,16 @@
const struct pci_device_id *pci_id)
{
int rc = 0;
+ int lo, hi;
+
+ hi = tpm_read_index(TPM_NSC_BASE0_HI);
+ lo = tpm_read_index(TPM_NSC_BASE0_LO);
+
+ tpm_nsc.base = (hi<<8) | lo;

if (pci_enable_device(pci_dev))
return -EIO;

- if (tpm_lpc_bus_init(pci_dev, TPM_NSC_BASE)) {
- rc = -ENODEV;
- goto out_err;
- }
-
/* verify that it is a National part (SID) */
if (tpm_read_index(NSC_SID_INDEX) != 0xEF) {
rc = -ENODEV;

Greg KH

unread,
Jul 13, 2005, 3:36:13 PM7/13/05
to mkr...@m1k.net, linux-...@vger.kernel.org, sta...@kernel.org, Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy.Dunlap, Chuck Wolber, torv...@osdl.org, ak...@osdl.org, al...@lxorguk.ukuu.org.uk
-stable review patch. If anyone has any objections, please let us know.

------------------

Changed hue offset to 128 to correct behavior in cx88 cards. Previously,
setting 0% or 100% hue was required to avoid blue/green people on screen.
Now, 50% Hue means no offset, just like bt878 stuff.

Signed-off-by: Michael Krufky <mkr...@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mch...@brturbo.com.br>


Signed-off-by: Chris Wright <chr...@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>
---

drivers/media/video/cx88/cx88-video.c | 2 +-


1 files changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.12.2.orig/drivers/media/video/cx88/cx88-video.c 2005-06-17 12:48:29.000000000 -0700
+++ linux-2.6.12.2/drivers/media/video/cx88/cx88-video.c 2005-07-13 10:56:14.000000000 -0700
@@ -261,7 +261,7 @@
.default_value = 0,
.type = V4L2_CTRL_TYPE_INTEGER,
},
- .off = 0,
+ .off = 128,
.reg = MO_HUE,
.mask = 0x00ff,
.shift = 0,

Greg KH

unread,
Jul 13, 2005, 6:16:03 PM7/13/05
to blaiso...@yahoo.it, jd...@addtoit.com, user-mode-...@lists.sourceforge.net, linux-...@vger.kernel.org, sta...@kernel.org, Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy.Dunlap, Chuck Wolber, torv...@osdl.org, ak...@osdl.org, al...@lxorguk.ukuu.org.uk
-stable review patch. If anyone has any objections, please let us know.

------------------

From: Jeff Dike <jd...@addtoit.com>, Paolo 'Blaisorblade' Giarrusso <blaiso...@yahoo.it>

Revert the following patch, because of miscompilation problems in different
environments leading to UML not working *at all* in TT mode; it was merged
lately in 2.6 development cycle, a little after being written, and has caused
problems to lots of people; I know it's a bit too long, but it shouldn't have
been merged in first place, so I still apply for inclusion in the -stable
tree. Anyone using this feature currently is either using some older kernel
(some reports even used 2.6.12-rc4-mm2) or using this patch, as included in my
-bs patchset.

For now there's not yet a fix for this patch, so for now the best thing is to
drop it (which was widely reported to give a working kernel).

"Convert the boot-time host ptrace testing from clone to fork. They were
essentially doing fork anyway. This cleans up the code a bit, and makes
valgrind a bit happier about grinding it."

URL:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=98fdffccea6cc3fe9dba32c0fcc310bcb5d71529

Signed-off-by: Jeff Dike <jd...@addtoit.com>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaiso...@yahoo.it>


Signed-off-by: Chris Wright <chr...@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>
---

arch/um/kernel/process.c | 48 ++++++++++++++++++++++++++++-------------------
1 files changed, 29 insertions(+), 19 deletions(-)

--- linux-2.6.12.2.orig/arch/um/kernel/process.c 2005-06-17 12:48:29.000000000 -0700
+++ linux-2.6.12.2/arch/um/kernel/process.c 2005-07-13 10:56:41.000000000 -0700
@@ -130,7 +130,7 @@
return(arg.pid);
}

-static int ptrace_child(void)
+static int ptrace_child(void *arg)
{
int ret;
int pid = os_getpid(), ppid = getppid();
@@ -159,16 +159,20 @@
_exit(ret);
}

-static int start_ptraced_child(void)
+static int start_ptraced_child(void **stack_out)
{
+ void *stack;
+ unsigned long sp;
int pid, n, status;

- pid = fork();
- if(pid == 0)
- ptrace_child();
-
+ stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ if(stack == MAP_FAILED)
+ panic("check_ptrace : mmap failed, errno = %d", errno);
+ sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *);
+ pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL);
if(pid < 0)
- panic("check_ptrace : fork failed, errno = %d", errno);
+ panic("check_ptrace : clone failed, errno = %d", errno);
CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
if(n < 0)
panic("check_ptrace : wait failed, errno = %d", errno);
@@ -176,6 +180,7 @@
panic("check_ptrace : expected SIGSTOP, got status = %d",
status);

+ *stack_out = stack;
return(pid);
}

@@ -183,12 +188,12 @@
* just avoid using sysemu, not panic, but only if SYSEMU features are broken.
* So only for SYSEMU features we test mustpanic, while normal host features
* must work anyway!*/
-static int stop_ptraced_child(int pid, int exitcode, int mustexit)
+static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic)
{
int status, n, ret = 0;

if(ptrace(PTRACE_CONT, pid, 0, 0) < 0)
- panic("stop_ptraced_child : ptrace failed, errno = %d", errno);
+ panic("check_ptrace : ptrace failed, errno = %d", errno);
CATCH_EINTR(n = waitpid(pid, &status, 0));
if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) {
int exit_with = WEXITSTATUS(status);
@@ -199,13 +204,15 @@
printk("check_ptrace : child exited with exitcode %d, while "
"expecting %d; status 0x%x", exit_with,
exitcode, status);
- if (mustexit)
+ if (mustpanic)
panic("\n");
else
printk("\n");
ret = -1;
}

+ if(munmap(stack, PAGE_SIZE) < 0)
+ panic("check_ptrace : munmap failed, errno = %d", errno);
return ret;
}

@@ -227,11 +234,12 @@

static void __init check_sysemu(void)
{
+ void *stack;
int pid, syscall, n, status, count=0;

printk("Checking syscall emulation patch for ptrace...");
sysemu_supported = 0;
- pid = start_ptraced_child();
+ pid = start_ptraced_child(&stack);

if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0)
goto fail;
@@ -249,7 +257,7 @@
panic("check_sysemu : failed to modify system "
"call return, errno = %d", errno);

- if (stop_ptraced_child(pid, 0, 0) < 0)
+ if (stop_ptraced_child(pid, stack, 0, 0) < 0)
goto fail_stopped;

sysemu_supported = 1;
@@ -257,7 +265,7 @@
set_using_sysemu(!force_sysemu_disabled);

printk("Checking advanced syscall emulation patch for ptrace...");
- pid = start_ptraced_child();
+ pid = start_ptraced_child(&stack);
while(1){
count++;
if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0)
@@ -282,7 +290,7 @@
break;
}
}
- if (stop_ptraced_child(pid, 0, 0) < 0)
+ if (stop_ptraced_child(pid, stack, 0, 0) < 0)
goto fail_stopped;

sysemu_supported = 2;
@@ -293,17 +301,18 @@
return;

fail:
- stop_ptraced_child(pid, 1, 0);
+ stop_ptraced_child(pid, stack, 1, 0);
fail_stopped:
printk("missing\n");
}

void __init check_ptrace(void)
{
+ void *stack;
int pid, syscall, n, status;

printk("Checking that ptrace can change system call numbers...");
- pid = start_ptraced_child();
+ pid = start_ptraced_child(&stack);

if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno);
@@ -330,7 +339,7 @@
break;
}
}
- stop_ptraced_child(pid, 0, 1);
+ stop_ptraced_child(pid, stack, 0, 1);
printk("OK\n");
check_sysemu();
}
@@ -362,10 +371,11 @@
static inline int check_skas3_ptrace_support(void)
{
struct ptrace_faultinfo fi;
+ void *stack;
int pid, n, ret = 1;

printf("Checking for the skas3 patch in the host...");
- pid = start_ptraced_child();
+ pid = start_ptraced_child(&stack);

n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi);
if (n < 0) {
@@ -380,7 +390,7 @@
}

init_registers(pid);
- stop_ptraced_child(pid, 1, 1);
+ stop_ptraced_child(pid, stack, 1, 1);

return(ret);

0 new messages