id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
188ccb5583b8f501e1d0f5ba4f056afa141694e7
Analyze and fix the following issue in the Linux kernel code: [NETLINK]: Fix use after free in netlink_recvmsg
Problem Details: When the user passes in MSG_TRUNC the skb is used after getting freed. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 7fc6b4da4f02..ac1ceadf4ed3 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1246,16 +1246,14 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock, siocb->scm = &scm; } siocb->scm->creds = *NET...
be52178b9f73969b583c6a781ca613f4e601221a
Analyze and fix the following issue in the Linux kernel code: [NET] skbuff: fix kernel-doc
Problem Details: Fix skbuff.h kernel-doc: linux-2.6.21-git4//include/linux/skbuff.h:316): No description found for parameter 'transport_header' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 253a2b9be9d6..e7367c74e1bb 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -197,7 +197,7 @@ typedef unsigned char *sk_buff_data_t; * @tstamp: Time we arrived * @dev: Device we arrived on/are leaving by * @iif: ifindex o...
fbb3fcba72ff52ee3d9990c9dec0c95cd9d0ce17
Analyze and fix the following issue in the Linux kernel code: [AFS]: Fix use of __exit functions from __init path
Problem Details: Fix use of __exit functions from __init path. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/fs/afs/callback.c b/fs/afs/callback.c index 639399f0ab6f..9bdbf36a9aa9 100644 --- a/fs/afs/callback.c +++ b/fs/afs/callback.c @@ -468,7 +468,7 @@ int __init afs_callback_update_init(void) /* * shut down the callback update process */ -void __exit afs_callback_update_kill(void) +void afs_callba...
80c72fe415698049a477314ac82790c1af0fa7e3
Analyze and fix the following issue in the Linux kernel code: [AFS/AF_RXRPC]: Miscellaneous fixes.
Problem Details: Make miscellaneous fixes to AFS and AF_RXRPC: (*) Make AF_RXRPC select KEYS rather than RXKAD or AFS_FS in Kconfig. (*) Don't use FS_BINARY_MOUNTDATA. (*) Remove a done 'TODO' item in a comemnt on afs_get_sb(). (*) Don't pass a void * as the page pointer argument of kmap_atomic() as this b...
```diff diff --git a/fs/Kconfig b/fs/Kconfig index a42f767dcdd5..e33c08924572 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -2020,7 +2020,6 @@ config AFS_FS tristate "Andrew File System support (AFS) (EXPERIMENTAL)" depends on INET && EXPERIMENTAL select AF_RXRPC - select KEYS help If you say Y here, you will...
2807696c3791d6dd1dcf20f022eaa2dc7615bc5d
Analyze and fix the following issue in the Linux kernel code: KVM: fix an if() condition
Problem Details: It might have worked in this case since PT_PRESENT_MASK is 1, but let's express this correctly. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index 32c64f682081..e8e228118de9 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -1408,7 +1408,7 @@ static void audit_mappings_page(struct kvm_vcpu *vcpu, u64 page_pte, for (i = 0; i < PT64_ENT_PER_PAGE; ++i, va += va_delta) { u64 ent = pt[i]; ...
d6c69ee9a24b307ce94e55ebfba6208a830c9ecb
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Avoid heavy ASSERT at non debug mode.
Problem Details: Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index c814394a966d..8ccf84e3fda8 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -52,11 +52,15 @@ static void kvm_mmu_audit(struct kvm_vcpu *vcpu, const char *msg) {} static int dbg = 1; #endif +#ifndef MMU_DEBUG +#define ASSERT(x) do { } while (0...
c9047f533373e934b96d19d6a3d313ca2132fbe5
Analyze and fix the following issue in the Linux kernel code: KVM: Handle guest page faults when emulating mmio
Problem Details: Usually, guest page faults are detected by the kvm page fault handler, which detects if they are shadow faults, mmio faults, pagetable faults, or normal guest page faults. However, in ceratin circumstances, we can detect a page fault much later. One of these events is the following combination: - A t...
```diff diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index ab4dbd7fa5f8..03c0ee74d757 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -1071,8 +1071,10 @@ static int emulator_write_emulated(unsigned long addr, struct kvm_vcpu *vcpu = ctxt->vcpu; gpa_t gpa = vcpu->mmu.gva_to_gpa(vc...
417726a3fbecb2092f1054bbaee87bc442b05ef3
Analyze and fix the following issue in the Linux kernel code: KVM: Handle partial pae pdptr
Problem Details: Some guests (Solaris) do not set up all four pdptrs, but leave some invalid. kvm incorrectly treated these as valid page directories, pinning the wrong pages and causing general confusion. Fix by checking the valid bit of a pae pdpte. This closes sourceforge bug 1698922. Signed-off-by: Avi Kivity <a...
```diff diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index 8bdb9ca1811c..9ff74805c7d1 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -806,10 +806,12 @@ static void mmu_free_roots(struct kvm_vcpu *vcpu) for (i = 0; i < 4; ++i) { hpa_t root = vcpu->mmu.pae_root[i]; - ASSERT(VALID_PAGE(root)); - ...
d917a6b92d0d1e4e2b98e86c584bc9e643cd5117
Analyze and fix the following issue in the Linux kernel code: KVM: Initialize cr0 to indicate an fpu is present
Problem Details: Solaris panics if it sees a cpu with no fpu, and it seems to rely on this bit. Closes sourceforge bug 1698920. Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index b065c4991568..0b30631585bd 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -2332,6 +2332,7 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n) vcpu->host_fx_image = (char*)ALIGN((hva_t)vcpu->fx_buf, FX_I...
3964994bb5ba85a3d8b54ae618f7be1cecce916d
Analyze and fix the following issue in the Linux kernel code: KVM: Fix overflow bug in overflow detection code
Problem Details: The expression sp - 6 < sp where sp is a u16 is undefined in C since 'sp - 6' is promoted to int, and signed overflow is undefined in C. gcc 4.2 actually warns about it. Replace with a simpler test. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 61a611691e50..8c0115b54802 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -1182,7 +1182,7 @@ static void inject_rmode_irq(struct kvm_vcpu *vcpu, int irq) u16 sp = vmcs_readl(GUEST_RSP); u32 ss_limit = vmcs_read32(GUEST_SS_LIMIT); - if (s...
df513e2cdd099822ed32cbc20aaf4ff310372202
Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: fix bit string operations operand size
Problem Details: On x86, bit operations operate on a string of bits that can reside in multiple words. For example, 'btsl %eax, (blah)' will touch the word at blah+4 if %eax is between 32 and 63. The x86 emulator compensates for that by advancing the operand address by (bit offset / BITS_PER_LONG) and truncating the ...
```diff diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 7513cddb929f..bcf872bdaf74 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c @@ -833,8 +833,9 @@ done_prefixes: dst.ptr = (unsigned long *)cr2; dst.bytes = (d & ByteOp) ? 1 : op_bytes; if (d & BitOp) { - dst...
afeb1f14c5478560262b37431726eb0eb1a42e9e
Analyze and fix the following issue in the Linux kernel code: KVM: Remove debug message
Problem Details: No longer interesting. Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 578dff5424e3..b64b7b792e84 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -1131,7 +1131,6 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu) vcpu->guest_msrs[j] = vcpu->host_msrs[j]; ++vcpu->nmsrs; } - printk(KERN_DEBUG "kvm: msrs: %d\...
d28c6cfbbc5e2d4fccfe6d733995ed5971ca87f6
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Fix hugepage pdes mapping same physical address with different access
Problem Details: The kvm mmu keeps a shadow page for hugepage pdes; if several such pdes map the same physical address, they share the same shadow page. This is a fairly common case (kernel mappings on i386 nonpae Linux, for example). However, if the two pdes map the same memory but with different permissions, kvm wi...
```diff diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 7361c45d70c9..f5e343cb06b0 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -109,6 +109,7 @@ struct kvm_pte_chain { * bits 4:7 - page table level for this shadow (1-4) * bits 8:9 - page table quadrant for 2-level guests * bit 16 - "...
038881c8bec0e9a796d1782c56e29e7c2456626d
Analyze and fix the following issue in the Linux kernel code: KVM: Hack real-mode segments on vmx from KVM_SET_SREGS
Problem Details: As usual, we need to mangle segment registers when emulating real mode as vm86 has specific constraints. We special case the reset segment base, and set the "access rights" (or descriptor flags) to vm86 comaptible values. This fixes reboot on vmx. Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 027a9625ef90..578dff5424e3 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -864,7 +864,14 @@ static void vmx_set_segment(struct kvm_vcpu *vcpu, vmcs_writel(sf->base, var->base); vmcs_write32(sf->limit, var->limit); vmcs_write16(sf->selecto...
46fc1477887c41c8e900f2c95485e222b9a54822
Analyze and fix the following issue in the Linux kernel code: KVM: Do not communicate to userspace through cpu registers during PIO
Problem Details: Currently when passing the a PIO emulation request to userspace, we rely on userspace updating %rax (on 'in' instructions) and %rsi/%rdi/%rcx (on string instructions). This (a) requires two extra ioctls for getting and setting the registers and (b) is unfriendly to non-x86 archs, when they get kvm por...
```diff diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 901b8d917b55..59cbc5b1d905 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -274,6 +274,7 @@ struct kvm_vcpu { int mmio_size; unsigned char mmio_data[8]; gpa_t mmio_phys_addr; + int pio_pending; struct { int active; diff --git a/driv...
1ea252afcd4b264b71d9c3f55358ff5ba4c04f1b
Analyze and fix the following issue in the Linux kernel code: KVM: Fix bogus sign extension in mmu mapping audit
Problem Details: When auditing a 32-bit guest on a 64-bit host, sign extension of the page table directory pointer table index caused bogus addresses to be shown on audit errors. Fix by declaring the index unsigned. Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index cab26f301eab..2d905770fd88 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -1360,7 +1360,7 @@ static void audit_mappings_page(struct kvm_vcpu *vcpu, u64 page_pte, static void audit_mappings(struct kvm_vcpu *vcpu) { - int i; + unsigned i; ...
9b22bf578332d3e326c349bc8a8789af3d952435
Analyze and fix the following issue in the Linux kernel code: KVM: Fix guest register corruption on paravirt hypercall
Problem Details: The hypercall code mixes up the ->cache_regs() and ->decache_regs() callbacks, resulting in guest register corruption. Signed-off-by: Dor Laor <dor.laor@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index dc7a8c78cbf9..ff7c836ff001 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -1177,7 +1177,7 @@ int kvm_hypercall(struct kvm_vcpu *vcpu, struct kvm_run *run) { unsigned long nr, a0, a1, a2, a3, a4, a5, ret; - kvm_arch_ops-...
4ee1fc8e554593061a71d6af7c94f31764b87606
Analyze and fix the following issue in the Linux kernel code: Input: drivers/usb/input - fix sparse warnings (signedness)
Problem Details: Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/usb/input/acecad.c b/drivers/usb/input/acecad.c index be8e9243c062..dd2310458c46 100644 --- a/drivers/usb/input/acecad.c +++ b/drivers/usb/input/acecad.c @@ -54,7 +54,7 @@ struct usb_acecad { struct input_dev *input; struct urb *irq; - signed char *data; + unsigned char *data; dma_a...
ce305b6a0815cae4288e77723f80fbc97f651f9a
Analyze and fix the following issue in the Linux kernel code: Input: evdev - fix some sparse warnings (signedness, shadowing)
Problem Details: Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 6cff8096d56a..0b45d475a1c6 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -512,7 +512,7 @@ static long evdev_ioctl_handler(struct file *file, unsigned int cmd, if ((_IOC_NR(cmd) & ~EV_MAX) == _IOC_NR(EVIOCGBIT(0,0))) { ...
78167236e23bb3c80d2b35b693e578a6e56b1171
Analyze and fix the following issue in the Linux kernel code: Input: drivers/joystick - fix various sparse warnings
Problem Details: Fix various issues pointed by sparse: - module_param_array_named() takes unsigned int as number of parameters argument - shadowing of global variables is not healthy. I think there was once a bug in db9 caused by it. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index 1c1afb5d4684..bdd157c1ebf8 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c @@ -53,7 +53,7 @@ MODULE_LICENSE("GPL"); #define ANALOG_PORTS 16 static char *js[ANALOG_PORTS]; -static int js_n...
796e5661f6b6be1600b3ab47c61ce61cf3e7a353
Analyze and fix the following issue in the Linux kernel code: [CIFS] Change semaphore to mutex for cifs lock_sem
Problem Details: Originally at http://lkml.org/lkml/2006/9/2/86 The recent change to "allow Windows blocking locks to be cancelled via a CANCEL_LOCK call" introduced a new semaphore in struct cifsFileInfo, lock_sem. However, semaphores used as mutexes are deprecated these days, and there's no reason to add a new one ...
```diff diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index e4de8eba4780..23655de2f4a4 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -311,7 +311,7 @@ struct cifsFileInfo { /* lock scope id (0 if none) */ struct file * pfile; /* needed for writepage */ struct inode * pInode; /* needed for oplo...
0b2365f826f40d6e966365299d4e9dcc7ef4e93f
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix oops in reset_cifs_unix_caps on reconnect
Problem Details: Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 1f4bc7181701..cf40e245fcf4 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1670,7 +1670,7 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo * tcon, /* We might be setting the path sep back to a different form if we are reconnectin...
c0affe9db42bf85f4a606b3262c35ec59a5d3788
Analyze and fix the following issue in the Linux kernel code: pci-quirks: disable MSI on RS400-200 and RS480
Problem Details: MSI doesn't work on RS400-200 and RS480 requiring pci=nomsi kernel boot parameter for ahci to work. This patch disables MSI on those chips. http://thread.gmane.org/gmane.linux.ide/17820 http://thread.gmane.org/gmane.linux.ide/17516 https://bugzilla.novell.com/show_bug.cgi?id=263893 Signed-off-...
```diff diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 3411483240cd..147d86f8edbf 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1648,6 +1648,8 @@ static void __devinit quirk_disable_msi(struct pci_dev *dev) } } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRID...
03555d591d2c8ee9291db171c0d21d3c9cab04d9
Analyze and fix the following issue in the Linux kernel code: PCI: ZT5550 CPCI Hotplug driver fix
Problem Details: cc: Philip Guo <pg@cs.stanford.edu> Here's a small patch against the current git tree for the ZT5550 CPCI hotplug driver to fix an issue with port freeing that Philip Guo found. Signed-off-by: Scott Murray <scottm@somanetworks.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>...
```diff diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c index 1c12e9171097..41f6a8d79c81 100644 --- a/drivers/pci/hotplug/cpcihp_zt5550.c +++ b/drivers/pci/hotplug/cpcihp_zt5550.c @@ -296,13 +296,17 @@ static struct pci_driver zt5550_hc_driver = { static int __init zt5550_init(vo...
da65944be2441191539f50ce71cd1f8030699be1
Analyze and fix the following issue in the Linux kernel code: PCI: rpaphp: Document is_php_dn()
Problem Details: Fix up the documentation: the rpaphp_add_slot() does not actually handle embedded slots: in fact, it ignores them. Fix the flow of control in the routine that checks for embedded slots. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen C...
```diff diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 75113d9e84ee..aa8d9a60d0a6 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c @@ -262,6 +262,14 @@ static int is_php_type(char *drc_type) return 1; } +/** + * is_php_dn() - return 1 ...
307ff12e35526cfab9f09cafcb17239286e6eb85
Analyze and fix the following issue in the Linux kernel code: PCI: rpaphp: remove print_slot_pci_funcs()
Problem Details: The debug function print_slot_pci_funcs() is a large wrapper around two debug print statements. Just invoke these directly. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: G...
```diff diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c index 6417b7074ed4..6271be8b155e 100644 --- a/drivers/pci/hotplug/rpaphp_pci.c +++ b/drivers/pci/hotplug/rpaphp_pci.c @@ -64,21 +64,6 @@ int rpaphp_get_sensor_state(struct slot *slot, int *state) return rc; } -static void prin...
517d5a0417e19101eaa769039d1921d626ee546c
Analyze and fix the following issue in the Linux kernel code: PCI: rpaphp: remove a function that does nothing but wrap debug printks
Problem Details: Remove a stove-pipe-- a function that is called from only one place, does nothing but wraps another function with debug printk's. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off...
```diff diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c index a669ba3f29c9..881e8073c807 100644 --- a/drivers/pci/hotplug/rpaphp_pci.c +++ b/drivers/pci/hotplug/rpaphp_pci.c @@ -116,23 +116,6 @@ static void print_slot_pci_funcs(struct pci_bus *bus) return; } -static int setup_pci_h...
5fd39c35a016150e93b68c472a04b2d4b5574a2b
Analyze and fix the following issue in the Linux kernel code: PCI: rpaphp: Fix a memleak; slot->location string was never freed
Problem Details: Fix a memleak; the slot->location string was never freed. Fix some whitespace and overlong-line probelms while we're here. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Gre...
```diff diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c index dd1e275a82ce..865b0b7ef20c 100644 --- a/drivers/pci/hotplug/rpaphp_slot.c +++ b/drivers/pci/hotplug/rpaphp_slot.c @@ -56,7 +56,6 @@ static struct hotplug_slot_attribute php_attr_location = { static void rpaphp_release_slot...
fa1891596ca252e48e8803738fd8ead5b3082217
Analyze and fix the following issue in the Linux kernel code: PCI: rpaphp: Remove global num_slots variable
Problem Details: Cleanup cruft: remove the global "num_slots" variable; although scattered across multiple files, it is used only once, in a debug statement. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com...
```diff diff --git a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h index 2e7accf0f734..2ccbe8d4229d 100644 --- a/drivers/pci/hotplug/rpaphp.h +++ b/drivers/pci/hotplug/rpaphp.h @@ -83,7 +83,6 @@ struct slot { extern struct hotplug_slot_ops rpaphp_hotplug_slot_ops; extern struct list_head rpaphp_slot_h...
bf8cbae47559170d2f2947dd547492714f195dd3
Analyze and fix the following issue in the Linux kernel code: PCI: rpaphp: Cleanup flow of control for rpaphp_add_slot
Problem Details: Cleanup the flow of control for rpaphp_add_slot(), so as to make it easier to read. The ext patch will fix a bug in this same code. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-...
```diff diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 71a2cb8baa4a..f6c05f3621ca 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c @@ -299,32 +299,32 @@ int rpaphp_add_slot(struct device_node *dn) const int *indexes, *names, *types, *powe...
f14e3136509e3825a83f6689cb709f41dfacea47
Analyze and fix the following issue in the Linux kernel code: PCI: add debug information to resource collision message
Problem Details: Add more information to PCI resource collision message to help with debugging. Signed-off-by: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c index 43005f044424..bcd2f94b732c 100644 --- a/arch/i386/pci/i386.c +++ b/arch/i386/pci/i386.c @@ -246,8 +246,8 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask) continue; if (!r->start && r->end) { printk(KERN_ERR "PCI: Device %s n...
00ba16ab2658afe11d4fdcaf16a331292c44bee6
Analyze and fix the following issue in the Linux kernel code: MSI: Simplify BUG() handling in msi_remove_pci_irq_vectors() part 2
Problem Details: Although it might be nice to do a printk before BUG'ing, it's really not necessary, and it complicates the code. The behaviour has changed slightly, in that before we set a flag if the irq had an action, and continued freeing the other irqs. But as I see it that's all irrelevant because we end up BUG'...
```diff diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 2a119f8d0dc6..91fed543fc84 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -723,27 +723,21 @@ void msi_remove_pci_irq_vectors(struct pci_dev* dev) msi_free_irq(dev, dev->first_msi_irq); } if (dev->msix_enabled) { - int irq, head, tail = ...
c31af3987020eeb1facf64d702dcf39e6c7382e6
Analyze and fix the following issue in the Linux kernel code: MSI: Simplify BUG() handling in msi_remove_pci_irq_vectors() part 1
Problem Details: Although it might be nice to do a printk before BUG'ing, it's really not necessary, and it complicates the code. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index db452319be90..2a119f8d0dc6 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -719,13 +719,8 @@ void msi_remove_pci_irq_vectors(struct pci_dev* dev) return; if (dev->msi_enabled) { - if (irq_has_action(dev->first_msi_irq)) { - printk(KER...
54bc6c0b0edd164fc2ea85b3964736c182f6bd5d
Analyze and fix the following issue in the Linux kernel code: MSI: Simplify BUG() handling in pci_disable_msix()
Problem Details: Although it might be nice to do a printk before BUG'ing, it's really not necessary, and it complicates the code. The behaviour has changed slightly, in that before we set a flag if the irq had an action, and continued freeing the other irqs. But as I see it that's all irrelevant because we end up BUG'...
```diff diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 9213c57cd968..db452319be90 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -676,7 +676,7 @@ int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec) void pci_disable_msix(struct pci_dev* dev) { - int irq, head, tail = 0...
e387b9eefe89a23245f2446f947529cce5d6db35
Analyze and fix the following issue in the Linux kernel code: MSI: Simplify BUG() handling in pci_disable_msi()
Problem Details: Although it might be nice to do a printk before BUG'ing, it's really not necessary, and it complicates the code. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index a4ef93ea4c54..9213c57cd968 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -572,18 +572,15 @@ void pci_disable_msi(struct pci_dev* dev) if (!entry || !entry->dev || entry->msi_attrib.type != PCI_CAP_ID_MSI) { return; } - if (irq_has_actio...
54eee4c5bf553ad54ba200d00487b61eb6b155f6
Analyze and fix the following issue in the Linux kernel code: PCI Documentation: power/pci.txt fix copy/paste error
Problem Details: Correct function name copy-paste error. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/Documentation/power/pci.txt b/Documentation/power/pci.txt index b6a3cbf7e846..e00b099a4b86 100644 --- a/Documentation/power/pci.txt +++ b/Documentation/power/pci.txt @@ -203,7 +203,7 @@ resume Usage: -if (dev->driver && dev->driver->suspend) +if (dev->driver && dev->driver->resume) dev->driv...
40ee9e9f8d52d85f2446bbdda7823a3f1de62f3f
Analyze and fix the following issue in the Linux kernel code: PCI: fix sysfs rom file creation for BIOS ROM shadows
Problem Details: At one time, if a BIOS ROM shadow was detected for the boot video device (stored at offset 0xc0000), we'd set a special resource flag, IORESOURCE_ROM_SHADOW, so that the sysfs ROM file code could handle it properly. That broke along the way somewhere though, so current kernels will be missing 'rom' fi...
```diff diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c index 8053b17ab647..b62eafb997bc 100644 --- a/arch/i386/pci/fixup.c +++ b/arch/i386/pci/fixup.c @@ -354,7 +354,7 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev) printk(KERN_DEBUG "Boot video device is %s\n", pci_name(pdev)); } } -DE...
8d7d86e9bd377e5779bf3c8da03b27d823c039b4
Analyze and fix the following issue in the Linux kernel code: PCI: kernel-doc fix
Problem Details: Warning(linux-2621-rc3g7/drivers/pci/pci.c:1283): No description found for parameter 'dev' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 2086cd1b5e0e..7bd8a725bea2 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1323,7 +1323,7 @@ pci_intx(struct pci_dev *pdev, int enable) /** * pci_msi_off - disables any msi or msix capabilities - * @pdev: the PCI device to operate on + * @...
e325e1f0783382298141c74737712637943c6063
Analyze and fix the following issue in the Linux kernel code: PCI: fix multiple definition of `queue_pushbutton_work'
Problem Details: Fix duplicate names in shpchp and pciehp. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 74d0bf62e649..ccc57627201e 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h @@ -158,7 +158,7 @@ extern u8 pciehp_handle_presence_change(u8 hp_slot, struct controller *ctrl); extern u8 pciehp_handle_power_...
988cbb15e00e6f924d052874b40c6a5447f9fdd7
Analyze and fix the following issue in the Linux kernel code: PCI: Flush MSI-X table writes
Problem Details: This patch fixes a kernel bug which is triggered when using the irqbalance daemon with MSI-X hardware. Because both MSI-X interrupt messages and MSI-X table writes are posted, it's possible for them to cross while in-flight. This results in interrupts being received long after the kernel thinks they'...
```diff diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 435c1958a7b7..a4ef93ea4c54 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -68,6 +68,29 @@ static void msix_set_enable(struct pci_dev *dev, int enable) } } +static void msix_flush_writes(unsigned int irq) +{ + struct msi_desc *entry; + + en...
2609e7b9bebfd433254c02538ba803dc516ff674
Analyze and fix the following issue in the Linux kernel code: sysfs: printk format warning
Problem Details: Fix sysfs printk format warning: fs/sysfs/bin.c:62: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c index 8ea2a51ce883..d3b9f5f07db1 100644 --- a/fs/sysfs/bin.c +++ b/fs/sysfs/bin.c @@ -59,7 +59,7 @@ read(struct file * file, char __user * userbuf, size_t count, loff_t * off) if (copy_to_user(userbuf, buffer, count)) return -EFAULT; - pr_debug("offs = %lld, *...
3265b54556b2d8ed4e9612b08edb592b60205c40
Analyze and fix the following issue in the Linux kernel code: DOC: Fix wrong identifier name in Documentation/driver-model/devres.txt
Problem Details: Above and below we talk about my_midlayer_create_something, I assume that is also meant here. Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index 5163b85308f5..6c8d8f27db34 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt @@ -182,7 +182,7 @@ For example, you can do something like the following. ... - devres_...
dc4c15d44b2b43279b2667baa7645c65c2ff960e
Analyze and fix the following issue in the Linux kernel code: platform: reorder platform_device_del
Problem Details: In platform_device_del(), we currently delete the device resources first, then we delete the device itself. This causes a (minor) bug to occur when one unregisters a platform device before unregistering its platform driver, and the driver is requesting (in .probe()) and releasing (in .remove()) a resou...
```diff diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 30480f6f2af2..17b5ece8f82c 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -292,20 +292,22 @@ EXPORT_SYMBOL_GPL(platform_device_add); * @pdev: platform device we're removing * * Note that this function will also rel...
c7308c81a8220ab68eebfadde37db881a2800064
Analyze and fix the following issue in the Linux kernel code: Driver core: fix show_uevent from taking up way too much stack
Problem Details: Declaring an array of PAGE_SIZE does bad things for people running with 4k stacks... Thanks to Tilman Schmidt for tracking this down. Cc: Tilman Schmidt <tilman@imap.cc> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index 8aa090da1cd7..59d9816c332e 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -252,7 +252,7 @@ static ssize_t show_uevent(struct device *dev, struct device_attribute *attr, struct kobject *top_kobj; struct kset *kset; char *envp[32]; ...
5fdf1e677127cb460c38733b9586b772d657be43
Analyze and fix the following issue in the Linux kernel code: ocfs2: fix sparse warnings in fs/ocfs2/cluster
Problem Details: Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index eba282da500e..979113479c66 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -438,7 +438,7 @@ static inline void o2hb_prepare_block(struct o2hb_region *reg, hb_block)); mlog(ML_HB_BIO, "o...
a7d25539fdd43fe962a0654542ba96e889ac62b5
Analyze and fix the following issue in the Linux kernel code: ocfs2: fix sparse warnings in fs/ocfs2/dlm
Problem Details: Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index 241cad342a48..2fd8bded38f3 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c @@ -312,8 +312,8 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data, past->type != DLM_BAST) { mlog(ML_ERROR, "Unknown ast type...
1ca1a111b1e6be843c9ce5245dcd570312998d94
Analyze and fix the following issue in the Linux kernel code: ocfs2: fix sparse warnings in fs/ocfs2
Problem Details: None of these are actually harmful, but the noise makes looking for real problems difficult. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index a0c8667caa72..19712a7d145f 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -2869,7 +2869,7 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb, tl = &tl_copy->id2.i_dealloc; num_recs = le16_to_cpu(tl->tl_used); mlog(0, "cleanup...
35b7e476107e3d54f03384e0f2fa3dfd68933353
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix page cache memory leak
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/bit-radix.c b/fs/btrfs/bit-radix.c index 9fc42e99c7df..e9ace32d7bae 100644 --- a/fs/btrfs/bit-radix.c +++ b/fs/btrfs/bit-radix.c @@ -22,9 +22,7 @@ int set_radix_bit(struct radix_tree_root *radix, unsigned long bit) return -ENOMEM; memset(bits + 1, 0, BIT_ARRAY_BYTES - sizeof(unsigne...
39f5fb30351efa9d6f6e22754c222354fa2b7e1e
Analyze and fix the following issue in the Linux kernel code: kconfig: fix path to modules.txt in Kconfig help
Problem Details: Documentation/modules.txt doesn't exist, but Documentation/kbuild/modules.txt does. Signed-off-by: Alexander E. Patrakov Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig index 690c94236d7f..ff642f8fbee7 100644 --- a/drivers/mtd/devices/Kconfig +++ b/drivers/mtd/devices/Kconfig @@ -49,8 +49,8 @@ config MTD_MS02NV If you want to compile this driver as a module ( = code which can be inserted in and re...
0979f378e4f8bd8896bd63179d9a9dce501616dc
Analyze and fix the following issue in the Linux kernel code: usr/Kconfig: fix typo
Problem Details: Signed-off-by: Alexander E. Patrakov Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/usr/Kconfig b/usr/Kconfig index 07727f3c7cea..86cecb59dd07 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -17,7 +17,7 @@ config INITRAMFS_SOURCE When multiple directories and files are specified then the initramfs image will be the aggregate of all of them. - See <file:Documentation/earl...
6e5a5420b7cdac356efbdc7832e90a805670b889
Analyze and fix the following issue in the Linux kernel code: kbuild: clarify the creation of the LOCALVERSION_AUTO string.
Problem Details: Clarify the creation of the LOCALVERSION_AUTO string during kernel configuration, and fix a couple typoes while we're there. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/init/Kconfig b/init/Kconfig index b170aa1d43bd..29d9e47ee0da 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -80,16 +80,20 @@ config LOCALVERSION_AUTO default y help This will try to automatically determine if the current tree is a - release tree by looking for git tags that - belong to...
9ae57004ca9c38ff8292c38a475c98b0ebbc0d74
Analyze and fix the following issue in the Linux kernel code: kconfig: refer to qt3 if we cannot find qt libraries
Problem Details: We do not support qt4 (yet) so the simple fix was to warn that qt3 are missing. The better fix would have been to implment qt4 support but that has failed so far. This solves http://bugzilla.kernel.org/show_bug.cgi?id=8277 Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 2e421bd5675f..fb2bb3099dd9 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -184,8 +184,8 @@ $(obj)/.tmp_qtcheck: done; \ if [ -z "$$dir" ]; then \ echo "*"; \ - echo "* Unable to find the QT installa...
e711db3edfe7c0e32b6430e7d041905f856aa79a
Analyze and fix the following issue in the Linux kernel code: kbuild: fix make mrproper for Documentation/DocBook/man
Problem Details: "make mandocs" generate > 2000 files in Documentation/DocBook/man and this caused kbuild to barf out during make mrproper like this: make -f scripts/Makefile.clean obj=Documentation/DocBook make -f scripts/Makefile.clean obj=Documentation/DocBook/man/ make[2]: execvp: /bin/sh: Argument list too long m...
```diff diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 867608ab3ca0..960f4025ee86 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -152,6 +152,7 @@ quiet_cmd_db2man = MAN $@ @(which xmlto > /dev/null 2>&1) || \ (echo "*** You need to instal...
b72e53f8bbbec8421316220291d8a8002a5562ba
Analyze and fix the following issue in the Linux kernel code: kconfig.debug: clarify CONFIG_DEBUG_INFO help text
Problem Details: The following patch adds some extra clarification to the CONFIG_DEBUG_INFO Kconfig help text. The current text is mostly a recursive definition and doesn't really say much of anything. When I first read this I thought it was going to enable extra verbosity in debug messages or something, but it is on...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 79afd00bbe5f..bdbf3fe14de6 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -333,6 +333,9 @@ config DEBUG_INFO help If you say Y here the resulting kernel image will include debugging info resulting in a larger kernel image. + ...
ded2e1640ffaee26c054a42e5210c1086fb1d8eb
Analyze and fix the following issue in the Linux kernel code: kbuild: small documentation fix in Documentation/kbuild/modules.txt
Problem Details: The Makefile fragment in Documentation/kbuild/modules.txt looks to be missing some braces. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt index 769ee05ee4d1..1d247d59ad56 100644 --- a/Documentation/kbuild/modules.txt +++ b/Documentation/kbuild/modules.txt @@ -249,7 +249,7 @@ following files: --> filename: Makefile KERNELDIR := /lib/modules/`uname -r`/build a...
a61b2dfd1823506dbf1f9b046e0b09237ec1b985
Analyze and fix the following issue in the Linux kernel code: kbuild: fix segmentation fault in modpost
Problem Details: If modpost was called manually with filenames without '/' then modpost would segfault. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index e1f2b31cf34b..281abb77e033 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1345,6 +1345,7 @@ static void add_depends(struct buffer *b, struct module *mod, buf_printf(b, "__attribute__((section(\".modinfo\"))) =\n"); buf_prin...
9bf8cb9b7908383752b1842eae78269f7e16d9fb
Analyze and fix the following issue in the Linux kernel code: kbuild: fix warnings from .pci_fixup section
Problem Details: Now where we do not pass vmlinux to modpost we started to see section mismatch warnings from .pci_fixup. Refactored code a little to include these in the whitelist again. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index be0827f734c2..e1f2b31cf34b 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -592,6 +592,14 @@ static int strrcmp(const char *s, const char *sub) * atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one, *_console * ...
85bd2fddd68e757da8e1af98f857f61a3c9ce647
Analyze and fix the following issue in the Linux kernel code: kbuild: fix section mismatch check for vmlinux
Problem Details: vmlinux does not contain relocation entries which is used by the section mismatch checks. Reported by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Use the individual objects as inputs to overcome this limitation. In modpost check the .o files and skip non-ELF files. Signed-off-by: Sam Ravnborg <sam@ravnborg...
```diff diff --git a/Makefile b/Makefile index d970cb16545a..5a774cbf6bfa 100644 --- a/Makefile +++ b/Makefile @@ -603,6 +603,7 @@ vmlinux-init := $(head-y) $(init-y) vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y) vmlinux-all := $(vmlinux-init) $(vmlinux-main) vmlinux-lds := arch/$(ARCH)/kernel/vmlinux....
02b64dab5675bc08048c7f70cbb0d8a417d20dbe
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: white space fixes in i387.h
Problem Details: Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/include/asm-i386/i387.h b/include/asm-i386/i387.h index 434936c732d6..49dc8e141310 100644 --- a/include/asm-i386/i387.h +++ b/include/asm-i386/i387.h @@ -83,8 +83,8 @@ static inline void __save_init_fpu( struct task_struct *tsk ) #define __clear_fpu( tsk ) \ do { \ - if (task_thread_...
f19cccf366a07e05703c90038704a3a5ffcb0607
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix allnoconfig error in genapic_flat.c
Problem Details: Fix: In file included from include2/asm/apic.h:5, from include2/asm/smp.h:15, from linux/arch/x86_64/kernel/genapic_flat.c:18: linux/include/linux/pm.h: In function ‘call_platform_enable_wakeup’: linux/include/linux/pm.h:331: error: ‘EIO’ undeclared (first use in this...
```diff diff --git a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c index 01d3939e3a9c..ecb01eefdd27 100644 --- a/arch/x86_64/kernel/genapic_flat.c +++ b/arch/x86_64/kernel/genapic_flat.c @@ -8,6 +8,7 @@ * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and * James Cleverdon. */ +#i...
ec1180db2ca2ec8692ce101560eff9eedf561781
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Little cleanups in smpboot.c
Problem Details: - Remove #if that is always set - Fix warning Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index a768eceeac37..a4b7ad283f49 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -516,7 +516,6 @@ static void unmap_cpu_to_logical_apicid(int cpu) unmap_cpu_to_node(cpu); } -#if APIC_DEBUG static inline void _...
c5bcb5635a03da3158f121ae20ccbbf72b4fc62a
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: Use RDTSCP for synchronous get_cycles if possible
Problem Details: RDTSCP is already synchronous and doesn't need an explicit CPUID. This is a little faster and more importantly avoids VMEXITs on Hypervisors. Original patch from Joerg Roedel, but reworked by AK Also includes miscompilation fix by Eric Biederman Cc: "Joerg Roedel" <joerg.roedel@amd.com> Signed-off-b...
```diff diff --git a/include/asm-i386/tsc.h b/include/asm-i386/tsc.h index 0181f9df7539..3f3c1fa000b4 100644 --- a/include/asm-i386/tsc.h +++ b/include/asm-i386/tsc.h @@ -37,6 +37,15 @@ static __always_inline cycles_t get_cycles_sync(void) unsigned long long ret; unsigned eax; + /* + * Use RDTSCP if possible; ...
4637a74cf2ac3a3696d385c8624d84de789d1bbe
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Avoid overflows during apic timer calibration
Problem Details: - Use 64bit TSC calculations to avoid handling overflow - Use 32bit unsigned arithmetic for the APIC timer. This way overflows are handled correctly. - Fix exit check of loop to account for apic timer counting down Signed-off-by: dpreed@reed.com Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index 943ec4d1bd8e..d198f7d82e5a 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c @@ -839,14 +839,15 @@ static void setup_APIC_timer(unsigned int clocks) static int __init calibrate_APIC_clock(void) { - int apic, apic_s...
8a336b0a4b6dfacc8cc5fd617ba1e1904077de2d
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Dynamically adjust machine check interval
Problem Details: Background: We've found that MCEs (specifically DRAM SBEs) tend to come in bunches, especially when we are trying really hard to stress the system out. The current MCE poller uses a static interval which does not care whether it has or has not found MCEs recently. Description: This patch makes t...
```diff diff --git a/Documentation/x86_64/machinecheck b/Documentation/x86_64/machinecheck index 068a6d9904b9..feaeaf6f6e4d 100644 --- a/Documentation/x86_64/machinecheck +++ b/Documentation/x86_64/machinecheck @@ -36,7 +36,12 @@ between all CPUs. check_interval How often to poll for corrected machine check errors...
889f21ce272e38db19c8114a7e0a5793d4590077
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix wrong comment for syscall stack layout
Problem Details: `ret_from_sys_call' label no longer exist and `syscall_exit' label was introduced instead. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index 90ffcdb69838..b1f16ee65e4d 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -15,7 +15,7 @@ * I changed all the .align's to 4 (16 byte alignment), as that's faster * on a 486. * - * Stack layout in 'ret_from_syste...
0260c196c97e48e4b821031ae55912c22113ed87
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: PARAVIRT: fix startup_ipi_hook config dependency
Problem Details: startup_ipi_hook depends on CONFIG_X86_LOCAL_APIC, so move it to the right part of the paravirt_ops initialization. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c index f99d3d78c53f..5c10f376bce1 100644 --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c @@ -292,6 +292,7 @@ struct paravirt_ops paravirt_ops = { .apic_read = native_apic_read, .setup_boot_clock = setup_boot_APIC_clock...
25c16b992c32db4bc7e085b763abd866a505ca72
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix mtrr sections
Problem Details: Fix section mismatch warnings in mtrr code. Fix line length on one source line. WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text.get_mtrr_state after 'get_mtrr_state' (at offset 0x103) WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to...
```diff diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c index 000c07e86433..5367e32e0403 100644 --- a/arch/i386/kernel/cpu/mtrr/generic.c +++ b/arch/i386/kernel/cpu/mtrr/generic.c @@ -38,7 +38,7 @@ static struct mtrr_state mtrr_state = {}; #undef MODULE_PARAM_PREFIX #define MODU...
3ebad5905609476a4ff1151a66b21d9794009961
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending
Problem Details: Note: This patch didn'nt need an update since it's initial post. Some BIOSes may modify fixed-range MTRRs in SMM, e.g. when they transition the system into ACPI mode, which is entered thru an SMI, triggered by Linux in acpi_enable(). SMIs which cause that Linux is interrupted and BIOS code is execute...
```diff diff --git a/arch/i386/power/cpu.c b/arch/i386/power/cpu.c index 2c15500f8713..998fd3ec0d68 100644 --- a/arch/i386/power/cpu.c +++ b/arch/i386/power/cpu.c @@ -21,6 +21,7 @@ unsigned long saved_context_eflags; void __save_processor_state(struct saved_context *ctxt) { + mtrr_save_fixed_ranges(NULL); kernel_...
2b1f6278d77c1f2f669346fc2bb48012b5e9495a
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: Save the MTRRs of the BSP before booting an AP
Problem Details: Applied fix by Andew Morton: http://lkml.org/lkml/2007/4/8/88 - Fix `make headers_check'. AMD and Intel x86 CPU manuals state that it is the responsibility of system software to initialize and maintain MTRR consistency across all processors in Multi-Processing Environments. Quote from page 188 of the...
```diff diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c index 0acfb6a5a220..02a2f39e5e0a 100644 --- a/arch/i386/kernel/cpu/mtrr/main.c +++ b/arch/i386/kernel/cpu/mtrr/main.c @@ -729,6 +729,17 @@ void mtrr_ap_init(void) local_irq_restore(flags); } +/** + * Save current fixed-range M...
2b3b4835c94226681c496de9446d456dcf42ed08
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: Adds mtrr_save_fixed_ranges() for use in two later patches.
Problem Details: In this current implementation which is used in other patches, mtrr_save_fixed_ranges() accepts a dummy void pointer because in the current implementation of one of these patches, this function may be called from smp_call_function_single() which requires that this function takes a void pointer argument...
```diff diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c index 68b383788882..150cf5055a3c 100644 --- a/arch/i386/kernel/cpu/mtrr/generic.c +++ b/arch/i386/kernel/cpu/mtrr/generic.c @@ -37,7 +37,7 @@ get_mtrr_var_range(unsigned int index, struct mtrr_var_range *vr) rdmsr(MTRRphysM...
c5413fbe894924ddb8aa474a4d4da52e7a6c7e0b
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Fix UP gdt bugs
Problem Details: Fixes two problems with the GDT when compiling for uniprocessor: - There's no percpu segment, so trying to load its selector into %fs fails. Use a null selector instead. - The real gdt needs to be loaded at some point. Do it in cpu_init(). Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed...
```diff diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 27e00565f5e4..794d593c47eb 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c @@ -638,6 +638,18 @@ struct pt_regs * __devinit idle_regs(struct pt_regs *regs) return regs; } +/* Current gdt points %f...
978c038ec944e4f2c940b0975c6acb433203a9be
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: cleanups to help using per-cpu variables from asm
Problem Details: This patch does a few small cleanups: - use PER_CPU_NAME to generate the names of per-cpu variables - use lea to add the per_cpu offset in PER_CPU(), because it doesn't affect condition flags - add PER_CPU_VAR which allows direct access to pre-cpu variables with the %fs: prefix on SMP. Signed...
```diff diff --git a/include/asm-i386/percpu.h b/include/asm-i386/percpu.h index c5f12f0d9c23..cdcb63db30a9 100644 --- a/include/asm-i386/percpu.h +++ b/include/asm-i386/percpu.h @@ -16,12 +16,14 @@ * PER_CPU(cpu_gdt_descr, %ebx) */ #ifdef CONFIG_SMP -#define PER_CPU(var, reg) \ - movl %fs:per_cpu__this_cpu_o...
35c7422649ee7a3d0eb4ebd32c997eeb45f81046
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: deflate stack usage in lib/inflate.c
Problem Details: inflate_fixed and huft_build together use around 2.7k of stack. When using 4k stacks, I saw stack overflows from interrupts arriving while unpacking the root initrd: do_IRQ: stack overflow: 384 [<c0106b64>] show_trace_log_lvl+0x1a/0x30 [<c01075e6>] show_trace+0x12/0x14 [<c010763f>] dump_stack+0x16...
```diff diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c index 1d65adf5691e..c00646b25f6e 100644 --- a/arch/alpha/boot/misc.c +++ b/arch/alpha/boot/misc.c @@ -98,7 +98,7 @@ extern int end; static ulg free_mem_ptr; static ulg free_mem_ptr_end; -#define HEAP_SIZE 0x2000 +#define HEAP_SIZE 0x3000 #inclu...
42c24fa22e86365055fc931d833f26165e687c19
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: PARAVIRT: Fix patch site clobbers to include return register
Problem Details: Fix a few clobbers to include the return register. The clobbers set is the set of all registers modified (or may be modified) by the code snippet, regardless of whether it was deliberate or accidental. Also, make sure that callsites which are used in contexts which don't allow clobbers actually save ...
```diff diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index e901952dff37..e07473c0d3e7 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -338,7 +338,7 @@ sysenter_past_esp: jae syscall_badsys call *sys_call_table(,%eax,4) movl %eax,PT_EAX(%esp) - DISABLE_INTERRUPTS(CLBR_EC...
1c3d99c11c47c8a1a9ed6a46555dbf6520683c52
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix x86_64 compilation with DEBUG_SIG on
Problem Details: Setting the DEBUG_SIG flag breaks compilation due to a wrong struct access. Aditionally, it raises two warnings. This is one patch to fix them all. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c index 49ec324cd141..c819625f3316 100644 --- a/arch/x86_64/kernel/signal.c +++ b/arch/x86_64/kernel/signal.c @@ -141,7 +141,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) goto badframe; #ifdef DEBUG_SIG - printk("%d sigretu...
de90c5ce832b1218042316260ff9268b00fdcba3
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Enable bank 0 on non K7 Athlon
Problem Details: As a bug workaround bank 0 on K7s is normally disabled, but no need to do that on other AMD CPUs. Cc: davej@redhat.com Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/kernel/cpu/mcheck/k7.c b/arch/i386/kernel/cpu/mcheck/k7.c index b0862af595aa..7a2472557bbb 100644 --- a/arch/i386/kernel/cpu/mcheck/k7.c +++ b/arch/i386/kernel/cpu/mcheck/k7.c @@ -82,9 +82,13 @@ void amd_mcheck_init(struct cpuinfo_x86 *c) nr_mce_banks = l & 0xff; /* Clear status for...
1dbf527c51c6c20c19869c8125cb5b87c3d09506
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Make COMPAT_VDSO runtime selectable.
Problem Details: Now that relocation of the VDSO for COMPAT_VDSO users is done at runtime rather than compile time, it is possible to enable/disable compat mode at runtime. This patch allows you to enable COMPAT_VDSO mode with "vdso=2" on the kernel command line, or via sysctl. (Switching on a running system shouldn'...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 84c3bd05c639..4287696f18dd 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1820,6 +1820,7 @@ and is between 256 and 4096 characters. It is defined in the file [USBHID] ...
0d08e0d3a97cce22ebf80b54785e00d9b94e1add
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix vmalloc_32 to really allocate <4GB on 64bit platforms
Problem Details: Ugly ifdef, but should handle all 64bit platforms that have suitable zones. On some like Altix it's probably impossible without IOMMU use to get memory <4GB this way, but they have to live with that. Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 9eef486da909..cb5aabda7046 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -431,7 +431,7 @@ void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, area->flags |= VM_VPAGES; } else { pages = kmalloc_node(array_size, - (gfp_mask & ~(__GFP_HIGHME...
bbf30a1650be396b5467f769f4fbee715f16ec36
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: fix arithmetic in comment
Problem Details: The xmm space on x86_64 is 256 bytes. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 2c1497de0b09..6a117349a5de 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h @@ -181,7 +181,7 @@ struct i387_fxsave_struct { u32 mxcsr; u32 mxcsr_mask; u32 st_space[32]; /* 8*16 bytes for each...
b92e9fac400d4ae5bc7a75c568e9844ec53ea329
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: fix amd64-agp aperture validation
Problem Details: Under CONFIG_DISCONTIGMEM, assuming that a !pfn_valid() implies all subsequent pfn-s are also invalid is wrong. Thus replace this by explicitly checking against the E820 map. AK: make e820 on x86-64 not initdata Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de> A...
```diff diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c index 31f4670ef740..829beec9247e 100644 --- a/arch/i386/kernel/e820.c +++ b/arch/i386/kernel/e820.c @@ -825,6 +825,26 @@ void __init limit_regions(unsigned long long size) print_memory_map("limit_regions endfunc"); } +/* + * This function check...
141f9cfe0a948c8fe26e5669364ee62c03ea42e8
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix "Section mismatch" compile warning
Problem Details: Fix "Section mismatch" warnings in arch/x86_64/kernel/time.c Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 91c9066a380d..0652e173813b 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c @@ -328,7 +328,7 @@ static unsigned int __init pit_calibrate_tsc(void) #define PIT_MODE 0x43 #define PIT_CH0 0x40 -static void __init __...
c8118c6c07f2edfd697aaa0b93e08c3b65a5a675
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: vsyscall_gtod_data diet and vgettimeofday() fix
Problem Details: Current vsyscall_gtod_data is large (3 or 4 cache lines dirtied at timer interrupt). We can shrink it to exactly 64 bytes (1 cache line on AMD64) Instead of copying a whole struct clocksource, we copy only needed fields. I deleted an unused field : offset_base This patch fixes one oddity in vgettime...
```diff diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index ba330f870679..dc32cef96195 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c @@ -51,13 +51,28 @@ asm("" : "=r" (v) : "0" (x)); \ ((v - VSYSCALL_FIRST_PAGE) + __pa_symbol(&__vsyscall_0)); }) +/...
272a3713bb9e302e0455c894c41180a482d2c8a3
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: fix vtime() vsyscall
Problem Details: There is a tiny probability that the return value from vtime(time_t *t) is Signed-off-by: Andi Kleen <ak@suse.de> different than the value stored in *t Using a temporary variable solves the problem and gives a faster code. 17: 48 85 ff test %rdi,%rdi 1a: 48 8b 05 00 00 00 ...
```diff diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index d14cbb3e0ebe..ba330f870679 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c @@ -156,11 +156,13 @@ int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz) * unlikely */ time_t __vs...
6fb14755a676282a4e6caa05a08c92db8e45cfff
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: tighten kernel image page access rights
Problem Details: On x86-64, kernel memory freed after init can be entirely unmapped instead of just getting 'poisoned' by overwriting with a debug pattern. On i386 and x86-64 (under CONFIG_DEBUG_RODATA), kernel text and bug table can also be write-protected. Compared to the first version, this one prevents re-creatin...
```diff diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S index 6f38f818380b..f4ec72231835 100644 --- a/arch/i386/kernel/vmlinux.lds.S +++ b/arch/i386/kernel/vmlinux.lds.S @@ -61,8 +61,6 @@ SECTIONS __stop___ex_table = .; } - RODATA - BUG_TABLE . = ALIGN(4); @@ -72,6 +70,8 @...
d01ad8dd56527be72947b4b9997bb2c05783c3ed
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: Improve handling of kernel mappings in change_page_attr
Problem Details: Fix various broken corner cases in i386 and x86-64 change_page_attr. AK: split off from tighten kernel image access rights Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c index 412ebbd8adb0..ea6b6d4a0a2a 100644 --- a/arch/i386/mm/pageattr.c +++ b/arch/i386/mm/pageattr.c @@ -142,7 +142,7 @@ __change_page_attr(struct page *page, pgprot_t prot) return -EINVAL; kpte_page = virt_to_page(kpte); if (pgprot_val(prot) ...
ae1ee11be77f51cedb6c569887dddc70c163ab6d
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Use per-cpu variables for GDT, PDA
Problem Details: Allocating PDA and GDT at boot is a pain. Using simple per-cpu variables adds happiness (although we need the GDT page-aligned for Xen, which we do in a followup patch). [akpm@linux-foundation.org: build fix] Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andi Kleen <ak@suse.de> ...
```diff diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index dcbbd0a8bfc2..2335f4464ead 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c @@ -25,8 +25,10 @@ DEFINE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr); EXPORT_PER_CPU_SYMBOL(cpu_gdt_descr); -struct i...
79e030114a8d97a1dcd593ab84fb986f8c91c536
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Allow i386 crash kernels to handle x86_64 dumps
Problem Details: The specific case I am encountering is kdump under Xen with a 64 bit hypervisor and 32 bit kernel/userspace. The dump created is 64 bit due to the hypervisor but the dump kernel is 32 bit for maximum compatibility. It's possibly less likely to be useful in a purely native scenario but I see no reason...
```diff diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index d96050728c43..523e1098ae88 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -514,7 +514,7 @@ static int __init parse_crash_elf64_headers(void) /* Do some basic Verification. */ if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || (ehdr.e_type != ...
1b523fb54977c9bb81b16c4badce581a2b455994
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: VDSO_PRELINK warning fix
Problem Details: The lguest patches somehow managed to trigger this: In file included from arch/i386/lguest/lguest.c:38: include/asm/asm-offsets.h:67:1: warning: "VDSO_PRELINK" redefined In file included from include/linux/elf.h:7, from include/linux/module.h:15, from include/linux/de...
```diff diff --git a/arch/i386/kernel/asm-offsets.c b/arch/i386/kernel/asm-offsets.c index d822792d8e3e..655cc8d4c745 100644 --- a/arch/i386/kernel/asm-offsets.c +++ b/arch/i386/kernel/asm-offsets.c @@ -97,7 +97,7 @@ void foo(void) sizeof(struct tss_struct)); DEFINE(PAGE_SIZE_asm, PAGE_SIZE); - DEFINE(VDSO_PREL...
8280c0c58e9762a9fe29d550a9db81410de77691
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix GDT's number of quadwords in comment
Problem Details: Fix comments to represent the true number of quadwords in GDT. Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Andi Kleen <ak@suse.de> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
```diff diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index 3fa7f9389afe..cb185f40c282 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S @@ -612,7 +612,7 @@ ENTRY(boot_gdt_table) .quad 0x00cf92000000ffff /* kernel 4GB data at 0x00000000 */ /* - * The Global Descriptor Table contai...
9f7290ed23b1cedf7198ef7b67f2ed256bc8553e
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: fix ia32_binfmt.c build error
Problem Details: Reorder code to avoid multiple inclusion of elf.h. #undef several symbols to avoid build errors over redefinitions. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
```diff diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 071100ea1251..185399baaf6d 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c @@ -5,6 +5,11 @@ * This tricks binfmt_elf.c into loading 32bit binaries using lots * of ugly preprocessor tricks. Ta...
5a90cf205c922707ffed2d8f87cefd942e96b0ba
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: Log reason why TSC was marked unstable
Problem Details: Change mark_tsc_unstable() so it takes a string argument, which holds the reason the TSC was marked unstable. This is then displayed the first time mark_tsc_unstable is called. This should help us better debug why the TSC was marked unstable on certain systems and allow us to make sure we're not bein...
```diff diff --git a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c index f0badfdd4e45..e77f8e1cf7aa 100644 --- a/arch/i386/kernel/cpu/cyrix.c +++ b/arch/i386/kernel/cpu/cyrix.c @@ -279,7 +279,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) */ if (vendor == PCI_VENDOR_ID_CYRIX && (...
1833d6bc72893265f22addd79cf52e6987496e0f
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: modpost apic related warning fixes
Problem Details: o Modpost generates warnings for i386 if compiled with CONFIG_RELOCATABLE=y WARNING: vmlinux - Section mismatch: reference to .init.text:find_unisys_acpi_oem_table from .text between 'acpi_madt_oem_check' (at offset 0xc0101eda) and 'enable_apic_mode' WARNING: vmlinux - Section mismatch: reference to ....
```diff diff --git a/arch/i386/mach-generic/es7000.c b/arch/i386/mach-generic/es7000.c index b8963a5a3b25..b47f951c0ec2 100644 --- a/arch/i386/mach-generic/es7000.c +++ b/arch/i386/mach-generic/es7000.c @@ -25,4 +25,45 @@ static int probe_es7000(void) return 0; } +extern void es7000_sw_apic(void); +static void __i...
184c44d2049c4db7ef6ec65794546954da2c6a0e
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: fix x86_64-mm-sched-clock-share
Problem Details: Fix for the following patch. Provide dummy cpufreq functions when CPUFREQ is not compiled in. Cc: Andi Kleen <ak@suse.de> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 0899e2cdcdd1..cb9b2ec8849c 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -32,7 +32,15 @@ * CPUFREQ NOTIFIER INTERFACE * ********************************************************...
278c0eb7f96586c02b2bfaa8e250d951919a2e6a
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: modify copy_bootdata to use virtual addresses
Problem Details: Use virtual addresses instead of physical addresses in copy bootdata. In addition fix the implementation of the old bootloader convention. Everything is at real_mode_data always. It is just that sometimes real_mode_data was relocated by setup.S to not sit at 0x90000. Signed-off-by: Eric W. Biederma...
```diff diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c index 5f197b0a330a..5c529c1e3d6c 100644 --- a/arch/x86_64/kernel/head64.c +++ b/arch/x86_64/kernel/head64.c @@ -29,25 +29,24 @@ static void __init clear_bss(void) } #define NEW_CL_POINTER 0x228 /* Relative to real mode data */ -#define ...
93fd755e47d7b00fa5470199cfb14cbd9ded0284
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix early printk to use standard ISA mapping
Problem Details: Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c index 47b6d90349da..b7aa9abe1c6a 100644 --- a/arch/x86_64/kernel/early_printk.c +++ b/arch/x86_64/kernel/early_printk.c @@ -11,11 +11,10 @@ #ifdef __i386__ #include <asm/setup.h> -#define VGABASE (__ISA_IO_base + 0xb8000) #...
67dcbb6bc6537aea92a2466bfc75f015b00e465e
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Clean up the early boot page table
Problem Details: - Merge physmem_pgt and ident_pgt, removing physmem_pgt. The merge is broken as soon as mm/init.c:init_memory_mapping is run. - As physmem_pgt is gone don't export it in pgtable.h. - Use defines from pgtable.h for page permissions. - Fix the physical memory identity mapping so it is at the correct ...
```diff diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 118c6088198a..23b45e79a27c 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S @@ -13,6 +13,7 @@ #include <linux/init.h> #include <asm/desc.h> #include <asm/segment.h> +#include <asm/pgtable.h> #include <asm/page.h> ...
dafe41ee3a9389c08c91cdfd8670295f20f89e04
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Kill temp boot pmds
Problem Details: Early in the boot process we need the ability to set up temporary mappings, before our normal mechanisms are initialized. Currently this is used to map pages that are part of the page tables we are building and pages during the dmi scan. The core problem is that we are using the user portion of the p...
```diff diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 598a4d0351fc..118c6088198a 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S @@ -288,9 +288,6 @@ NEXT_PAGE(level2_ident_pgt) .quad i << 21 | 0x083 i = i + 1 .endr - /* Temporary mappings for the super early alloc...
9d291e787b2b71d1b57e5fbb24ba9c70e748ed84
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Assembly safe page.h and pgtable.h
Problem Details: This patch makes pgtable.h and page.h safe to include in assembly files like head.S. Allowing us to use symbolic constants instead of hard coded numbers when refering to the page tables. This patch copies asm-sparc64/const.h to asm-x86_64 to get a definition of _AC() a very convinient macro that allo...
```diff diff --git a/include/asm-x86_64/Kbuild b/include/asm-x86_64/Kbuild index ebd7117782a6..242296ede3dd 100644 --- a/include/asm-x86_64/Kbuild +++ b/include/asm-x86_64/Kbuild @@ -18,3 +18,4 @@ header-y += vsyscall32.h unifdef-y += mce.h unifdef-y += mtrr.h unifdef-y += vsyscall.h +unifdef-y += const.h diff --git...
6b37f5a20c0e5c334c010a587058354215433e92
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: fix cpu MHz reporting on constant_tsc cpus
Problem Details: This patch fixes the reporting of cpu_mhz in /proc/cpuinfo on CPUs with a constant TSC rate and a kernel with disabled cpufreq. Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Andi Kleen <ak@suse.de> arch/x86_64/kernel/apic.c ...
```diff diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index bd3e45d47c37..3421f21b6c70 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c @@ -843,7 +843,7 @@ static int __init calibrate_APIC_clock(void) } while ((tsc - tsc_start) < TICK_COUNT && (apic - apic_start) < TIC...
b0b1ff653a0ce88dc9d5cec4e67c9c2be0ba03ef
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Fix usage of -mtune when X86_GENERIC=y or CONFIG_MCORE2=y
Problem Details: Hi! I sent this simple patch to lkml about two weeks ago and also cc'ed to Linus, but seems that the patch got ignored. I decided to write to you, because you have modified the relevant file most recently. Below is a copy of the mail that is also available at <http://lkml.org/lkml/2007/2/28/230>. Si...
```diff diff --git a/arch/i386/Makefile.cpu b/arch/i386/Makefile.cpu index e0ada4e9e137..e372b584e919 100644 --- a/arch/i386/Makefile.cpu +++ b/arch/i386/Makefile.cpu @@ -4,9 +4,9 @@ #-mtune exists since gcc 3.4 HAS_MTUNE := $(call cc-option-yn, -mtune=i386) ifeq ($(HAS_MTUNE),y) -tune = $(call cc-option,-mtune=$(1...