]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge remote-tracking branch 'kmemleak/kmemleak'
Stephen Rothwell [Thu, 11 Oct 2012 00:52:45 +0000 (11:52 +1100)]
Merge remote-tracking branch 'kmemleak/kmemleak'

Conflicts:
mm/kmemleak.c

11 years agoMerge remote-tracking branch 'rcu/rcu/next'
Stephen Rothwell [Thu, 11 Oct 2012 00:50:41 +0000 (11:50 +1100)]
Merge remote-tracking branch 'rcu/rcu/next'

11 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Thu, 11 Oct 2012 00:43:11 +0000 (11:43 +1100)]
Merge remote-tracking branch 'tip/auto-latest'

Conflicts:
mm/huge_memory.c
mm/mempolicy.c

11 years agoMerge remote-tracking branch 'spi-mb/spi-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:41:24 +0000 (11:41 +1100)]
Merge remote-tracking branch 'spi-mb/spi-next'

11 years agoMerge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:41:12 +0000 (11:41 +1100)]
Merge remote-tracking branch 'edac-amd/for-next'

Conflicts:
Documentation/edac.txt
drivers/edac/amd64_edac.c

11 years agoMerge remote-tracking branch 'edac/linux_next'
Stephen Rothwell [Thu, 11 Oct 2012 00:39:13 +0000 (11:39 +1100)]
Merge remote-tracking branch 'edac/linux_next'

11 years agoMerge remote-tracking branch 'fsnotify/for-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:37:34 +0000 (11:37 +1100)]
Merge remote-tracking branch 'fsnotify/for-next'

Conflicts:
kernel/audit_tree.c

11 years agoMerge remote-tracking branch 'vfio/next'
Stephen Rothwell [Thu, 11 Oct 2012 00:35:24 +0000 (11:35 +1100)]
Merge remote-tracking branch 'vfio/next'

11 years agoMerge remote-tracking branch 'watchdog/master'
Stephen Rothwell [Thu, 11 Oct 2012 00:33:38 +0000 (11:33 +1100)]
Merge remote-tracking branch 'watchdog/master'

11 years agoMerge remote-tracking branch 'selinux/master'
Stephen Rothwell [Thu, 11 Oct 2012 00:33:32 +0000 (11:33 +1100)]
Merge remote-tracking branch 'selinux/master'

11 years agoMerge remote-tracking branch 'fbdev/fbdev-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:31:48 +0000 (11:31 +1100)]
Merge remote-tracking branch 'fbdev/fbdev-next'

Conflicts:
arch/arm/mach-s3c64xx/mach-mini6410.c
arch/arm/mach-s3c64xx/mach-real6410.c
drivers/video/epson1355fb.c
drivers/video/msm/mddi.c
drivers/video/msm/mdp.c
drivers/video/msm/mdp_hw.h
drivers/video/omap/lcd_ams_delta.c
drivers/video/omap2/displays/panel-taal.c
drivers/video/omap2/dss/dispc.c

11 years agoMerge remote-tracking branch 'md/for-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:26:29 +0000 (11:26 +1100)]
Merge remote-tracking branch 'md/for-next'

Conflicts:
drivers/md/raid0.c
fs/bio.c

11 years agoMerge remote-tracking branch 'kgdb/kgdb-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:24:26 +0000 (11:24 +1100)]
Merge remote-tracking branch 'kgdb/kgdb-next'

11 years agoMerge remote-tracking branch 'mmc/mmc-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:22:45 +0000 (11:22 +1100)]
Merge remote-tracking branch 'mmc/mmc-next'

11 years agoMerge branch 'quilt/device-mapper'
Stephen Rothwell [Thu, 11 Oct 2012 00:20:56 +0000 (11:20 +1100)]
Merge branch 'quilt/device-mapper'

Conflicts:
drivers/md/dm-thin.c
drivers/md/dm.c

11 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:13:54 +0000 (11:13 +1100)]
Merge remote-tracking branch 'block/for-next'

Conflicts:
init/Kconfig

11 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:13:45 +0000 (11:13 +1100)]
Merge remote-tracking branch 'cgroup/for-next'

11 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Thu, 11 Oct 2012 00:11:40 +0000 (11:11 +1100)]
Merge remote-tracking branch 'input/next'

11 years agoMerge remote-tracking branch 'modules/modules-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:06:17 +0000 (11:06 +1100)]
Merge remote-tracking branch 'modules/modules-next'

Conflicts:
Makefile
arch/Kconfig
arch/alpha/Kconfig
arch/arm/Kconfig
arch/cris/include/asm/Kbuild
arch/h8300/include/asm/Kbuild
arch/m32r/include/asm/Kbuild
arch/s390/Kconfig
arch/x86/Kconfig
arch/x86/um/Kconfig
arch/xtensa/Kconfig
init/Kconfig
lib/Makefile

11 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Thu, 11 Oct 2012 00:01:08 +0000 (11:01 +1100)]
Merge remote-tracking branch 'sound-asoc/for-next'

11 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Wed, 10 Oct 2012 23:23:00 +0000 (10:23 +1100)]
Merge remote-tracking branch 'sound/for-next'

11 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Wed, 10 Oct 2012 23:21:10 +0000 (10:21 +1100)]
Merge remote-tracking branch 'l2-mtd/master'

11 years agoMerge remote-tracking branch 'mtd/master'
Stephen Rothwell [Wed, 10 Oct 2012 23:19:35 +0000 (10:19 +1100)]
Merge remote-tracking branch 'mtd/master'

11 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Wed, 10 Oct 2012 23:17:54 +0000 (10:17 +1100)]
Merge remote-tracking branch 'bluetooth/master'

11 years agoMerge remote-tracking branch 'scsi/for-next'
Stephen Rothwell [Wed, 10 Oct 2012 23:15:33 +0000 (10:15 +1100)]
Merge remote-tracking branch 'scsi/for-next'

11 years agoMerge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Wed, 10 Oct 2012 23:13:49 +0000 (10:13 +1100)]
Merge remote-tracking branch 'ieee1394/for-next'

11 years agoMerge remote-tracking branch 'cpuidle/cpuidle-next'
Stephen Rothwell [Wed, 10 Oct 2012 23:13:40 +0000 (10:13 +1100)]
Merge remote-tracking branch 'cpuidle/cpuidle-next'

Conflicts:
drivers/cpuidle/coupled.c
include/linux/cpuidle.h

11 years agoMerge remote-tracking branch 'acpi/next'
Stephen Rothwell [Wed, 10 Oct 2012 23:11:54 +0000 (10:11 +1100)]
Merge remote-tracking branch 'acpi/next'

11 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Wed, 10 Oct 2012 23:09:55 +0000 (10:09 +1100)]
Merge remote-tracking branch 'kbuild/for-next'

11 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Wed, 10 Oct 2012 23:07:56 +0000 (10:07 +1100)]
Merge remote-tracking branch 'v4l-dvb/master'

Conflicts:
arch/arm/mach-davinci/include/mach/da8xx.h

11 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Wed, 10 Oct 2012 23:06:07 +0000 (10:06 +1100)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

11 years agoMerge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Wed, 10 Oct 2012 23:04:36 +0000 (10:04 +1100)]
Merge branch 'quilt/jdelvare-hwmon'

11 years agoMerge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'
Stephen Rothwell [Wed, 10 Oct 2012 23:02:59 +0000 (10:02 +1100)]
Merge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'

Conflicts:
drivers/i2c/busses/i2c-omap.c

11 years agoMerge branch 'quilt/i2c'
Stephen Rothwell [Wed, 10 Oct 2012 23:01:17 +0000 (10:01 +1100)]
Merge branch 'quilt/i2c'

11 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Wed, 10 Oct 2012 23:01:15 +0000 (10:01 +1100)]
Merge remote-tracking branch 'hid/for-next'

Conflicts:
drivers/hid/hid-multitouch.c

11 years agoMerge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Wed, 10 Oct 2012 22:54:29 +0000 (09:54 +1100)]
Merge remote-tracking branch 'vfs/for-next'

11 years agoMerge remote-tracking branch 'ubifs/linux-next'
Stephen Rothwell [Wed, 10 Oct 2012 22:52:56 +0000 (09:52 +1100)]
Merge remote-tracking branch 'ubifs/linux-next'

11 years agoMerge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Wed, 10 Oct 2012 22:51:19 +0000 (09:51 +1100)]
Merge remote-tracking branch 'v9fs/for-next'

11 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Wed, 10 Oct 2012 22:49:29 +0000 (09:49 +1100)]
Merge remote-tracking branch 'ocfs2/linux-next'

11 years agoMerge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Wed, 10 Oct 2012 22:47:47 +0000 (09:47 +1100)]
Merge remote-tracking branch 'nfsd/nfsd-next'

11 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Wed, 10 Oct 2012 22:45:57 +0000 (09:45 +1100)]
Merge remote-tracking branch 'nfs/linux-next'

11 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Wed, 10 Oct 2012 22:44:22 +0000 (09:44 +1100)]
Merge remote-tracking branch 'logfs/master'

11 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Wed, 10 Oct 2012 22:42:40 +0000 (09:42 +1100)]
Merge remote-tracking branch 'fuse/for-next'

11 years agoMerge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Wed, 10 Oct 2012 22:41:07 +0000 (09:41 +1100)]
Merge remote-tracking branch 'ext3/for_next'

11 years agoMerge remote-tracking branch 'xtensa/for_next'
Stephen Rothwell [Wed, 10 Oct 2012 22:41:00 +0000 (09:41 +1100)]
Merge remote-tracking branch 'xtensa/for_next'

Conflicts:
arch/xtensa/boot/boot-elf/Makefile
scripts/mod/modpost.c

11 years agoMerge remote-tracking branch 'unicore32/unicore32'
Stephen Rothwell [Wed, 10 Oct 2012 22:39:19 +0000 (09:39 +1100)]
Merge remote-tracking branch 'unicore32/unicore32'

11 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Wed, 10 Oct 2012 22:37:36 +0000 (09:37 +1100)]
Merge remote-tracking branch 'mpc5xxx/next'

11 years agoMerge remote-tracking branch 'openrisc/for-upstream'
Stephen Rothwell [Wed, 10 Oct 2012 22:35:39 +0000 (09:35 +1100)]
Merge remote-tracking branch 'openrisc/for-upstream'

11 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Wed, 10 Oct 2012 22:34:07 +0000 (09:34 +1100)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

11 years agoMerge remote-tracking branch 'microblaze/next'
Stephen Rothwell [Wed, 10 Oct 2012 22:32:37 +0000 (09:32 +1100)]
Merge remote-tracking branch 'microblaze/next'

11 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Wed, 10 Oct 2012 22:31:03 +0000 (09:31 +1100)]
Merge remote-tracking branch 'ia64/next'

11 years agoMerge remote-tracking branch 'c6x/for-linux-next'
Stephen Rothwell [Wed, 10 Oct 2012 22:29:31 +0000 (09:29 +1100)]
Merge remote-tracking branch 'c6x/for-linux-next'

11 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Wed, 10 Oct 2012 22:28:01 +0000 (09:28 +1100)]
Merge remote-tracking branch 'blackfin/for-linus'

11 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Stephen Rothwell [Wed, 10 Oct 2012 22:27:50 +0000 (09:27 +1100)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

Conflicts:
arch/arm/kernel/hw_breakpoint.c
arch/arm/mach-bcmring/arch.c
arch/arm/mach-omap2/devices.c
arch/arm/mach-tegra/devices.c
arch/arm/mach-ux500/cpu-db8500.c

11 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Wed, 10 Oct 2012 22:23:53 +0000 (09:23 +1100)]
Merge remote-tracking branch 'arm/for-next'

11 years agoMerge remote-tracking branch 'spi-current/spi/merge'
Stephen Rothwell [Wed, 10 Oct 2012 22:16:50 +0000 (09:16 +1100)]
Merge remote-tracking branch 'spi-current/spi/merge'

11 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Wed, 10 Oct 2012 22:16:33 +0000 (09:16 +1100)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

11 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Wed, 10 Oct 2012 22:15:59 +0000 (09:15 +1100)]
Merge remote-tracking branch 'tty.current/tty-linus'

11 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Wed, 10 Oct 2012 22:15:52 +0000 (09:15 +1100)]
Merge remote-tracking branch 'net/master'

11 years agoMerge remote-tracking branch 'powerpc-merge/merge'
Stephen Rothwell [Wed, 10 Oct 2012 22:15:51 +0000 (09:15 +1100)]
Merge remote-tracking branch 'powerpc-merge/merge'

11 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Wed, 10 Oct 2012 22:15:47 +0000 (09:15 +1100)]
Merge remote-tracking branch 'arm-current/fixes'

11 years agohwmon: Drop needless includes of <linux/delay.h>
Jean Delvare [Wed, 10 Oct 2012 21:43:52 +0000 (08:43 +1100)]
hwmon: Drop needless includes of <linux/delay.h>

These drivers use no sleep or delay functions so they don't need to
include <linux/delay.h>.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: Rudolf Marek <r.marek@assembler.cz>
11 years agohwmon: Add missing inclusions of <linux/err.h>
Jean Delvare [Wed, 10 Oct 2012 21:43:52 +0000 (08:43 +1100)]
hwmon: Add missing inclusions of <linux/err.h>

These drivers use IS_ERR so they should include <linux/err.h>.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Luca Tettamanti <kronos.it@gmail.com>
Cc: Henrik Rydberg <rydberg@euromail.se>
11 years agohwmon: Add missing inclusions of <linux/jiffies.h>
Jean Delvare [Wed, 10 Oct 2012 21:43:51 +0000 (08:43 +1100)]
hwmon: Add missing inclusions of <linux/jiffies.h>

Many hwmon drivers use jiffies but omit the inclusion of the header
file. Fix that, and also fix one driver which was including the header
file but didn't need it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Luca Tettamanti <kronos.it@gmail.com>
Cc: Marc Hulsman <m.hulsman@tudelft.nl>
Cc: Rudolf Marek <r.marek@assembler.cz>
11 years agohwmon: Fix spelling of Celsius
Peter Meerwald [Wed, 10 Oct 2012 21:43:51 +0000 (08:43 +1100)]
hwmon: Fix spelling of Celsius

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
11 years agohwmon: Update Alexey Fisher's name
Oleksij Rempel [Wed, 10 Oct 2012 21:43:50 +0000 (08:43 +1100)]
hwmon: Update Alexey Fisher's name

My name was change after migration.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
11 years agoi2c-stub: Move to drivers/i2c
Jean Delvare [Wed, 10 Oct 2012 21:43:47 +0000 (08:43 +1100)]
i2c-stub: Move to drivers/i2c

Move the i2c-stub driver to drivers/i2c, to match the Kconfig entry.
This is less confusing that way.

I also fixed all checkpatch warnings and errors.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Peter Huewe <peterhuewe@gmx.de>
11 years agoMerge tag 'master-2012-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil...
David S. Miller [Wed, 10 Oct 2012 15:59:54 +0000 (11:59 -0400)]
Merge tag 'master-2012-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

John W. Linville says:

====================
Here is a batch of fixes intended for 3.7...

Amitkumar Karwar provides a couple of mwifiex fixes to correctly
report some reason codes for certain connection failures.  He also
provides a fix to cleanup after a scanning failure.  Bing Zhao rounds
that out with another mwifiex scanning fix.

Daniel Golle gives us a fix for a copy/paste error in rt2x00.

Felix Fietkau brings a couple of ath9k fixes related to suspend/resume,
and a couple of fixes to prevent memory leaks in ath9k and mac80211.

Ronald Wahl sends a carl9170 fix for a sleep in softirq context.

Thomas Pedersen reorders some code to prevent drv_get_tsf from being
called while holding a spinlock, now that it can sleep.

Finally, Wei Yongjun prevents a NULL pointer dereference in the
ath5k driver.

Please let me know if there are problems!
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoALSA: hda - do not detect jack on internal speakers for Realtek
David Henningsson [Wed, 10 Oct 2012 14:32:09 +0000 (16:32 +0200)]
ALSA: hda - do not detect jack on internal speakers for Realtek

This caused the internal speaker to mute itself because it was
present, which happened after powersave.
It was found on Dell XPS 15 (L502x), ALC665.

Reported-by: Da Fox <da.fox.mail@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agomtd: fsl_elbc_nand: remove unnecessary badblock_pattern
Brian Norris [Wed, 26 Sep 2012 23:15:27 +0000 (16:15 -0700)]
mtd: fsl_elbc_nand: remove unnecessary badblock_pattern

Since the introduction of nand_create_default_bbt_descr() (now known as
nand_create_badblock_pattern()) in

  commit 58373ff0afff4cc8ac40608872995f4d87eb72ec

nand_chip.badblock_pattern will be dynamically calculated to the same
1-byte-length pattern that is required by fsl_elbc_nand. This custom
badblock_pattern is no longer needed, then, and its removal may help
facilitate further nand_bbt.c/nand_base.c cleanup in the future (one
down, many to go?)

Anyway, with nand_bbt.c fixed, this effectively reverts:

  commit 452db2724351ff3d9416a183a7955e00ab4e6ab4
  [MTD] [NAND] fsl_elbc_nand: fix OOB workability for large page NAND chips

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agomtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions()
Sachin Kamat [Tue, 25 Sep 2012 09:57:13 +0000 (15:27 +0530)]
mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions()

The pointer returned by kzalloc should be tested for NULL
to avoid potential NULL pointer dereference later. Incorrect
pointer was being tested for NULL. Bug introduced by commit fbcf62a3
(mtd: physmap_of: move parse_obsolete_partitions to become separate
parser).
This patch fixes this bug.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: stable@vger.kernel.org [3.2+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agomtd: m25p80: add support for the windbond w25q256 chip
Matthieu CASTET [Tue, 25 Sep 2012 09:05:27 +0000 (11:05 +0200)]
mtd: m25p80: add support for the windbond w25q256 chip

Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoMIPS: Remove unused empty_bad_pmd_table[] declaration.
Ralf Baechle [Wed, 10 Oct 2012 14:24:14 +0000 (16:24 +0200)]
MIPS: Remove unused empty_bad_pmd_table[] declaration.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agomtd: m25p80: Make fast read configurable via DT
Marek Vasut [Mon, 24 Sep 2012 01:39:39 +0000 (03:39 +0200)]
mtd: m25p80: Make fast read configurable via DT

Add DT property "m25p,fast-read" that signalises the particular
chip supports "fast read" opcode.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agomtd: gpmi-nand: make debug prints more clear
Vikram Narayanan [Sun, 23 Sep 2012 09:48:32 +0000 (15:18 +0530)]
mtd: gpmi-nand: make debug prints more clear

Make the error messages more debugging friendly

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agomtd: cmdlinepart: Simplify parse_cmdline_partitions
Shmulik Ladkani [Sun, 23 Sep 2012 07:52:29 +0000 (09:52 +0200)]
mtd: cmdlinepart: Simplify parse_cmdline_partitions

Simply 'parse_cmdline_partitions': the outer loop iterating over
'partitions' is actually a search loop, it does not execute the inner
loop for each partition, only for the matched partition.

Let's break when search is successful, and move all inner code (relevant
only for the matched partition) outside of the outer loop.

Resulting code is much more readable, and makes the indent level sane.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoALSA: hda - Fix missing beep on ASUS X43U notebook
Duncan Roe [Wed, 10 Oct 2012 12:19:50 +0000 (14:19 +0200)]
ALSA: hda - Fix missing beep on ASUS X43U notebook

Signed-off-by: Duncan Roe <duncan_roe@acslink.net.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoRevert "memory-hotplug: suppress "Trying to free nonexistent resource <XXXXXXXXXXXXXX...
Stephen Rothwell [Wed, 10 Oct 2012 12:04:16 +0000 (23:04 +1100)]
Revert "memory-hotplug: suppress "Trying to free nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning"

This reverts commit d760afd4d2570653891f94e13b848e97150dc5a6.

11 years agoMerge tag 'for-3.7-rc1' of git://gitorious.org/linux-pwm/linux-pwm
Linus Torvalds [Wed, 10 Oct 2012 11:15:24 +0000 (20:15 +0900)]
Merge tag 'for-3.7-rc1' of git://gitorious.org/linux-pwm/linux-pwm

Pull pwm changes from Thierry Reding:
 "All legacy PWM providers have now been moved to the PWM subsystem.
  The plan for 3.8 is to adapt all board files to provide a lookup table
  for PWM devices in order to get rid of the global namespace.
  Subsequently, users of the legacy pwm_request() and pwm_free()
  functions can be migrated to the new pwm_get() and pwm_put()
  functions.  Once this has been completed, the legacy API and the
  compatibility code in the core can be removed.

  In addition to the above, these changes also add support for
  configuring the polarity of a PWM signal (currently only supported on
  ECAP and EHRPWM) and include a much needed rework of the i.MX driver.
  Managed functions to obtain and release a PWM device (devm_pwm_get()
  and devm_pwm_put()) have been added and the pwm-backlight driver has
  been updated to use them.  If the PWM subsystem hasn't been enabled,
  dummy functions are provided that allow the subsystem to safely
  compile out.

  Some common checks on input parameters have been moved to the core and
  removed from the drivers.  Finally, a small fix corrects the
  description of the PWM specifier's second cell in the device tree
  representation."

* tag 'for-3.7-rc1' of git://gitorious.org/linux-pwm/linux-pwm: (23 commits)
  pwm: dt: Fix description of second PWM cell
  pwm: Check for negative duty-cycle and period
  pwm: Add Ingenic JZ4740 support
  MIPS: JZ4740: Export timer API
  pwm: Move PUV3 PWM driver to PWM framework
  unicore32: pwm: Use managed resource allocations
  unicore32: pwm: Remove unnecessary indirection
  unicore32: pwm: Use module_platform_driver()
  unicore32: pwm: Properly remap memory-mapped registers
  pwm-backlight: Use devm_pwm_get() instead of pwm_get()
  pwm: Move AB8500 PWM driver to PWM framework
  pwm: Fix compilation error when CONFIG_PWM is not defined
  pwm: i.MX: fix clock lookup
  pwm: i.MX: use per clock unconditionally
  pwm: i.MX: add devicetree support
  pwm: i.MX: Use module_platform_driver
  pwm: i.MX: add functions to enable/disable pwm.
  pwm: i.MX: remove unnecessary if in pwm_[en|dis]able
  pwm: i.MX: factor out SoC specific functions
  pwm: pwm-tiehrpwm: Add support for configuring polarity of PWM
  ...

11 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Wed, 10 Oct 2012 11:14:07 +0000 (20:14 +0900)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds

Pull LED subsystem update from Bryan Wu.

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (24 commits)
  leds: add output driver configuration for pca9633 led driver
  leds: lm3642: Use regmap_update_bits() in lm3642_chip_init()
  leds: Add new LED driver for lm3642 chips
  leds-lp5523: Fix riskiness of the page fault
  leds-lp5523: turn off the LED engines on unloading the driver
  leds-lm3530: Fix smatch warnings
  leds-lm3530: Use devm_regulator_get function
  leds: leds-gpio: adopt pinctrl support
  leds: Add new LED driver for lm355x chips
  leds-lp5523: use the i2c device id rather than fixed name
  leds-lp5523: add new device id for LP55231
  leds-lp5523: support new LP55231 device
  leds: triggers: send uevent when changing triggers
  leds-lp5523: minor code style fixes
  leds-lp5523: change the return type of lp5523_set_mode()
  leds-lp5523: set the brightness to 0 forcely on removing the driver
  leds-lp5523: add channel name in the platform data
  leds: leds-gpio: Use of_get_child_count() helper
  leds: leds-gpio: Use platform_{get,set}_drvdata
  leds: leds-gpio: use of_match_ptr()
  ...

11 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
Linus Torvalds [Wed, 10 Oct 2012 10:52:19 +0000 (19:52 +0900)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending

Pull scsi target updates from Nicholas Bellinger:
 "Things have been calm for the most part with no new fabric drivers in
  flight for v3.7 (we're up to eight now !), so this update is primarily
  focused on addressing a few long-standing items within target-core and
  iscsi-target fabric code.

  The highlights include:

   - target: Simplify fabric sense data length handling (roland)
   - qla2xxx: Fix endianness of task management response code (roland)
   - target: fix truncation of mode data, support zero allocation length
     (paolo)
   - target: Properly support zero-length commands in normal processing
     path (paolo)
   - iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT
     PDU (ronnie + nab)
   - iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG
     demo-mode (ronnie + nab)
   - target/file: Re-enable optional fd_buffered_io=1 operation (nab +
     hch)
   - iscsi-target: Add MaxXmitDataSegmenthLength forr target ->
     initiator MDRSL declaration (nab)
   - target: Add target_submit_cmd_map_sgls for SGL fabric memory
     passthrough (nab + hch)
   - tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls (hch +
     nab)
   - tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls (nab
     + hch)

  The last series for adding a new target_submit_cmd_map_sgls() fabric
  caller (as requested by hch) that accepts pre-allocated SGL memory
  (using existing logic), along with converting tcm_loop + tcm_vhost has
  only been in -next for the last days, but has gotten enough review
  +testing and is clear enough a mechanical change that I think it's
  reasonable to merge for -rc1 code.

  Thanks again to everyone who contributed this round! Extra special
  thanks to Roland (PureStorage) for tracking down the qla2xxx target
  TMR response code endian issue, and to Paolo (Redhat) for resolving
  the long standing zero-length CDB issues within target-core between
  virtual and pSCSI backends."

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (44 commits)
  iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values
  iscsit: proper endianess conversions
  iscsit: use the itt_t abstract type
  iscsit: add missing endianess conversion in iscsit_check_inaddr_any
  iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp
  iscsit: mark various functions static
  target/iscsi: precedence bug in iscsit_set_dataout_sequence_values()
  target/usb-gadget: strlen() doesn't count the terminator
  target/usb-gadget: remove duplicate initialization
  tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls
  target: Add control CDB READ payload zero work-around
  tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls
  target: Add target_submit_cmd_map_sgls for SGL fabric memory passthrough
  iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode
  iscsi-target: Change iscsi_target_seq_pdu_list.c to honor MaxXmitDataSegmentLength
  iscsi-target: Add MaxXmitDataSegmentLength connection recovery check
  iscsi-target: Convert incoming PDU payload checks to MaxXmitDataSegmentLength
  iscsi-target: Enable MaxXmitDataSegmentLength operation in login path
  iscsi-target: Add base MaxXmitDataSegmentLength code
  target/file: Re-enable optional fd_buffered_io=1 operation
  ...

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Wed, 10 Oct 2012 10:48:33 +0000 (19:48 +0900)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull second s390 update from Martin Schwidefsky:
 "The big thing in this pull request is the UAPI patch from David, and
  worth mentioning is the page table dumper.  The rest are small
  improvements and bug fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/entry: fix svc number for TIF_SYSCALL system call restart
  s390/mm,vmem: fix vmem_add_mem()/vmem_remove_range()
  s390/vmalloc: have separate modules area
  s390/zcrypt: remove duplicated include from zcrypt_pcixcc.c
  s390/css_chars: remove superfluous ifdef
  s390/chsc: make headers usable
  s390/mm: let kernel text section always begin at 1MB
  s390/mm: fix mapping of read-only kernel text section
  s390/mm: add page table dumper
  s390: add support to start the kernel in 64 bit mode.
  s390/mm,pageattr: remove superfluous EXPORT_SYMBOLs
  s390/mm,pageattr: add more page table walk sanity checks
  s390/mm: fix pmd_huge() usage for kernel mapping
  s390/dcssblk: cleanup device attribute usage
  s390/mm: use pfmf instruction to initialize storage keys
  s390/facilities: cleanup PFMF and HPAGE machine facility detection
  UAPI: (Scripted) Disintegrate arch/s390/include/asm

11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Wed, 10 Oct 2012 10:47:12 +0000 (19:47 +0900)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull nouveau drm fixes from Dave Airlie:
 "Just a bunch of nouveau fixes, Ben wants to get some alternate
  versions into stable."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau/timer: bump ptimer's alarm delay from u32 to u64
  drm/nouveau/fan: fix a typo in PWM's input clock calculation
  drm/nv50/clk: wire up pll_calc hook
  drm/nouveau: remove unused _nouveau_parent_ctor
  drm/nouveau/bios: fix shadowing of ACPI ROMs larger than 64KiB

11 years agoX.509: Fix indefinite length element skip error handling
David Howells [Thu, 4 Oct 2012 13:21:23 +0000 (14:21 +0100)]
X.509: Fix indefinite length element skip error handling

asn1_find_indefinite_length() returns an error indicator of -1, which the
caller asn1_ber_decoder() places in a size_t (which is usually unsigned) and
then checks to see whether it is less than 0 (which it can't be).  This can
lead to the following warning:

lib/asn1_decoder.c:320 asn1_ber_decoder()
warn: unsigned 'len' is never less than zero.

Instead, asn1_find_indefinite_length() update the caller's idea of the data
cursor and length separately from returning the error code.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoX.509: Convert some printk calls to pr_devel
David Howells [Thu, 4 Oct 2012 13:21:23 +0000 (14:21 +0100)]
X.509: Convert some printk calls to pr_devel

Some debugging printk() calls should've been converted to pr_devel() calls.
Do that now.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoasymmetric keys: fix printk format warning
Randy Dunlap [Wed, 3 Oct 2012 23:04:46 +0000 (16:04 -0700)]
asymmetric keys: fix printk format warning

Fix printk format warning in x509_cert_parser.c:

crypto/asymmetric_keys/x509_cert_parser.c: In function 'x509_note_OID':
crypto/asymmetric_keys/x509_cert_parser.c:113:3: warning: format '%zu' expects type 'size_t', but argument 2 has type 'long unsigned int'

Builds cleanly on i386 and x86_64.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Fix 32-bit overflow in X.509 certificate validity date checking
David Howells [Tue, 2 Oct 2012 13:36:16 +0000 (14:36 +0100)]
MODSIGN: Fix 32-bit overflow in X.509 certificate validity date checking

The current choice of lifetime for the autogenerated X.509 of 100 years,
putting the validTo date in 2112, causes problems on 32-bit systems where a
32-bit time_t wraps in 2106.  64-bit x86_64 systems seem to be unaffected.

This can result in something like:

Loading module verification certificates
X.509: Cert 6e03943da0f3b015ba6ed7f5e0cac4fe48680994 has expired
MODSIGN: Problem loading in-kernel X.509 certificate (-127)

Or:

X.509: Cert 6e03943da0f3b015ba6ed7f5e0cac4fe48680994 is not yet valid
MODSIGN: Problem loading in-kernel X.509 certificate (-129)

Instead of turning the dates into time_t values and comparing, turn the system
clock and the ASN.1 dates into tm structs and compare those piecemeal instead.

Reported-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Make mrproper should remove generated files.
Rusty Russell [Tue, 2 Oct 2012 05:05:24 +0000 (14:35 +0930)]
MODSIGN: Make mrproper should remove generated files.

It doesn't, because the clean targets don't include kernel/Makefile, and
because two files were missing from the list.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Use utf8 strings in signer's name in autogenerated X.509 certs
David Howells [Fri, 28 Sep 2012 10:16:57 +0000 (11:16 +0100)]
MODSIGN: Use utf8 strings in signer's name in autogenerated X.509 certs

Place an indication that the certificate should use utf8 strings into the
x509.genkey template generated by kernel/Makefile.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Use the same digest for the autogen key sig as for the module sig
David Howells [Fri, 28 Sep 2012 10:16:57 +0000 (11:16 +0100)]
MODSIGN: Use the same digest for the autogen key sig as for the module sig

Use the same digest type for the autogenerated key signature as for the module
signature so that the hash algorithm is guaranteed to be present in the kernel.

Without this, the X.509 certificate loader may reject the X.509 certificate so
generated because it was self-signed and the signature will be checked against
itself - but this won't work if the digest algorithm must be loaded as a
module.

The symptom is that the key fails to load with the following message emitted
into the kernel log:

MODSIGN: Problem loading in-kernel X.509 certificate (-65)

the error in brackets being -ENOPKG.  What you should see is something like:

MODSIGN: Loaded cert 'Magarathea: Glacier signing key: 9588321144239a119d3406d4c4cf1fbae1836fa0'

Note that this doesn't apply to certificates that are not self-signed as we
don't check those currently as they require the parent CA certificate to be
available.

Reported-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Sign modules during the build process
David Howells [Wed, 26 Sep 2012 09:11:06 +0000 (10:11 +0100)]
MODSIGN: Sign modules during the build process

If CONFIG_MODULE_SIG is set, then this patch will cause all modules files to
to have signatures added.  The following steps will occur:

 (1) The module will be linked to foo.ko.unsigned instead of foo.ko

 (2) The module will be stripped using both "strip -x -g" and "eu-strip" to
     ensure minimal size for inclusion in an initramfs.

 (3) The signature will be generated on the stripped module.

 (4) The signature will be appended to the module, along with some information
     about the signature and a magic string that indicates the presence of the
     signature.

Step (3) requires private and public keys to be available.  By default these
are expected to be found in files:

signing_key.priv
signing_key.x509

in the base directory of the build.  The first is the private key in PEM form
and the second is the X.509 certificate in DER form as can be generated from
openssl:

openssl req \
-new -x509 -outform PEM -out signing_key.x509 \
-keyout signing_key.priv -nodes \
-subj "/CN=H2G2/O=Magrathea/CN=Slartibartfast"

If the secret key is not found then signing will be skipped and the unsigned
module from (1) will just be copied to foo.ko.

If signing occurs, lines like the following will be seen:

LD [M]  fs/foo/foo.ko.unsigned
STRIP [M] fs/foo/foo.ko.stripped
SIGN [M] fs/foo/foo.ko

will appear in the build log.  If the signature step will be skipped and the
following will be seen:

LD [M]  fs/foo/foo.ko.unsigned
STRIP [M] fs/foo/foo.ko.stripped
NO SIGN [M] fs/foo/foo.ko

NOTE!  After the signature step, the signed module _must_not_ be passed through
strip.  The unstripped, unsigned module is still available at the name on the
LD [M] line.  This restriction may affect packaging tools (such as rpmbuild)
and initramfs composition tools.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Provide a script for generating a key ID from an X.509 cert
David Howells [Wed, 26 Sep 2012 09:11:06 +0000 (10:11 +0100)]
MODSIGN: Provide a script for generating a key ID from an X.509 cert

Provide a script to parse an X.509 certificate and certain pieces of
information from it in order to generate a key identifier to be included within
a module signature.

The script takes the Subject Name and extracts (if present) the
organizationName (O), the commonName (CN) and the emailAddress and fabricates
the signer's name from them:

 (1) If both O and CN exist, then the name will be "O: CN", unless:

     (a) CN is prefixed by O, in which case only CN is used.

     (b) CN and O share at least the first 7 characters, in which case only CN
       is used.

 (2) Otherwise, CN is used if present.

 (3) Otherwise, O is used if present.

 (4) Otherwise the emailAddress is used, if present.

 (5) Otherwise a blank name is used.

The script emits a binary encoded identifier in the following form:

 - 2 BE bytes indicating the length of the signer's name.

 - 2 BE bytes indicating the length of the subject key identifier.

 - The characters of the signer's name.

 - The bytes of the subject key identifier.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Implement module signature checking
David Howells [Wed, 26 Sep 2012 09:11:03 +0000 (10:11 +0100)]
MODSIGN: Implement module signature checking

Check the signature on the module against the keys compiled into the kernel or
available in a hardware key store.

Currently, only RSA keys are supported - though that's easy enough to change,
and the signature is expected to contain raw components (so not a PGP or
PKCS#7 formatted blob).

The signature blob is expected to consist of the following pieces in order:

 (1) The binary identifier for the key.  This is expected to match the
     SubjectKeyIdentifier from an X.509 certificate.  Only X.509 type
     identifiers are currently supported.

 (2) The signature data, consisting of a series of MPIs in which each is in
     the format of a 2-byte BE word sizes followed by the content data.

 (3) A 12 byte information block of the form:

struct module_signature {
enum pkey_algo algo : 8;
enum pkey_hash_algo hash : 8;
enum pkey_id_type id_type : 8;
u8 __pad;
__be32 id_length;
__be32 sig_length;
};

     The three enums are defined in crypto/public_key.h.

     'algo' contains the public-key algorithm identifier (0->DSA, 1->RSA).

     'hash' contains the digest algorithm identifier (0->MD4, 1->MD5, 2->SHA1,
      etc.).

     'id_type' contains the public-key identifier type (0->PGP, 1->X.509).

     '__pad' should be 0.

     'id_length' should contain in the binary identifier length in BE form.

     'sig_length' should contain in the signature data length in BE form.

     The lengths are in BE order rather than CPU order to make dealing with
     cross-compilation easier.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (minor Kconfig fix)
11 years agoMODSIGN: Provide module signing public keys to the kernel
David Howells [Wed, 26 Sep 2012 09:09:51 +0000 (10:09 +0100)]
MODSIGN: Provide module signing public keys to the kernel

Include a PGP keyring containing the public keys required to perform module
verification in the kernel image during build and create a special keyring
during boot which is then populated with keys of crypto type holding the public
keys found in the PGP keyring.

These can be seen by root:

[root@andromeda ~]# cat /proc/keys
07ad4ee0 I-----     1 perm 3f010000     0     0 crypto    modsign.0: RSA 87b9b3bd []
15c7f8c3 I-----     1 perm 1f030000     0     0 keyring   .module_sign: 1/4
...

It is probably worth permitting root to invalidate these keys, resulting in
their removal and preventing further modules from being loaded with that key.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Automatically generate module signing keys if missing
David Howells [Wed, 26 Sep 2012 09:09:51 +0000 (10:09 +0100)]
MODSIGN: Automatically generate module signing keys if missing

Automatically generate keys for module signing if they're absent so that
allyesconfig doesn't break.  The builder should consider generating their own
key and certificate, however, so that the keys are appropriately named.

The private key for the module signer should be placed in signing_key.priv
(unencrypted!) and the public key in an X.509 certificate as signing_key.x509.

If a transient key is desired for signing the modules, a config file for
'openssl req' can be placed in x509.genkey, looking something like the
following:

[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
prompt = no
x509_extensions = myexts

[ req_distinguished_name ]
O = Magarathea
CN = Glacier signing key
emailAddress = slartibartfast@magrathea.h2g2

[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=hash

The build process will use this to configure:

openssl req -new -nodes -utf8 -sha1 -days 36500 -batch \
-x509 -config x509.genkey \
-outform DER -out signing_key.x509 \
-keyout signing_key.priv

to generate the key.

Note that it is required that the X.509 certificate have a subjectKeyIdentifier
and an authorityKeyIdentifier.  Without those, the certificate will be
rejected.  These can be used to check the validity of a certificate.

Note that 'make distclean' will remove signing_key.{priv,x509} and x509.genkey,
whether or not they were generated automatically.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Provide Kconfig options
David Howells [Wed, 26 Sep 2012 09:09:50 +0000 (10:09 +0100)]
MODSIGN: Provide Kconfig options

Provide kernel configuration options for module signing.

The following configuration options are added:

     CONFIG_MODULE_SIG_SHA1
     CONFIG_MODULE_SIG_SHA224
     CONFIG_MODULE_SIG_SHA256
     CONFIG_MODULE_SIG_SHA384
     CONFIG_MODULE_SIG_SHA512

These select the cryptographic hash used to digest the data prior to signing.
Additionally, the crypto module selected will be built into the kernel as it
won't be possible to load it as a module without incurring a circular
dependency when the kernel tries to check its signature.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Provide gitignore and make clean rules for extra files
David Howells [Wed, 26 Sep 2012 09:09:50 +0000 (10:09 +0100)]
MODSIGN: Provide gitignore and make clean rules for extra files

Provide gitignore and make clean rules for extra files to hide and clean up the
extra files produced by module signing stuff once it is added.  Also add a
clean up rule for the module content extractor program used to extract the data
to be signed.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoMODSIGN: Add FIPS policy
David Howells [Wed, 26 Sep 2012 09:09:50 +0000 (10:09 +0100)]
MODSIGN: Add FIPS policy

If we're in FIPS mode, we should panic if we fail to verify the signature on a
module or we're asked to load an unsigned module in signature enforcing mode.
Possibly FIPS mode should automatically enable enforcing mode.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agomodule: signature checking hook
Rusty Russell [Wed, 26 Sep 2012 09:09:40 +0000 (10:09 +0100)]
module: signature checking hook

We do a very simple search for a particular string appended to the module
(which is cache-hot and about to be SHA'd anyway).  There's both a config
option and a boot parameter which control whether we accept or fail with
unsigned modules and modules that are signed with an unknown key.

If module signing is enabled, the kernel will be tainted if a module is
loaded that is unsigned or has a signature for which we don't have the
key.

(Useful feedback and tweaks by David Howells <dhowells@redhat.com>)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoUBIFS: fix mounting problems after power cuts
Artem Bityutskiy [Tue, 9 Oct 2012 13:20:15 +0000 (16:20 +0300)]
UBIFS: fix mounting problems after power cuts

This is a bugfix for a problem with the following symptoms:

1. A power cut happens
2. After reboot, we try to mount UBIFS
3. Mount fails with "No space left on device" error message

UBIFS complains like this:

UBIFS error (pid 28225): grab_empty_leb: could not find an empty LEB

The root cause of this problem is that when we mount, not all LEBs are
categorized. Only those which were read are. However, the
'ubifs_find_free_leb_for_idx()' function assumes that all LEBs were
categorized and 'c->freeable_cnt' is valid, which is a false assumption.

This patch fixes the problem by teaching 'ubifs_find_free_leb_for_idx()'
to always fall back to LPT scanning if no freeable LEBs were found.

This problem was reported by few people in the past, but Brent Taylor
was able to reproduce it and send me a flash image which cannot be mounted,
which made it easy to hunt the bug. Kudos to Brent.

Reported-by: Brent Taylor <motobud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@vger.kernel.org