id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
bc5c6c043d8381676339fb3da59cc4cc5921d368
Analyze and fix the following issue in the Linux kernel code: ftrace/documentation: fix typo in function grapher name
Problem Details: The function graph tracer is called just "function_graph" (no trailing "_tracer" needed). Signed-off-by: Mike Frysinger <vapier@gentoo.org> LKML-Reference: <1244623722-6325-1-git-send-email-vapier@gentoo.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
```diff diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index fd9a3e693813..5ad2ded8aa63 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt @@ -179,7 +179,7 @@ Here is the list of current tracers that may be configured. Function call tracer to trace all ker...
7df336ec1266dccbb253bac52c529d3dcc7c22d0
Analyze and fix the following issue in the Linux kernel code: Fix btrfs when ACLs are configured out
Problem Details: ... otherwise generic_permission() will allow *anything* for all files you don't own and that have some group permissions. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index cbba000dccbe..603972576f0f 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -351,9 +351,4 @@ int btrfs_init_acl(struct inode *inode, struct inode *dir) return 0; } -int btrfs_check_acl(struct inode *inode, int mask) -{ - return 0; -} - #endif /* CONFIG...
d644d8a1e30b88a93bcfb63cada2ae628462ddba
Analyze and fix the following issue in the Linux kernel code: Btrfs: avoid IO stalls behind congested devices in a multi-device FS
Problem Details: The btrfs IO submission threads try to service a bunch of devices with a small number of threads. They do a congestion check to try and avoid waiting on requests for a busy device. The checks make sure we've sent a few requests down to a given device just so that we aren't bouncing between busy devic...
```diff diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 9d3618192009..27d5f37b845f 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -161,6 +161,7 @@ static noinline int run_scheduled_bios(struct btrfs_device *device) int again = 0; unsigned long num_run; unsigned long num_sync_run; + unsigne...
585ad2c3797dcaa643aeba75b9f072778adf3490
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix metadata dirty throttling limits
Problem Details: Once a metadata block has been written, it must be recowed, so the btrfs dirty balancing call has a check to make sure a fair amount of metadata was actually dirty before it started writing it back to disk. A previous commit had changed the dirty tracking for metadata without updating the btrfs dirty ...
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 7f5c6e3e9992..e572cf478a5d 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2378,17 +2378,14 @@ void btrfs_btree_balance_dirty(struct btrfs_root *root, unsigned long nr) * looks as though older kernels can get into trouble with * this ...
5c939df56c3ea018b58e5aa76181284c2053d699
Analyze and fix the following issue in the Linux kernel code: btrfs: Fix set/clear_extent_bit for 'end == (u64)-1'
Problem Details: There are some 'start = state->end + 1;' like code in set_extent_bit and clear_extent_bit. They overflow when end == (u64)-1. Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index fe9eb990e443..68260180f587 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -476,6 +476,7 @@ int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, struct extent_state *state; struct extent_state *prealloc = NULL; ...
7f4774b38ee6270bbc6c3015cb3fa6c415ffb340
Analyze and fix the following issue in the Linux kernel code: sata_nv: use hardreset only for post-boot probing
Problem Details: When I thought it was finally defeated, it came back with vengeance. The failure cases are ever more convoluted. Now there is a single combination which fails boot probing - MCP5x + Intel SSD and there are two hotplug failure reports on different flavors where softreset fails to bring up the device. ...
```diff diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 6cda12ba8122..b2d11f300c39 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -305,8 +305,8 @@ static irqreturn_t nv_ck804_interrupt(int irq, void *dev_instance); static int nv_scr_read(struct ata_link *link, unsigned int sc_reg, u...
58a09b38cfcd700b796ea07ae3d2e0efbb28b561
Analyze and fix the following issue in the Linux kernel code: [libata] ahci: Restore SB600 SATA controller 64 bit DMA
Problem Details: Community reported one SB600 SATA issue(BZ #9412), which led to 64 bit DMA disablement for all SB600 revisions by driver maintainers with commits c7a42156d99bcea7f8173ba7a6034bbaa2ecb77c and 4cde32fc4b32e96a99063af3183acdfd54c563f0. But the root cause is ASUS M2A-VM system BIOS bug in old revisions li...
```diff diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 2141a31f176b..15a23031833f 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -431,8 +431,7 @@ static const struct ata_port_info ahci_port_info[] = { [board_ahci_sb600] = { AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | - AHCI_HFLAG_32B...
f7b7c26e01e51fe46097e11f179dc71ce7950084
Analyze and fix the following issue in the Linux kernel code: perf_counter tools: Propagate signals properly
Problem Details: Currently report and stat catch SIGINT (and others) without altering their exit state. This means that things like: while :; do perf stat ./foo ; done Loops become hard-to-interrupt, because bash never sees perf terminate due to interruption. Fix this. Signed-off-by: Peter Zijlstra <a.p.zijlstra@...
```diff diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index a5698add2fcb..c10553c3460f 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -169,10 +169,21 @@ static void mmap_read(struct mmap_data *md) } static volatile int done = 0; +static volatile int signr = -1...
4502d77c1d8f15f20c04b92cb96c12d4e465de29
Analyze and fix the following issue in the Linux kernel code: perf_counter tools: Small frequency related fixes
Problem Details: Create the counter in a disabled state and only enable it after we mmap() the buffer, this allows us to see the first few samples (and observe the frequency ramp). Furthermore, print the period in the verbose report. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gm...
```diff diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index deaee42d5eb0..a5698add2fcb 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -347,6 +347,7 @@ static void create_counter(int counter, int cpu, pid_t pid) attr->mmap = track; attr->comm = track; attr-...
bd2b5b12849a3446abad0b25e920f86f5480b309
Analyze and fix the following issue in the Linux kernel code: perf_counter: More aggressive frequency adjustment
Problem Details: Also employ the overflow handler to adjust the frequency, this results in a stable frequency in about 40~50 samples, instead of that many ticks. This also means we can start sampling at a sample period of 1 without running head-first into the throttle. It relies on sched_clock() to accurately measure...
```diff diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index 49f258537cbf..240ca5630632 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c @@ -696,10 +696,11 @@ static int __hw_perf_counter_init(struct perf_counter *counter) if (!attr->exclud...
112ac808eb8a953dd356bbbc8322fdd6861e2c75
Analyze and fix the following issue in the Linux kernel code: ALSA: sound/ps3: Fix checkpatch issues
Problem Details: Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c index f361c26506aa..d660b0f6bcae 100644 --- a/sound/ppc/snd_ps3.c +++ b/sound/ppc/snd_ps3.c @@ -165,8 +165,7 @@ static const struct snd_pcm_hardware snd_ps3_pcm_hw = { .fifo_size = PS3_AUDIO_FIFO_SIZE }; -static struct snd_pcm_ops snd_ps3_pcm_spdif_ops...
62f469b596dd0aadf046a69027087c18db43734e
Analyze and fix the following issue in the Linux kernel code: [SCSI] libosd: osd_req_{read,write} takes a length parameter
Problem Details: For supporting of chained-bios we can not inspect the first bio only, as before. Caller shall pass the total length of the request, ie. sum_bytes(bio-chain). Also since the bio might be a chain we don't set it's direction on behalf of it's callers. The bio direction should be properly set prior to thi...
```diff diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index ba2ebae305cd..3f5ec578e6c6 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -779,13 +779,14 @@ EXPORT_SYMBOL(osd_req_remove_object); */ void osd_req_write(struct osd_request *or, - c...
6b5c94c6b4e1630a8e1ee7d30383d9396603749f
Analyze and fix the following issue in the Linux kernel code: UBI: handle more error codes
Problem Details: The UBIFS WL worker may encounter read errors and there is logic which makes a decision whether we should do one of: 1. cancel the operation and move the PEB with the read errors to the 'erroneous' list; 2. switch to R/O mode. ATM, only -EIO errors trigger 1., other errors trigger 2. The idea is t...
```diff diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index b6565561218e..0f2034c3ed2f 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c @@ -940,6 +940,33 @@ write_error: goto retry; } +/** + * is_error_sane - check whether a read error is sane. + * @err: code of the error happened during...
815bc5f8fe516f55291aef90f2142073821e7a9c
Analyze and fix the following issue in the Linux kernel code: UBI: fix multiple spelling typos
Problem Details: Some of the typos were indicated by Adrian Hunter, some by 'aspell'. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 632b95f3ff3f..b6565561218e 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c @@ -951,7 +951,7 @@ write_error: * physical eraseblock @to. The @vid_hdr buffer may be changed by this * function. Returns: * o %0 in case of success...
21d08bbcb19d9cdef8ab5b584f25b50d842068e9
Analyze and fix the following issue in the Linux kernel code: UBI: fix kmem_cache_free on error patch
Problem Details: 'kmem_cache_free()' oopeses if NULL is passed, and there is one error-path place where UBI may call it with NULL object. This problem was pointed to by Adrian Hunter. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index f25ae2910ad0..acb5520f7f3d 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -826,7 +826,8 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk, err = schedule_erase(ubi, e1, 0); if (err) { kmem_cache_...
236e6723bedb483b2ebf73ada01e2c853c5cac01
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix lm4857 control
Problem Details: Commit 4eaa9819dc08d7bfd1065ce530e31b18a119dcaf changed semantics of private_value member of kcontrol. This resulted in inability to control amplifier and subsequently in very low output volume. Tested-by: Johannes Schauer <josch@pyneo.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-...
```diff diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c index 289fadf60b10..906709e6dd5f 100644 --- a/sound/soc/s3c24xx/neo1973_wm8753.c +++ b/sound/soc/s3c24xx/neo1973_wm8753.c @@ -345,9 +345,11 @@ static void lm4857_write_regs(void) static int lm4857_get_reg(struct snd_kcontrol *...
5f4417a156a6e44359effa9492de3ed5638a9b13
Analyze and fix the following issue in the Linux kernel code: ide: fix PowerMac bootup oops
Problem Details: PowerMac bootup with CONFIG_IDE=y oopses in ide_pio_cycle_time(): because "ide: try to use PIO Mode 0 during probe if possible" causes pmac_ide_set_pio_mode() to be called before drive->id has been set. Bart points out other places which now need drive->id set earlier, so follow his advice to allocate...
```diff diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index f9c2fb7d0005..f371b0de314f 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -465,23 +465,8 @@ static u8 probe_for_drive(ide_drive_t *drive) int rc; u8 cmd; - /* - * In order to keep things simple we have an id - * ...
09f8ca74ae6c2d78b2c7f6c0751ed0cbe815a3d9
Analyze and fix the following issue in the Linux kernel code: KVM: Prevent overflow in largepages calculation
Problem Details: If userspace specifies a memory slot that is larger than 8 petabytes, it could overflow the largepages variable. Cc: stable@kernel.org Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 5f865ed4c431..e21194566b71 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1087,8 +1087,7 @@ int __kvm_set_memory_region(struct kvm *kvm, int r; gfn_t base_gfn; unsigned long npages, ugfn; - int largepages; - unsigned long i; + un...
dc81081b2d9a6a9d64dad1bef1e5fc9fb660e53e
Analyze and fix the following issue in the Linux kernel code: perf_counter/x86: Fix the model number of Intel Core2 processors
Problem Details: Fix the model number of Intel Core2 processors according to the documentation: Intel Processor Identification with the CPUID Instruction: http://www.intel.com/support/processors/sb/cs-009861.htm Signed-off-by: Yong Wang <yong.y.wang@intel.com> Also-Reported-by: Arnd Bergmann <arnd@arndb.de> Cc: Peter ...
```diff diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index 40978aac6e0f..49f258537cbf 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c @@ -1407,7 +1407,10 @@ static int intel_pmu_init(void) * Install the hw-cache-events table: */ sw...
3d373290450b10933dad7c387c42179f54417009
Analyze and fix the following issue in the Linux kernel code: amd64_edac: do not enable module by default
Problem Details: While at it, fix a link failure when !K8_NB. Acked-by: Doug Thompson <dougthompson@xmission.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Tested-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 3dc650a7422c..eff363d727e3 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig @@ -60,11 +60,10 @@ config EDAC_MM_EDAC config EDAC_AMD64 tristate "AMD64 (Opteron, Athlon64) K8, F10h, F11h" - depends on EDAC_MM_EDAC && X86 && PCI - defa...
7d6034d3213e2dd1c0f8678e11064007413011c4
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add module registration routines
Problem Details: Also, link into Kbuild by adding Kconfig and Makefile entries. Borislav: - Kconfig/Makefile splitting - use zero-sized arrays for the sysfs attrs if not enabled - rename sysfs attrs to more conform values - shorten CONFIG_ names - make multiple structure members assignment vertically aligned - fix/cle...
```diff diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 956982f8739b..3dc650a7422c 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig @@ -58,6 +58,32 @@ config EDAC_MM_EDAC occurred so that a particular failing memory module can be replaced. If unsure, select 'Y'. +config EDAC_AMD64 ...
f9431992b6227069bc54800d55531c6f78d276a7
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add ECC reporting initializers
Problem Details: Borislav: - convert to the new {rd|wr}msr_on_cpus interfaces. - convert pvt->old_mcgctl to a bitmask thus saving some bytes - fix/cleanup comments - fix function return value patterns - add a proper bugfix found by Doug to amd64_check_ecc_enabled where we missed checking for the ECC enabled bit in NB...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 5a6e714b115e..3b6c421531cf 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2771,3 +2771,210 @@ static int amd64_init_csrows(struct mem_ctl_info *mci) return empty; } +/* + * Only if 'ecc_enable_override' is ...
0ec449ee95b20245fef4aa9fa2486456f1540514
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add EDAC core-related initializers
Problem Details: Borislav: - add a amd64_free_mc_sibling_devices() helper instead of opencoding the release-path. - fix/cleanup comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 09991c8a6ee3..5a6e714b115e 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2455,4 +2455,319 @@ int amd64_process_error_info(struct mem_ctl_info *mci, } EXPORT_SYMBOL_GPL(amd64_process_error_info); +/* + * The...
d27bf6fa369ca0272df10558d2f290d6fc72e675
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add error decoding logic
Problem Details: Borislav: - fold amd64_error_info_valid() into its only user - fix/cleanup comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov <borislav.petk...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index feb4986ea76d..09991c8a6ee3 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2031,3 +2031,428 @@ static int get_channel_from_ecc_syndrome(unsigned short syndrome) debugf0("syndrome(%x) not found\n", syndrome); ...
b1289d6f9d23abab396077abb65d5a23a775cdb0
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add ECC chipkill syndrome mapping table
Problem Details: Borislav: - fix comments - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index e5f4a92faa3b..feb4986ea76d 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -1895,4 +1895,139 @@ static struct pci_dev *pci_get_related_function(unsigned int vendor, return dev; } +/* + * syndrome mapping tabl...
4d37607adbff69596a3170cf84badaf26efc59ac
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add per-family descriptors
Problem Details: Borislav: - fix comments - fix function return value patterns Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index c2e2c3c37f5c..e5f4a92faa3b 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -1824,3 +1824,75 @@ static int f10_probe_valid_hardware(struct amd64_pvt *pvt) return ret; } +/* + * There currently are 3 types type...
f71d0a05001afd10e2be491ca002c55c7df42ed8
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add F10h-and-later methods-p3
Problem Details: Borislav: - compute dct_sel_base_off in f10_match_to_this_node() correctly since it cannot be assumed that the Reserved bits are zero and they have to be masked out instead. - cleanup, remove StinkyIdentifiers, simplify logic - fix function return value patterns - cleanup debug calls Reviewed-by: Ma...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 744a49ac9f5c..c2e2c3c37f5c 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -1398,6 +1398,10 @@ static void f10_read_dram_ctl_register(struct amd64_pvt *pvt) debugf0("Reading F10_DCTL_SEL_HIGH failed\n"); } +...
6163b5d4fb45d20e3eb92d627943f26572726889
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add F10h-and-later methods-p2
Problem Details: Borislav: - fix a wrong negation in f10_determine_base_addr_offset() - fix a wrong mask in f10_determine_base_addr_offset() which should select DctSelBaseAddr[31:11] and not [31:16] as it was before - remove StinkyIdentifiers, trivially simplify code. - fix/cleanup comments - fix function return value...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index b4ef2c70500e..744a49ac9f5c 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -1367,3 +1367,199 @@ static void f10_read_dram_base_limit(struct amd64_pvt *pvt, int dram) pvt->dram_limit[dram] = ((((u64) high_limi...
1afd3c98b5e8df68e1840b56c0ced15f314ce30d
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add F10h-and-later methods-p1
Problem Details: Borislav: Fail f10_early_channel_count() if error encountered while reading a NB register since those cached register contents are accessed afterwards. - fix/cleanup comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 24c031f79756..b4ef2c70500e 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -1185,4 +1185,185 @@ static int k8_dbam_map_to_pages(struct amd64_pvt *pvt, int dram_map) return nr_pages; } +/* + * Get the number o...
ddff876d2022c5e06509f6535bc4fd61c4d6ffd6
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add k8-specific methods
Problem Details: Borislav: - fix/cleanup/move comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 5ec44a440d65..24c031f79756 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -1013,3 +1013,176 @@ static enum mem_type amd64_determine_memory_type(struct amd64_pvt *pvt) return type; } +/* + * Read the DRAM Con...
94be4bff21990674ac418c970c708a1a01cf709f
Analyze and fix the following issue in the Linux kernel code: amd64_edac: assign DRAM chip select base and mask in a family-specific way
Problem Details: Borislav: - cleanup/fix comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 3d6d0007ed5d..5ec44a440d65 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -871,3 +871,145 @@ err_reg: debugf0("Error reading F2x%03x.\n", reg); } +/* + * NOTE: CPU Revision Dependent code: Rev E and Rev F + ...
2da11654ea4d32c5700693675dfbd55c70619519
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add helper to dump relevant registers
Problem Details: Borislav: - cleanup/fix comments - fix function return value patterns - cleanup dbg calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 28f85c9e3afc..3d6d0007ed5d 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -729,3 +729,145 @@ static int sys_addr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr) return csrow; } +static int get_channel_from_...
93c2df58b5b1a434cca8f60067e0e12d1942b7f1
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add DRAM address type conversion facilities
Problem Details: Borislav: - cleanup/fix comments, add BKDG refs - fix function return value patterns - cleanup dbg calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 4716fb561e6e..28f85c9e3afc 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -434,4 +434,298 @@ int amd64_get_dram_hole_info(struct mem_ctl_info *mci, u64 *hole_base, } EXPORT_SYMBOL_GPL(amd64_get_dram_hole_info);...
e2ce7255e84db656853e91536e6023f92ff89f97
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add functionality to compute the DRAM hole
Problem Details: Borislav: - cleanup/fix comments, add BKDG refs - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index a774f34d508b..4716fb561e6e 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -269,3 +269,169 @@ err_no_match: return NULL; } + +/* + * Extract the DRAM CS base address from selected csrow register. + */ +static...
6775763a2377e1ea865299b6daadc875d622de3f
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add sys addr to memory controller mapping helpers
Problem Details: Borislav: - cleanup comments - cleanup debug calls - simplify find_mc_by_sys_addr's exit path Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 6876d4359794..a774f34d508b 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -128,3 +128,144 @@ static int amd64_get_scrub_rate(struct mem_ctl_info *mci, u32 *bw) return status; } +/* Map from a CSROW entry to ...
2bc65418724a0ddbb20c9eeb9de8285af7748c16
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add memory scrubber interface
Problem Details: Borislav: - fix/cleanup comments - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c new file mode 100644 index 000000000000..6876d4359794 --- /dev/null +++ b/drivers/edac/amd64_edac.c @@ -0,0 +1,130 @@ +#include "amd64_edac.h" + +static struct edac_pci_ctl_info *amd64_ctl_pci; + +static int report_gart_errors; +module_param(rep...
eb919690be994386eac326f8c53c4540602de563
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add DRAM error injection logic using sysfs
Problem Details: Borislav: - rename sysfs attrs to more conform names - cleanup/fix comments according to BKDG text - fix function return value patterns - cleanup debug calls Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Borislav Petkov ...
```diff diff --git a/drivers/edac/amd64_edac_inj.c b/drivers/edac/amd64_edac_inj.c new file mode 100644 index 000000000000..d3675b76b3a7 --- /dev/null +++ b/drivers/edac/amd64_edac_inj.c @@ -0,0 +1,185 @@ +#include "amd64_edac.h" + +/* + * store error injection section value which refers to one of 4 16-byte sections + ...
fd3d6780f7358225a6ea1ffb1bb8fd8b2d6df446
Analyze and fix the following issue in the Linux kernel code: amd64_edac: add debugging/testing code
Problem Details: This is for dumping different registers and testing the address mapping logic using the ECC syndromes. Borislav: - split sysfs attrs per file - use more conform names for the sysfs attrs - fix function return value patterns - cleanup/fix comments - cleanup debug calls Reviewed-by: Mauro Carvalho Che...
```diff diff --git a/drivers/edac/amd64_edac_dbg.c b/drivers/edac/amd64_edac_dbg.c new file mode 100644 index 000000000000..0a41b248a4ad --- /dev/null +++ b/drivers/edac/amd64_edac_dbg.c @@ -0,0 +1,255 @@ +#include "amd64_edac.h" + +/* + * accept a hex value and store it into the virtual error register file, field: + *...
f1db457ce6e2f63cb01022f58c0c023838958bd1
Analyze and fix the following issue in the Linux kernel code: tracing/events: convert block trace points to TRACE_EVENT(), fix !CONFIG_BLOCK
Problem Details: Fix building failures when CONFIG_BLOCK == n. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> LKML-Reference: <4A2F1520.8020003@cn.fujitsu.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index c7ec31dd04c9..7e4350ece0f8 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h @@ -218,7 +218,7 @@ static inline int blk_trace_init_sysfs(struct device *dev) #endif /* CONFIG_BLK_DEV_IO_TRACE */ -#ifdef ...
44c11430b52cbad0a467bc023a802d122dfd285c
Analyze and fix the following issue in the Linux kernel code: KVM: inject NMI after IRET from a previous NMI, not before.
Problem Details: If NMI is received during handling of another NMI it should be injected immediately after IRET from previous NMI handler, but SVM intercept IRET before instruction execution so we can't inject pending NMI at this point and there is not way to request exit when NMI window opens. This patch fix SVM code ...
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 1d6c3f757cb6..82129437e873 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -358,6 +358,7 @@ struct kvm_vcpu_arch { unsigned int time_offset; struct page *time_page; + bool singlestep;...
3edbcff9bfe2ed632e518b3cfe807d062cee8269
Analyze and fix the following issue in the Linux kernel code: KVM: s390: Sanity check on validity intercept
Problem Details: This patch adds a sanity check for the content of the guest prefix register content before faulting in the cpu lowcore that it refers to. The guest might end up in an endless loop where SIE complains about missing lowcore with incorrect content of the prefix register without this fix. Reported-by: Mij...
```diff diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index 9d19803111ba..98997ccba501 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c @@ -154,17 +154,25 @@ static int handle_stop(struct kvm_vcpu *vcpu) static int handle_validity(struct kvm_vcpu *vcpu) { int viwhy = vcpu-...
2668dab794272f0898491acaf1e77e9a005abc0f
Analyze and fix the following issue in the Linux kernel code: KVM: s390: Fix memory slot versus run - v3
Problem Details: This patch fixes an incorrectness in the kvm backend for s390. In case virtual cpus are being created before the corresponding memory slot is being registered, we need to update the sie control blocks for the virtual cpus. *updates in v3* In consideration of the s390 memslot constraints locking was ch...
```diff diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index f4d56e9939c9..86567e174fd7 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -657,6 +657,8 @@ int kvm_arch_set_memory_region(struct kvm *kvm, struct kvm_memory_slot old, int user_alloc) { + int i; + /* A fe...
310b5d306c1aee7ebe32f702c0e33e7988d50646
Analyze and fix the following issue in the Linux kernel code: KVM: Deal with interrupt shadow state for emulated instructions
Problem Details: We currently unblock shadow interrupt state when we skip an instruction, but failing to do so when we actually emulate one. This blocks interrupts in key instruction blocks, in particular sti; hlt; sequences If the instruction emulated is an sti, we have to block shadow interrupts. The same goes for m...
```diff diff --git a/arch/x86/include/asm/kvm_x86_emulate.h b/arch/x86/include/asm/kvm_x86_emulate.h index be40d6e2b6bb..b7ed2c423116 100644 --- a/arch/x86/include/asm/kvm_x86_emulate.h +++ b/arch/x86/include/asm/kvm_x86_emulate.h @@ -155,6 +155,9 @@ struct x86_emulate_ctxt { int mode; u32 cs_base; + /* interrupt...
547de29e5b1662deb05b5f90917902dc0e9ac182
Analyze and fix the following issue in the Linux kernel code: KVM: protect assigned dev workqueue, int handler and irq acker
Problem Details: kvm_assigned_dev_ack_irq is vulnerable to a race condition with the interrupt handler function. It does: if (dev->host_irq_disabled) { enable_irq(dev->host_irq); dev->host_irq_disabled = false; } If an interrupt triggers before the host->dev_irq_disable...
```diff diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 161816284192..aacc5449f586 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -345,6 +345,7 @@ struct kvm_assigned_dev_kernel { int flags; struct pci_dev *dev; struct kvm *kvm; + spinlock_t assigned_dev_lock; }; ...
8d753f369bd28fff1706ffe9fb9fea4fd88cf85b
Analyze and fix the following issue in the Linux kernel code: KVM: Fix cpuid feature misreporting
Problem Details: MTRR, PAT, MCE, and MCA are all supported (to some extent) but not reported. Vista requires these features, so if userspace relies on kernel cpuid reporting, it loses support for Vista. Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index a0faa4882f84..da3e65bfc6ee 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1254,9 +1254,12 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, bit(X86_FEATURE_VME) | bit(X86_FEATURE_DE) | bit(X86_FEATURE_PSE) | b...
b586eb0253083795e58dcbe76665410d4676dc08
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Fix cross vendor migration issue in segment segment descriptor
Problem Details: On AMD CPUs sometimes the DB bit in the stack segment descriptor is left as 1, although the whole segment has been made unusable. Clear it here to pass an Intel VMX entry check when cross vendor migrating. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com...
```diff diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 63503782935d..e3ea98290f9b 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -803,6 +803,15 @@ static void svm_get_segment(struct kvm_vcpu *vcpu, if (!var->unusable) var->type |= 0x1; break; + case VCPU_SREG_SS: + /* On AMD CPUs som...
9b5843ddd20557b77c73ddbcc814a8c816bf3d3a
Analyze and fix the following issue in the Linux kernel code: KVM: fix apic_debug instances
Problem Details: Apparently nobody turned this on in a while... setting apic_debug to something compilable, generates some errors. This patch fixes it. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 4d76bb6c5e51..ae99d83f81a3 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -445,7 +445,7 @@ static void apic_send_ipi(struct kvm_lapic *apic) apic_debug("icr_high 0x%x, icr_low 0x%x, " "short_hand 0x%x, dest 0x%x, trig_mode 0...
efbc100c20f9dc4a219a2a92763d68e4064109f2
Analyze and fix the following issue in the Linux kernel code: KVM: Trivial format fix in setup_routing_entry()
Problem Details: Remove extra tab. Signed-off-by: Chris Wright <chrisw@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 4fa1f604b425..a8bd466d00cc 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c @@ -271,7 +271,7 @@ static int setup_routing_entry(struct kvm_kernel_irq_routing_entry *e, delta = 8; break; case KVM_IRQCHIP_IOAPIC: - e->set = kvm_se...
522c68c4416de3cd3e11a9ff10d58e776a69ae1e
Analyze and fix the following issue in the Linux kernel code: KVM: Enable snooping control for supported hardware
Problem Details: Memory aliases with different memory type is a problem for guest. For the guest without assigned device, the memory type of guest memory would always been the same as host(WB); but for the assigned device, some part of memory may be used as DMA and then set to uncacheable memory type(UC/WC), which woul...
```diff diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h index 589536fa799d..5f43697aed30 100644 --- a/arch/ia64/include/asm/kvm_host.h +++ b/arch/ia64/include/asm/kvm_host.h @@ -474,6 +474,7 @@ struct kvm_arch { struct list_head assigned_dev_head; struct iommu_domain *iommu_domain...
16d7a191170f0ca48c2c3277017b3e6d275e0711
Analyze and fix the following issue in the Linux kernel code: KVM: Fix userspace IRQ chip migration
Problem Details: Re-put pending IRQ vector into interrupt_bitmap before migration. Otherwise it will be lost if migration happens in the wrong time. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 96e995c1dd76..63917216a051 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3566,17 +3566,17 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu, sregs->efer = vcpu->arch.shadow_efer; sregs->apic_base = kvm_get_apic_base(vcpu); ...
9222be18f76b4410b4da0d06e1cc21079e64b3ec
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Coalesce userspace/kernel irqchip interrupt injection logic
Problem Details: Start to use interrupt/exception queues like VMX does. This also fix the bug that if exit was caused by a guest internal exception access to IDT the exception was not reinjected. Use EVENTINJ to inject interrupts. Use VINT only for detecting when IRQ windows is open again. EVENTINJ ensures the inter...
```diff diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index f2933abc9691..a80ffaa16a94 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -70,7 +70,6 @@ module_param(npt, int, S_IRUGO); static int nested = 0; module_param(nested, int, S_IRUGO); -static void kvm_reput_irq(struct vcpu_svm *svm); stat...
3438253926822a6bf8487b4f7d82f26a2c0b2388
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Fix auditing code
Problem Details: Fix build breakage of hpa lookup in audit_mappings_page. Moreover, make this function robust against shadow_notrap_nonpresent_pte entries. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index b39ec626040e..3592aea59ef7 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -3029,11 +3029,13 @@ static void audit_mappings_page(struct kvm_vcpu *vcpu, u64 page_pte, " in nonleaf level: levels %d gva %lx" " level %d pt...
59839dfff5eabca01cc4e20b45797a60a80af8cb
Analyze and fix the following issue in the Linux kernel code: KVM: x86: check for cr3 validity in ioctl_set_sregs
Problem Details: Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries to call KVM_RUN on the affected VCP...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ffbb2c818d78..2bad49b535c8 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3993,7 +3993,13 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, vcpu->arch.cr2 = sregs->cr2; mmu_reset_needed |= vcpu->arch.cr3 != sregs->cr3; - vc...
c2d0ee46e6e633a3c23ecbcb9b03ad731906cd79
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: remove global page optimization logic
Problem Details: Complexity to fix it not worthwhile the gains, as discussed in http://article.gmane.org/gmane.comp.emulators.kvm.devel/28649. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 3fc46238476c..0e3a7c6e522c 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -213,7 +213,6 @@ struct kvm_mmu_page { int multimapped; /* More than one parent_pte? */ int root_count...
ede2ccc51742059d356d419260460cbbf3e36273
Analyze and fix the following issue in the Linux kernel code: KVM: PIT: fix count read and mode 0 handling
Problem Details: Commit 46ee278652f4cbd51013471b64c7897ba9bcd1b1 causes Solaris 10 to hang on boot. Assuming that PIT counter reads should return 0 for an expired timer is wrong: when it is active, the counter never stops (see comment on __kpit_elapsed). Also arm a one shot timer for mode 0. Signed-off-by: Marcelo T...
```diff diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index cf09bb64f141..4d6f0d293ee2 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -104,13 +104,18 @@ static s64 __kpit_elapsed(struct kvm *kvm) ktime_t remaining; struct kvm_kpit_state *ps = &kvm->arch.vpit->pit_state; + /* + * The C...
2d033196541959d91802d5a62e63771448101557
Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: fix call near emulation
Problem Details: The length of pushed on to the stack return address depends on operand size not address size. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index ca91749d2083..d7c9f6fd0d34 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c @@ -1792,7 +1792,6 @@ special_insn: } c->src.val = (unsigned long) c->eip; jmp_rel(c, rel); - c->op_bytes = c->ad_bytes; emu...
4c26b4cd6ff6c3f7534f2aea9615a561c372ed05
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Discard reserved bits checking on PDE bit 7-8
Problem Details: 1. It's related to a Linux kernel bug which fixed by Ingo on 07a66d7c53a538e1a9759954a82bb6c07365eff9. The original code exists for quite a long time, and it would convert a PDE for large page into a normal PDE. But it fail to fit normal PDE well. With the code before Ingo's fix, the kernel would fall...
```diff diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index da3ad3cf3142..b582adde6830 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2194,7 +2194,7 @@ static void reset_rsvds_bits_mask(struct kvm_vcpu *vcpu, int level) rsvd_bits(maxphyaddr, 63) | rsvd_bits(7, 8) | rsvd_bits(1, 2); /* PDPTE...
64a7ec066813443440bfc9f60a9e76a47cfa6b2b
Analyze and fix the following issue in the Linux kernel code: KVM: Fix unneeded instruction skipping during task switching.
Problem Details: There is no need to skip instruction if the reason for a task switch is a task gate in IDT and access to it is caused by an external even. The problem is currently solved only for VMX since there is no reliable way to skip an instruction in SVM. We should emulate it instead. Signed-off-by: Gleb Natap...
```diff diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index 82ada75f3ebf..85574b7c1bc1 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h @@ -225,6 +225,7 @@ struct __attribute__ ((__packed__)) vmcb { #define SVM_EVTINJ_VALID_ERR (1 << 11) #define SVM_EXITINTINFO_VEC_MAS...
b237ac37a149e8b56436fabf093532483bff13b0
Analyze and fix the following issue in the Linux kernel code: KVM: Fix task switch back link handling.
Problem Details: Back link is written to a wrong TSS now. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 70ee81e50d99..adcf73871a9d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3717,7 +3717,6 @@ static void save_state_to_tss32(struct kvm_vcpu *vcpu, tss->fs = get_segment_selector(vcpu, VCPU_SREG_FS); tss->gs = get_segment_selector(vcpu,...
37b96e988053c4dd21811b0408a12f8f60b4d0c8
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Rewrite vmx_complete_interrupt()'s twisted maze of if() statements
Problem Details: ...with a more straightforward switch(). Also fix a bug when NMI could be dropped on exit. Although this should never happen in practice, since NMIs can only be injected, never triggered internally by the guest like exceptions. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <...
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 631f9b720971..577aa9551a97 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3277,7 +3277,6 @@ static void vmx_complete_interrupts(struct vcpu_vmx *vmx) u8 vector; int type; bool idtv_info_valid; - u32 error; idtv_info_valid = idt_v...
7b4a25cb296e2a73d2e87a4af65361d45d450a27
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix handling of a fault during NMI unblocked due to IRET
Problem Details: Bit 12 is undefined in any of the following cases: If the VM exit sets the valid bit in the IDT-vectoring information field. If the VM exit is due to a double fault. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 7d7b0d6e3f58..631f9b720971 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3272,36 +3272,41 @@ static void update_tpr_threshold(struct kvm_vcpu *vcpu) static void vmx_complete_interrupts(struct vcpu_vmx *vmx) { u32 exit_intr_info; - u32...
93ba03c2e2aba23b042cc15eef83b7a66d3ac17a
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix feature testing
Problem Details: The testing of feature is too early now, before vmcs_config complete initialization. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 1caa1fc6d5ec..7d7b0d6e3f58 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1208,15 +1208,6 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) vmx_capability.ept, vmx_capability.vpid); } - if (!cpu_has_vmx_vpi...
9645bb56b31a1b70ab9e470387b5264cafc04aa9
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Use different shadows when EFER.NXE changes
Problem Details: A pte that is shadowed when the guest EFER.NXE=1 is not valid when EFER.NXE=0; if bit 63 is set, the pte should cause a fault, and since the shadow EFER always has NX enabled, this won't happen. Fix by using a different shadow page table for different EFER.NXE bits. This allows vcpus to run correctly...
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 548b97d284d3..3fc46238476c 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -185,6 +185,7 @@ union kvm_mmu_page_role { unsigned access:3; unsigned invalid:1; unsigned cr4_pge:1; + ...
82725b20e22fb85377f61a16f6d0d5cfc28b45d3
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Emulate #PF error code of reserved bits violation
Problem Details: Detect, indicate, and propagate page faults where reserved bits are set. Take care to handle the different paging modes, each of which has different sets of reserved bits. [avi: fix pte reserved bits for efer.nxe=0] Signed-off-by: Eddie Dong <eddie.dong@intel.com> Signed-off-by: Avi Kivity <avi@redha...
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 8351c4d00ac0..548b97d284d3 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -261,6 +261,7 @@ struct kvm_mmu { union kvm_mmu_page_role base_role; u64 *pae_root; + u64 rsvd_bits_mask[2][...
a8b876b1a469cb364fee16ba3aef01613a1231cc
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Fix comment in page_fault()
Problem Details: The original one is for the code before refactoring. Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com> Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 855eb7111049..eae949973d09 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -379,7 +379,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr, return r; /* - * Look up the shadow pte for t...
78646121e9a2fcf7977cc15966420e572a450bc3
Analyze and fix the following issue in the Linux kernel code: KVM: Fix interrupt unhalting a vcpu when it shouldn't
Problem Details: kvm_vcpu_block() unhalts vpu on an interrupt/timer without checking if interrupt window is actually opened. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index d2a90fd505b0..3bf0a345224a 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@ -1963,6 +1963,12 @@ int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu) return 0; } +int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu) +...
386eb6e8b3caface8a0514da70a47c05cabb5b96
Analyze and fix the following issue in the Linux kernel code: KVM: make 'lapic_timer_ops' and 'kpit_ops' static
Problem Details: Fix this sparse warnings: arch/x86/kvm/lapic.c:916:22: warning: symbol 'lapic_timer_ops' was not declared. Should it be static? arch/x86/kvm/i8254.c:268:22: warning: symbol 'kpit_ops' was not declared. Should it be static? Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Avi Kivit...
```diff diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 4e2e3f26dbf8..cf09bb64f141 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -265,7 +265,7 @@ static bool kpit_is_periodic(struct kvm_timer *ktimer) return ps->is_periodic; } -struct kvm_timer_ops kpit_ops = { +static struct kvm_t...
3f5e06f8799adca3e7e1bbafe1cd780a3e69f604
Analyze and fix the following issue in the Linux kernel code: KVM: ia64: fix compilation error in kvm_get_lowest_prio_vcpu
Problem Details: Modify the arg of kvm_get_lowest_prio_vcpu(). Make it consistent with its declaration. Signed-off-by: Yang Zhang <yang.zhang@intel.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index d20a5db4c4dd..774f0d78a581 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@ -1837,7 +1837,7 @@ int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u8 mda) } struct kvm_vcpu *kvm_get_lowest_prio_vcpu(struct kvm ...
2dea4c84bc936731668b5a7a9fba5b436a422668
Analyze and fix the following issue in the Linux kernel code: KVM: x86: silence preempt warning on kvm_write_guest_time
Problem Details: This issue just appeared in kvm-84 when running on 2.6.28.7 (x86-64) with PREEMPT enabled. We're getting syslog warnings like this many (but not all) times qemu tells KVM to run the VCPU: BUG: using smp_processor_id() in preemptible [00000000] code: qemu-system-x86/28938 caller is kvm_arch_vcpu_ioctl...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 3944e917e794..43e049a2ccf4 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -634,10 +634,12 @@ static void kvm_write_guest_time(struct kvm_vcpu *v) if ((!vcpu->time_page)) return; + preempt_disable(); if (unlikely(vcpu->hv_clock_tsc_...
fa047e4f6fa63a6e9d0ae4d7749538830d14a343
Analyze and fix the following issue in the Linux kernel code: HID: fix inverted wheel for bluetooth version of apple mighty mouse
Problem Details: Bluetooth version of Apple Mighty mouse (0x05ac/0x030c) doesn't, according to multiple reports on linux-input@, need the same quirk as the USB version of this mouse (0x05ac/0x0304) does. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index acbce5745b0c..303ccce05bb3 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c @@ -436,10 +436,6 @@ static const struct hid_device_id apple_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONL...
51611a120e8120290152edd7d0020d22a7f4b4a3
Analyze and fix the following issue in the Linux kernel code: can: sja1000_of_platform: fix build problems with printk format
Problem Details: According to "Documentation/printk-formats.txt", if the type is dependent on a config option for its size, like resource_size_t, we should use a format specifier of its largest possible type and explicitly cast to it. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Mille...
```diff diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c index aa953fb4b8d0..3373560405ba 100644 --- a/drivers/net/can/sja1000/sja1000_of_platform.c +++ b/drivers/net/can/sja1000/sja1000_of_platform.c @@ -108,15 +108,17 @@ static int __devinit sja1000_ofp_probe(...
40bc9a27e00d6c8c7e4dc2865c02d7402a950472
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix cache coherency between truncate and O_DIRECT read
Problem Details: If a page was partially zeroed as the result of a truncate, then it was not being correctly marked dirty. This resulted in the deleted data reappearing if the file was read back via direct I/O. Reported-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 1153a078920c..329763530dc0 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -1012,7 +1012,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping) gfs2_trans_add_bh(ip->i_gl, bh, 0); zero_user(page, offset, length); - + mark_buffer_dirt...
1abb0de2f89c1f9c454c973356b9e4867722f10a
Analyze and fix the following issue in the Linux kernel code: qlge: bugfix: Get rid of errant spin_unlock().
Problem Details: Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 5055f5b37a73..024c7343ada0 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -3299,7 +3299,6 @@ static int ql_adapter_up(struct ql_adapter *qdev) err = ql_adapter_initialize(qdev); if (err) { QPRI...
96050dfb25966612008dcea7d342e91fa01e993c
Analyze and fix the following issue in the Linux kernel code: char: mxser, fix ISA board lookup
Problem Details: There's a bug in the mxser kernel module that still appears in the 2.6.29.4 kernel. mxser_get_ISA_conf takes a ioaddress as its first argument, by passing the not of the ioaddr, you're effectively passing 0 which means it won't be able to talk to an ISA card. I have tested this, and removing the ! fi...
```diff diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index a420e8d437dd..13f8871e5b21 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -2711,7 +2711,7 @@ static int __init mxser_module_init(void) continue; brd = &mxser_boards[m]; - retval = mxser_get_ISA_conf(!ioaddr[b], brd); + re...
0808dc80939b08ec215f472e17a5d8f6b148037e
Analyze and fix the following issue in the Linux kernel code: netfilter: Fix extra semi-colon in skb_walk_frags() changes.
Problem Details: Noticed by Jesper Dangaard Brouer Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/netfilter/nf_nat_proto_sctp.c b/net/ipv4/netfilter/nf_nat_proto_sctp.c index 6983e41c0b0f..3fc598eeeb1a 100644 --- a/net/ipv4/netfilter/nf_nat_proto_sctp.c +++ b/net/ipv4/netfilter/nf_nat_proto_sctp.c @@ -58,7 +58,7 @@ sctp_manip_pkt(struct sk_buff *skb, } crc32 = sctp_start_cksum((u...
a61d90d75d0f9e86432c45b496b4b0fbf0fd03dc
Analyze and fix the following issue in the Linux kernel code: jbd: fix race in buffer processing in commit code
Problem Details: In commit code, we scan buffers attached to a transaction. During this scan, we sometimes have to drop j_list_lock and then we recheck whether the journal buffer head didn't get freed by journal_try_to_free_buffers(). But checking for buffer_jbd(bh) isn't enough because a new journal head could get a...
```diff diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 06560c520f49..618e21c0b7a3 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -241,7 +241,7 @@ write_out_data: spin_lock(&journal->j_list_lock); } /* Someone already cleaned up the buffer? */ - if (!buffer_jbd(bh) + if (!buffer_jbd(bh) || bh2jh...
463aea1a1c49f1a7d4b50656dfd6c8bb33358b1b
Analyze and fix the following issue in the Linux kernel code: autofs4: remove hashed check in validate_wait()
Problem Details: The recent ->lookup() deadlock correction required the directory inode mutex to be dropped while waiting for expire completion. We were concerned about side effects from this change and one has been identified. I saw several error messages. They cause autofs to become quite confused and don't really...
```diff diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index eeb246845909..2341375386f8 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c @@ -297,20 +297,14 @@ static int validate_request(struct autofs_wait_queue **wait, */ if (notify == NFY_MOUNT) { /* - * If the dentry isn't hashed just go ahea...
586c7e6a280580fd94b662bf486f9bb31098d14b
Analyze and fix the following issue in the Linux kernel code: shm: fix unused warnings on nommu
Problem Details: The massive nommu update (8feae131) resulted in these warnings: ipc/shm.c: In function `sys_shmdt': ipc/shm.c:974: warning: unused variable `size' ipc/shm.c:972: warning: unused variable `next' Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: David Howells <dhowells@redhat.com> Signed-off-by: And...
```diff diff --git a/ipc/shm.c b/ipc/shm.c index faa46da99ebe..425971600485 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -969,10 +969,13 @@ SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg) SYSCALL_DEFINE1(shmdt, char __user *, shmaddr) { struct mm_struct *mm = current->mm; - struct vm_area_struc...
fc847ab4318cd6ab6c231739ad51d2502d19a87a
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt fusion: fix up doc book comments
Problem Details: Several of the doc book in the previous patches had incorrect multi-line short function descriptors. Fixed it all to be the correct single line descriptor. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 88a1a6d3bc04..14c490a767a4 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -636,8 +636,7 @@ mptsas_add_device_component_by_fw(MPT_ADAPTER *ioc, u8 channel, u8 id) } /** - * mptsas_add_d...
fd76175a7d3abf4d14df17f5f4c7e68b466b455d
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt fusion: Optimized SendEvent notification Using Doorbell instead FIFO
Problem Details: SendEventNotification was handled through FIFO, now it is using doorbell to communicate with hardware. Added Sleep Flag as an extra argument to support Can-Sleep feature. Resending patch including compilation error fix reviewed by Grant Grundler. Signed-off-by: Kashyap Desai <kadesai@lsi.com> Signed-...
```diff diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 54326e09629c..0d2fb0eb34b9 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -192,7 +192,8 @@ static void mpt_read_ioc_pg_1(MPT_ADAPTER *ioc); static void mpt_read_ioc_pg_4(MPT_ADAPTER...
03d6069912babc07a3da20e715dd6a5dc8f0f867
Analyze and fix the following issue in the Linux kernel code: drm/i915: Hook connector to encoder during load detection (fixes tv/vga detect)
Problem Details: With the DRM-driven DPMS code, encoders are considered idle unless a connector is hooked to them, so mode setting is skipped. This makes load detection fail as none of the hardware is enabled. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net>
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a87eeffc2c8d..b32a51f2a91d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2136,6 +2136,7 @@ struct drm_crtc *intel_get_load_detect_pipe(struct intel_output *intel_outp...
83d60795157c83389e6aaa0532d5e19afa976a24
Analyze and fix the following issue in the Linux kernel code: drm/i915: Sanity check execbuffer arguments before touching state.
Problem Details: By sending a broken execbuffer (its length was not suitably aligned) I triggered an operation upon a freed object. The invalid alignment was discovered after updating the write_domain on the object but before the object was placed on the active queue. So during the unwind process following the error, t...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 38e0f8301a14..ac22668b239a 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3050,20 +3050,12 @@ i915_dispatch_gem_execbuffer(struct drm_device *dev, drm_i915_private_t *dev_priv = dev->de...
eedc9d83eaab2d35fb9dd1ec25b765dec964e26c
Analyze and fix the following issue in the Linux kernel code: kbuild: fix headers_exports with boolean expression
Problem Details: When we had code like this in a header unifdef failed to deduct that the expression was always false - and we had code exported that was not intended for userspace. #if defined(__KERNEL__) && !defined(__ASSEMBLY__) int a; #endif This commit implment support in unidef which allows it to work out if ...
```diff diff --git a/scripts/unifdef.c b/scripts/unifdef.c index 05a31a6c7e1b..30d459fb0709 100644 --- a/scripts/unifdef.c +++ b/scripts/unifdef.c @@ -678,8 +678,10 @@ eval_unary(const struct ops *ops, int *valp, const char **cpp) if (*cp == '!') { debug("eval%d !", ops - eval_ops); cp++; - if (eval_unary(ops,...
67b7ebe091cd92fd69f732da3170720d79c4e632
Analyze and fix the following issue in the Linux kernel code: kbuild/headers_check: refine extern check
Problem Details: 'extern' checking information is not clear, refine it. Plus, fix a comment. Signed-off-by: WANG Cong <amwang@redhat.com> [sam: redid the extern error message] Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index 4414c43857ad..db1dd7a549f2 100644 --- a/scripts/headers_check.pl +++ b/scripts/headers_check.pl @@ -2,7 +2,7 @@ # # headers_check.pl execute a number of trivial consistency checks # -# Usage: headers_check.pl dir [files...] +# Usage: head...
7211b8b9028854eee0d03ee6231440b7fb492521
Analyze and fix the following issue in the Linux kernel code: kbuild: fix "Argument list too long" error for "make headers_check",
Problem Details: I'm trying to install kernel headers to build a cross-toolchain, but got the following: make ARCH=arm INSTALL_HDR_PATH=/work/psl/eldk-builds/arm-2009-04-21/work/var/tmp/crosstool-0.43-3-root/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/ +arm-linux-gnueabi/arm-linux-gnueabi/ headers_check ... CHE...
```diff diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 095cfc8b9dbf..0fcd83838771 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -54,8 +54,12 @@ quiet_cmd_remove = REMOVE $(unwanted) cmd_remove = rm -f $(unwanted-file) quiet_cmd_check = CHECK ...
a9eb522375abc79c2bf23940a067bc0046276236
Analyze and fix the following issue in the Linux kernel code: menu: fix embedded menu presentation
Problem Details: The STRIP_ASM_SYMS kconfig symbol mucks up the embedded menu because STRIP_ASM_SYMS is in the middle of the embedded menu items but it does not depend on EMBEDDED. Move it to beyond the end of the embedded menu so that the menu is presented correctly. Or if STRIP_ASM_SYMS should depend on EMBEDDED, t...
```diff diff --git a/init/Kconfig b/init/Kconfig index 7be4d3836745..4389cee99db0 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -808,14 +808,6 @@ config KALLSYMS_EXTRA_PASS you wait for kallsyms to be fixed. -config STRIP_ASM_SYMS - bool "Strip assembler-generated symbols during link" - default n - help - ...
ad6ccfad6f759a5d657dabe2071a8f2a503fcc84
Analyze and fix the following issue in the Linux kernel code: kernel/kallsyms.c: replace deprecated __initcall with device_initcall and fix whitespace
Problem Details: Fix coding style whitespace issues and replace __initcall with device_initcall. Fixed multi-line comments as per coding style. Errors as reported by checkpatch.pl :- Before: total: 14 errors, 14 warnings, 487 lines checked After : total: 0 errors, 8 warnings, 507 lines checked Compile tested binary ...
```diff diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 374faf9bfdc7..3a29dbe7898e 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c @@ -30,12 +30,16 @@ #define all_var 0 #endif -/* These will be re-linked against their real values during the second link stage */ +/* + * These will be re-linked agains...
284026cdfb5a899e558dcb7a36aefaf54a78c094
Analyze and fix the following issue in the Linux kernel code: kconfig: do not hardcode ".config" filename
Problem Details: Rather than hardcoding ".config" use conf_get_configname(), which also respects the environment variable KCONFIG_CONFIG. This fixes "make silentoldconfig" when KCONFIG_CONFIG is used and also suggests the given filename for "Load" and "Save as" in qconf. Signed-off-by: Markus Heidelberg <markus.heide...
```diff diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index d190092c3b6e..3baaaecd6b13 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -498,14 +498,15 @@ int main(int ac, char **av) conf_parse(name); //zconfdump(stdout); if (sync_kconfig) { - if (stat(".config", &tmpstat)) { + ...
8d90c97e46930d01e9394bceb6276c7175136bdc
Analyze and fix the following issue in the Linux kernel code: kconfig qconf: fix the type of the desktop widget
Problem Details: QApplication::desktop() returns a pointer to QDesktopWidget, not to QWidget. Fixes the following compiler error after a quick conversion with 'qt3to4', which occured with g++ 3.4.6 and 4.1.2, but not anymore with 4.3.2. scripts/kconfig/qconf.cc: In constructor 'ConfigMainWindow::ConfigMainWindow()': ...
```diff diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index afae613ae0d8..19811fcca6d6 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -5,6 +5,7 @@ #include <qapplication.h> #include <qmainwindow.h> +#include <qdesktopwidget.h> #include <qtoolbar.h> #include <qlayout.h> ...
fbb86374445d97072dd994f1a4adf023bfd1e86e
Analyze and fix the following issue in the Linux kernel code: kconfig qconf: add namespace for use of Key_ enum values
Problem Details: They are defined in the 'Qt' namespace. Fixes the following compiler errors after a quick conversion with 'qt3to4', which occured with g++ 3.4.6 and 4.1.2, but not anymore with 4.3.2. scripts/kconfig/qconf.cc: In member function 'virtual void ConfigLineEdit::keyPressEvent(QKeyEvent*)': scripts/kconfi...
```diff diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 7433dac6b90a..afae613ae0d8 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -297,10 +297,10 @@ void ConfigLineEdit::show(ConfigItem* i) void ConfigLineEdit::keyPressEvent(QKeyEvent* e) { switch (e->key()) { - case ...
7298b936017859fce4906e38f485c131520fe857
Analyze and fix the following issue in the Linux kernel code: kconfig qconf: fix namespace for Horizontal and Vertical enum values
Problem Details: They were used as QSplitter::Horizontal resp. QSplitter::Vertical, but are defined in the 'Qt' namespace. Fixes the following compiler errors after a quick conversion with 'qt3to4', which occured with g++ 3.4.6 and 4.1.2, but not anymore with 4.3.2. scripts/kconfig/qconf.cc: In constructor 'ConfigSea...
```diff diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 2bd6ed021aac..7433dac6b90a 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1199,7 +1199,7 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam layout1->addLayout(layout2); split =...
98403a91389d11edd954e8f89dcffc3db525657f
Analyze and fix the following issue in the Linux kernel code: kconfig qconf: fix -Wall compiler warnings
Problem Details: These compiler warnings occure when adding -Wall to HOSTCXXFLAGS in /Makefile scripts/kconfig/qconf.h: In constructor ‘ConfigInfoView::ConfigInfoView(QWidget*, const char*)’: scripts/kconfig/qconf.h:274: warning: ‘ConfigInfoView::menu’ will be initialized after scripts/kconfig/qconf.h:273: warning: ...
```diff diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 5d0fd38b089b..2bd6ed021aac 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -920,7 +920,7 @@ void ConfigView::updateListAll(void) } ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) - : Parent(paren...
6f26e5e412ddc23e1d698390243e39802410ab15
Analyze and fix the following issue in the Linux kernel code: kconfig: fix typo "mconfig" to "menuconfig" in a comment
Problem Details: Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index fa8c2dd9c983..47e3f2e2af4f 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -104,7 +104,7 @@ HOST_EXTRACFLAGS += -DLOCALE # =========================================================================== # Shared Makefil...
54c3355658bb66bbe20aef9b6297d72ac85571f4
Analyze and fix the following issue in the Linux kernel code: kbuild, deb-pkg: fix Section field
Problem Details: Section "base" has been removed, the base is defined by Priority field. For Squeeze the section should be "kernel", but as that's not yet supported for Sarge and Etch we stay with admin for now. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Frans Pop <elendil@planet.nl> Cc: Andres Sal...
```diff diff --git a/scripts/package/builddeb b/scripts/package/builddeb index e1dd1892eb30..9708d265cdac 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -144,7 +144,7 @@ EOF # Generate a control file cat <<EOF > debian/control Source: linux-upstream -Section: base +Section: admin Priority: ...
8ebc2fe9c5e502a0f34be498b0732bb3b897b12d
Analyze and fix the following issue in the Linux kernel code: kbuild, deb-pkg: fix Provides field
Problem Details: kernel-image naming has been dropped for the Lenny release and was only transitional for Etch. As it builds modules it provides linux-modules-$version. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Frans Pop <elendil@planet.nl> Cc: Andres Salomon <dilinger@debian.org> Signed-off-by: S...
```diff diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 1ade570b3c60..e1dd1892eb30 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -154,7 +154,7 @@ if [ "$ARCH" = "um" ]; then cat <<EOF >> debian/control Package: $packagename -Provides: kernel-image-$version, linux-im...
f7a2c31f1e4e622056c8a14260937e87f1277867
Analyze and fix the following issue in the Linux kernel code: kbuild, deb-pkg: fix generated package name
Problem Details: The binary package that make deb-pkg creates is a linux-image. To be fixed may also be the addition of $DEB_ARCH. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Frans Pop <elendil@planet.nl> Cc: Andres Salomon <dilinger@debian.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 6d3b7e59637f..1ade570b3c60 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -36,7 +36,7 @@ else fi tmpdir="$objtree/debian/tmp" fwdir="$objtree/debian/fwtmp" -packagename=linux-$version +packagename=linux-image-$ver...
a89b433bddea41a743d7937c87be5290ef4f1057
Analyze and fix the following issue in the Linux kernel code: kbuild, deb-pkg: fix 'file not found' error when building .deb package for arm
Problem Details: Not all architectures prepend the $(boot) path in $(KBUILD_IMAGE). Allow for that fact in the builddeb script. Example is arm. Signed-off-by: Frans Pop <elendil@planet.nl> Acked-by: maximilian attems <max@stro.at> Cc: Andres Salomon <dilinger@debian.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/package/builddeb b/scripts/package/builddeb index feebd69c2eea..4876ff3154a1 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -53,7 +53,10 @@ if [ "$ARCH" = "um" ] ; then else cp System.map "$tmpdir/boot/System.map-$version" cp .config "$tmpdir/boot/config-$vers...
4f66199b4b372a530333d0f25aeb5d80362241ed
Analyze and fix the following issue in the Linux kernel code: kbuild, deb-pkg: minor general improvements in builddeb script
Problem Details: Minor coding style improvements and typo fix in leading comment. Signed-off-by: Frans Pop <elendil@planet.nl> Cc: Andres Salomon <dilinger@debian.org> Acked-by: maximilian attems <max@stro.at> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 1264b8e2829d..eff7f9de30dc 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -4,7 +4,7 @@ # Copyright 2003 Wichert Akkerman <wichert@wiggy.net> # # Simple script to generate a deb package for a Linux kernel. All the ...
6556d1df88fe68f9836beeb43342a336691cb67c
Analyze and fix the following issue in the Linux kernel code: tracing: fix the block trace points print size
Problem Details: The sector field is either u64 or unsigned long depending on the arch. This patch casts the sector to unsigned long long to prevent the printf warnings. [ Impact: remove compile warnings ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
```diff diff --git a/include/trace/events/block.h b/include/trace/events/block.h index a99d1e565bb0..53effd496a50 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h @@ -37,7 +37,8 @@ TRACE_EVENT(block_rq_abort, TP_printk("%d,%d %s (%s) %llu + %u [%d]", MAJOR(__entry->dev), MINOR(__entry...
55782138e47d9baf2f7d3a7af9e7cf42adf72c56
Analyze and fix the following issue in the Linux kernel code: tracing/events: convert block trace points to TRACE_EVENT()
Problem Details: TRACE_EVENT is a more generic way to define tracepoints. Doing so adds these new capabilities to this tracepoint: - zero-copy and per-cpu splice() tracing - binary tracing without printf overhead - structured logging records exposed under /debug/tracing/events - trace events embedded in functi...
```diff diff --git a/block/blk-core.c b/block/blk-core.c index 1306de9cce04..9475bf99b891 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -28,22 +28,14 @@ #include <linux/task_io_accounting_ops.h> #include <linux/blktrace_api.h> #include <linux/fault-inject.h> -#include <trace/block.h> + +#define CREATE_TRAC...