## Automatically generated incremental diff ## From: linux-2.0.37-pre7 ## To: linux-2.0.37-pre8 ## Robot: $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $ diff -urN linux-2.0.37-pre7/arch/i386/kernel/setup.c linux-2.0.37-pre8/arch/i386/kernel/setup.c --- linux-2.0.37-pre7/arch/i386/kernel/setup.c 2003-08-15 15:04:39.000000000 -0700 +++ linux-2.0.37-pre8/arch/i386/kernel/setup.c 2003-08-15 15:04:39.000000000 -0700 @@ -463,7 +463,7 @@ static const char *x86_ext_cap_flags[] = { "fpu","vme", "de", "pse", "tsc", "msr", "6", "mce", "cx8", "9", "10", "syscr", "12", "pge", "14", "cmov", - "fpcmov", "17", "18", "19", "20", "21", "22", "mmx", + "fpcmov", "17", "psn", "19", "20", "21", "22", "mmx", "emmx", "25", "26", "27", "28", "29", "30", "3dnow" }; diff -urN linux-2.0.37-pre7/include/asm-i386/bugs.h linux-2.0.37-pre8/include/asm-i386/bugs.h --- linux-2.0.37-pre7/include/asm-i386/bugs.h 1998-11-15 10:33:15.000000000 -0800 +++ linux-2.0.37-pre8/include/asm-i386/bugs.h 2003-08-15 15:04:39.000000000 -0700 @@ -132,6 +132,24 @@ extern int pentium_f00f_bug; extern void trap_init_f00f_bug(void); +/* + * Access to machine-specific registers (available on 586 and better only) + * Note: the rd* operations modify the parameters directly (without using + * pointer indirection), this allows gcc to optimize better + * Code from Richard Gooch's 2.2 MTRR drivers. + */ + +#define rdmsr(msr,val1,val2) \ + __asm__ __volatile__("rdmsr" \ + : "=a" (val1), "=d" (val2) \ + : "c" (msr)) + +#define wrmsr(msr,val1,val2) \ + __asm__ __volatile__("wrmsr" \ + : /* no outputs */ \ + : "c" (msr), "a" (val1), "d" (val2)) + + static void check_pentium_f00f(void) { /* @@ -145,6 +163,26 @@ } } +static void check_privacy(void) +{ + /* + * Pentium III or higher - processors with mtrrs/cpuid + */ + if(memcmp(x86_vendor_id, "GenuineIntel", 12)) + return; + if(x86_capability & (1<<18)) + { + /* + * Thanks to Phil Karn for this bit. + */ + unsigned long lo,hi; + rdmsr(0x119,lo,hi); + lo |= 0x200000; + wrmsr(0x119,lo,hi); + printk(KERN_INFO "Pentium-III serial number disabled.\n"); + } +} + /* * B step AMD K6 before B 9730xxxx have hardware bugs that can cause * misexecution of code under Linux. Owners of such processors should diff -urN linux-2.0.37-pre7/net/ipv4/ip_sockglue.c linux-2.0.37-pre8/net/ipv4/ip_sockglue.c --- linux-2.0.37-pre7/net/ipv4/ip_sockglue.c 1997-08-12 11:30:35.000000000 -0700 +++ linux-2.0.37-pre8/net/ipv4/ip_sockglue.c 2003-08-15 15:04:39.000000000 -0700 @@ -455,9 +455,6 @@ int ip_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen) { int val,err; -#ifdef CONFIG_IP_MULTICAST - int len; -#endif if(level!=SOL_IP) return -EOPNOTSUPP; @@ -541,16 +538,27 @@ val=sk->ip_mc_loop; break; case IP_MULTICAST_IF: + { + struct device *dev; + struct in_addr ia; + err=verify_area(VERIFY_WRITE, optlen, sizeof(int)); if(err) return err; - len=strlen(sk->ip_mc_name); - err=verify_area(VERIFY_WRITE, optval, len); + err=verify_area(VERIFY_WRITE, optval, sizeof(ia)); if(err) return err; - put_user(len,(int *) optlen); - memcpy_tofs((void *)optval,sk->ip_mc_name, len); + + dev=dev_get(sk->ip_mc_name); + /* Someone ran off with the interface, its probably + been downed. */ + if(dev==NULL) + return -ENODEV; + ia.s_addr = dev->pa_addr; + put_user(sizeof(ia),(int *) optlen); + memcpy_tofs((void *)optval, &ia, sizeof(ia)); return 0; + } #endif default: return(-ENOPROTOOPT);