21 Apr, 2015

1 commit

  • Pull final removal of deprecated cpus_* cpumask functions from Rusty Russell:
    "This is the final removal (after several years!) of the obsolete
    cpus_* functions, prompted by their mis-use in staging.

    With these function removed, all cpu functions should only iterate to
    nr_cpu_ids, so we finally only allocate that many bits when cpumasks
    are allocated offstack"

    * tag 'cpumask-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (25 commits)
    cpumask: remove __first_cpu / __next_cpu
    cpumask: resurrect CPU_MASK_CPU0
    linux/cpumask.h: add typechecking to cpumask_test_cpu
    cpumask: only allocate nr_cpumask_bits.
    Fix weird uses of num_online_cpus().
    cpumask: remove deprecated functions.
    mips: fix obsolete cpumask_of_cpu usage.
    x86: fix more deprecated cpu function usage.
    ia64: remove deprecated cpus_ usage.
    powerpc: fix deprecated CPU_MASK_CPU0 usage.
    CPU_MASK_ALL/CPU_MASK_NONE: remove from deprecated region.
    staging/lustre/o2iblnd: Don't use cpus_weight
    staging/lustre/libcfs: replace deprecated cpus_ calls with cpumask_
    staging/lustre/ptlrpc: Do not use deprecated cpus_* functions
    blackfin: fix up obsolete cpu function usage.
    parisc: fix up obsolete cpu function usage.
    tile: fix up obsolete cpu function usage.
    arm64: fix up obsolete cpu function usage.
    mips: fix up obsolete cpu function usage.
    x86: fix up obsolete cpu function usage.
    ...

    Linus Torvalds
     

17 Apr, 2015

1 commit


10 Mar, 2015

1 commit


20 Feb, 2015

1 commit

  • Pull kconfig updates from Michal Marek:
    "Yann E Morin was supposed to take over kconfig maintainership, but
    this hasn't happened. So I'm sending a few kconfig patches that I
    collected:

    - Fix for missing va_end in kconfig
    - merge_config.sh displays used if given too few arguments
    - s/boolean/bool/ in Kconfig files for consistency, with the plan to
    only support bool in the future"

    * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kconfig: use va_end to match corresponding va_start
    merge_config.sh: Display usage if given too few arguments
    kconfig: use bool instead of boolean for type definition attributes

    Linus Torvalds
     

17 Feb, 2015

1 commit

  • Keyword 'boolean' for type definition attributes is considered
    deprecated and, therefore, should not be used anymore.

    See http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com
    See http://lkml.kernel.org/r/1419108071-11607-1-git-send-email-cj@linux.com

    Signed-off-by: Christoph Jaeger
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Jaeger
     

07 Jan, 2015

1 commit


23 Dec, 2014

1 commit

  • this change add CONFIG_HAVE_ARCH_BITREVERSE config option,
    so that we can use some architecture's bitrev hardware instruction
    to do bitrev operation.

    Introduce __constant_bitrev* macro for constant bitrev operation.

    Change __bitrev16() __bitrev32() to be inline function,
    don't need export symbol for these tiny functions.

    Signed-off-by: Yalin Wang
    Acked-by: Will Deacon
    Signed-off-by: Russell King

    Yalin Wang
     

14 Sep, 2014

1 commit

  • It used to be an ad-hoc hack defined by the x86 version of
    that enabled a couple of library routines to know whether
    an integer multiply is faster than repeated shifts and additions.

    This just makes it use the real Kconfig system instead, and makes x86
    (which was the only architecture that did this) select the option.

    NOTE! Even for x86, this really is kind of wrong. If we cared, we would
    probably not enable this for builds optimized for netburst (P4), where
    shifts-and-adds are generally faster than multiplies. This patch does
    *not* change that kind of logic, though, it is purely a syntactic change
    with no code changes.

    This was triggered by the fact that we have other places that really
    want to know "do I want to expand multiples by constants by hand or
    not", particularly the hash generation code.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

09 Aug, 2014

1 commit

  • Rather than have architectures #define ARCH_HAS_SG_CHAIN in an
    architecture specific scatterlist.h, make it a proper Kconfig option and
    use that instead. At same time, remove the header files are are now
    mostly useless and just include asm-generic/scatterlist.h.

    [sfr@canb.auug.org.au: powerpc files now need asm/dma.h]
    Signed-off-by: Laura Abbott
    Acked-by: Thomas Gleixner [x86]
    Acked-by: Benjamin Herrenschmidt [powerpc]
    Acked-by: Heiko Carstens
    Cc: Russell King
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: "James E.J. Bottomley"
    Cc: Martin Schwidefsky
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Laura Abbott
     

07 Aug, 2014

2 commits

  • This was useful during development, and is retained for future
    regression testing.

    GCC appears to have no way to place string literals in a particular
    section; adding __initconst to a char pointer leaves the string itself
    in the default string section, where it will not be thrown away after
    module load.

    Thus all string constants are kept in explicitly declared and named
    arrays. Sorry this makes printk a bit harder to read. At least the
    tests are more compact.

    Signed-off-by: George Spelvin
    Cc: Randy Dunlap
    Cc: Tejun Heo
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    George Spelvin
     
  • This is a helper function from drivers/ata/libata_core.c, where it is
    used to blacklist particular device models. It's being moved to lib/ so
    other drivers may use it for the same purpose.

    This implementation in non-recursive, so is safe for the kernel stack.

    [akpm@linux-foundation.org: fix sparse warning]
    Signed-off-by: George Spelvin
    Cc: Randy Dunlap
    Cc: Tejun Heo
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    George Spelvin
     

18 Jul, 2014

1 commit


05 May, 2014

1 commit

  • lib/interval_tree.c provides a simple interface for an interval-tree
    (an augmented red-black tree) but is only built when testing the generic
    macros for building interval-trees. For drivers with modest needs,
    export the simple interval-tree library as is.

    v2: Lots of help from Michel Lespinasse to only compile the code
    as required:
    - make INTERVAL_TREE a config option
    - make INTERVAL_TREE_TEST select the library functions
    and sanitize the filenames & Makefile
    - prepare interval_tree for being built as a module if required

    Signed-off-by: Chris Wilson
    Cc: Michel Lespinasse
    Cc: Rik van Riel
    Cc: Peter Zijlstra
    Cc: Andrea Arcangeli
    Cc: David Woodhouse
    Cc: Andrew Morton
    Reviewed-by: Michel Lespinasse
    [Acked for inclusion via drm/i915 by Andrew Morton.]
    [danvet: switch to _GPL as per the mailing list discussion.]
    Signed-off-by: Daniel Vetter

    Chris Wilson
     

13 Apr, 2014

1 commit

  • Pull audit updates from Eric Paris.

    * git://git.infradead.org/users/eparis/audit: (28 commits)
    AUDIT: make audit_is_compat depend on CONFIG_AUDIT_COMPAT_GENERIC
    audit: renumber AUDIT_FEATURE_CHANGE into the 1300 range
    audit: do not cast audit_rule_data pointers pointlesly
    AUDIT: Allow login in non-init namespaces
    audit: define audit_is_compat in kernel internal header
    kernel: Use RCU_INIT_POINTER(x, NULL) in audit.c
    sched: declare pid_alive as inline
    audit: use uapi/linux/audit.h for AUDIT_ARCH declarations
    syscall_get_arch: remove useless function arguments
    audit: remove stray newline from audit_log_execve_info() audit_panic() call
    audit: remove stray newlines from audit_log_lost messages
    audit: include subject in login records
    audit: remove superfluous new- prefix in AUDIT_LOGIN messages
    audit: allow user processes to log from another PID namespace
    audit: anchor all pid references in the initial pid namespace
    audit: convert PPIDs to the inital PID namespace.
    pid: get pid_t ppid of task in init_pid_ns
    audit: rename the misleading audit_get_context() to audit_take_context()
    audit: Add generic compat syscall support
    audit: Add CONFIG_HAVE_ARCH_AUDITSYSCALL
    ...

    Linus Torvalds
     

08 Apr, 2014

1 commit

  • If the renamed symbol is defined lib/iomap.c implements ioport_map and
    ioport_unmap and currently (nearly) all platforms define the port
    accessor functions outb/inb and friend unconditionally. So
    HAS_IOPORT_MAP is the better name for this.

    Consequently NO_IOPORT is renamed to NO_IOPORT_MAP.

    The motivation for this change is to reintroduce a symbol HAS_IOPORT
    that signals if outb/int et al are available. I will address that at
    least one merge window later though to keep surprises to a minimum and
    catch new introductions of (HAS|NO)_IOPORT.

    The changes in this commit were done using:

    $ git grep -l -E '(NO|HAS)_IOPORT' | xargs perl -p -i -e 's/\b((?:CONFIG_)?(?:NO|HAS)_IOPORT)\b/$1_MAP/'

    Signed-off-by: Uwe Kleine-König
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     

20 Mar, 2014

1 commit

  • lib/audit.c provides a generic function for auditing system calls.
    This patch extends it for compat syscall support on bi-architectures
    (32/64-bit) by adding lib/compat_audit.c.
    What is required to support this feature are:
    * add asm/unistd32.h for compat system call names
    * select CONFIG_AUDIT_ARCH_COMPAT_GENERIC

    Signed-off-by: AKASHI Takahiro
    Acked-by: Richard Guy Briggs
    Signed-off-by: Eric Paris

    AKASHI Takahiro
     

22 Nov, 2013

1 commit

  • Pull security subsystem updates from James Morris:
    "In this patchset, we finally get an SELinux update, with Paul Moore
    taking over as maintainer of that code.

    Also a significant update for the Keys subsystem, as well as
    maintenance updates to Smack, IMA, TPM, and Apparmor"

    and since I wanted to know more about the updates to key handling,
    here's the explanation from David Howells on that:

    "Okay. There are a number of separate bits. I'll go over the big bits
    and the odd important other bit, most of the smaller bits are just
    fixes and cleanups. If you want the small bits accounting for, I can
    do that too.

    (1) Keyring capacity expansion.

    KEYS: Consolidate the concept of an 'index key' for key access
    KEYS: Introduce a search context structure
    KEYS: Search for auth-key by name rather than target key ID
    Add a generic associative array implementation.
    KEYS: Expand the capacity of a keyring

    Several of the patches are providing an expansion of the capacity of a
    keyring. Currently, the maximum size of a keyring payload is one page.
    Subtract a small header and then divide up into pointers, that only gives
    you ~500 pointers on an x86_64 box. However, since the NFS idmapper uses
    a keyring to store ID mapping data, that has proven to be insufficient to
    the cause.

    Whatever data structure I use to handle the keyring payload, it can only
    store pointers to keys, not the keys themselves because several keyrings
    may point to a single key. This precludes inserting, say, and rb_node
    struct into the key struct for this purpose.

    I could make an rbtree of records such that each record has an rb_node
    and a key pointer, but that would use four words of space per key stored
    in the keyring. It would, however, be able to use much existing code.

    I selected instead a non-rebalancing radix-tree type approach as that
    could have a better space-used/key-pointer ratio. I could have used the
    radix tree implementation that we already have and insert keys into it by
    their serial numbers, but that means any sort of search must iterate over
    the whole radix tree. Further, its nodes are a bit on the capacious side
    for what I want - especially given that key serial numbers are randomly
    allocated, thus leaving a lot of empty space in the tree.

    So what I have is an associative array that internally is a radix-tree
    with 16 pointers per node where the index key is constructed from the key
    type pointer and the key description. This means that an exact lookup by
    type+description is very fast as this tells us how to navigate directly to
    the target key.

    I made the data structure general in lib/assoc_array.c as far as it is
    concerned, its index key is just a sequence of bits that leads to a
    pointer. It's possible that someone else will be able to make use of it
    also. FS-Cache might, for example.

    (2) Mark keys as 'trusted' and keyrings as 'trusted only'.

    KEYS: verify a certificate is signed by a 'trusted' key
    KEYS: Make the system 'trusted' keyring viewable by userspace
    KEYS: Add a 'trusted' flag and a 'trusted only' flag
    KEYS: Separate the kernel signature checking keyring from module signing

    These patches allow keys carrying asymmetric public keys to be marked as
    being 'trusted' and allow keyrings to be marked as only permitting the
    addition or linkage of trusted keys.

    Keys loaded from hardware during kernel boot or compiled into the kernel
    during build are marked as being trusted automatically. New keys can be
    loaded at runtime with add_key(). They are checked against the system
    keyring contents and if their signatures can be validated with keys that
    are already marked trusted, then they are marked trusted also and can
    thus be added into the master keyring.

    Patches from Mimi Zohar make this usable with the IMA keyrings also.

    (3) Remove the date checks on the key used to validate a module signature.

    X.509: Remove certificate date checks

    It's not reasonable to reject a signature just because the key that it was
    generated with is no longer valid datewise - especially if the kernel
    hasn't yet managed to set the system clock when the first module is
    loaded - so just remove those checks.

    (4) Make it simpler to deal with additional X.509 being loaded into the kernel.

    KEYS: Load *.x509 files into kernel keyring
    KEYS: Have make canonicalise the paths of the X.509 certs better to deduplicate

    The builder of the kernel now just places files with the extension ".x509"
    into the kernel source or build trees and they're concatenated by the
    kernel build and stuffed into the appropriate section.

    (5) Add support for userspace kerberos to use keyrings.

    KEYS: Add per-user_namespace registers for persistent per-UID kerberos caches
    KEYS: Implement a big key type that can save to tmpfs

    Fedora went to, by default, storing kerberos tickets and tokens in tmpfs.
    We looked at storing it in keyrings instead as that confers certain
    advantages such as tickets being automatically deleted after a certain
    amount of time and the ability for the kernel to get at these tokens more
    easily.

    To make this work, two things were needed:

    (a) A way for the tickets to persist beyond the lifetime of all a user's
    sessions so that cron-driven processes can still use them.

    The problem is that a user's session keyrings are deleted when the
    session that spawned them logs out and the user's user keyring is
    deleted when the UID is deleted (typically when the last log out
    happens), so neither of these places is suitable.

    I've added a system keyring into which a 'persistent' keyring is
    created for each UID on request. Each time a user requests their
    persistent keyring, the expiry time on it is set anew. If the user
    doesn't ask for it for, say, three days, the keyring is automatically
    expired and garbage collected using the existing gc. All the kerberos
    tokens it held are then also gc'd.

    (b) A key type that can hold really big tickets (up to 1MB in size).

    The problem is that Active Directory can return huge tickets with lots
    of auxiliary data attached. We don't, however, want to eat up huge
    tracts of unswappable kernel space for this, so if the ticket is
    greater than a certain size, we create a swappable shmem file and dump
    the contents in there and just live with the fact we then have an
    inode and a dentry overhead. If the ticket is smaller than that, we
    slap it in a kmalloc()'d buffer"

    * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (121 commits)
    KEYS: Fix keyring content gc scanner
    KEYS: Fix error handling in big_key instantiation
    KEYS: Fix UID check in keyctl_get_persistent()
    KEYS: The RSA public key algorithm needs to select MPILIB
    ima: define '_ima' as a builtin 'trusted' keyring
    ima: extend the measurement list to include the file signature
    kernel/system_certificate.S: use real contents instead of macro GLOBAL()
    KEYS: fix error return code in big_key_instantiate()
    KEYS: Fix keyring quota misaccounting on key replacement and unlink
    KEYS: Fix a race between negating a key and reading the error set
    KEYS: Make BIG_KEYS boolean
    apparmor: remove the "task" arg from may_change_ptraced_domain()
    apparmor: remove parent task info from audit logging
    apparmor: remove tsk field from the apparmor_audit_struct
    apparmor: fix capability to not use the current task, during reporting
    Smack: Ptrace access check mode
    ima: provide hash algo info in the xattr
    ima: enable support for larger default filedata hash algorithms
    ima: define kernel parameter 'ima_template=' to change configured default
    ima: add Kconfig default measurement list template
    ...

    Linus Torvalds
     

15 Nov, 2013

1 commit


12 Nov, 2013

1 commit

  • We generated a battery of 100 test cases from GSL taus113 implemention
    and compare the results from a particular seed and a particular
    iteration with our implementation in the kernel. We have verified on
    32 and 64 bit machines that our taus113 kernel implementation gives
    same results as GSL taus113 implementation:

    [ 0.147370] prandom: seed boundary self test passed
    [ 0.148078] prandom: 100 self tests passed

    This is a Kconfig option that is disabled on default, just like the
    crc32 init selftests in order to not unnecessary slow down boot process.
    We also refactored out prandom_seed_very_weak() as it's now used in
    multiple places in order to reduce redundant code.

    GSL code we used for generating test cases:

    int i, j;
    srand(time(NULL));
    for (i = 0; i < 100; ++i) {
    int iteration = 500 + (rand() % 500);
    gsl_rng_default_seed = rand() + 1;
    gsl_rng *r = gsl_rng_alloc(gsl_rng_taus113);
    printf("\t{ %lu, ", gsl_rng_default_seed);
    for (j = 0; j < iteration - 1; ++j)
    gsl_rng_get(r);
    printf("%u, %lu },\n", iteration, gsl_rng_get(r));
    gsl_rng_free(r);
    }

    Joint work with Hannes Frederic Sowa.

    Cc: Florian Weimer
    Cc: Theodore Ts'o
    Signed-off-by: Daniel Borkmann
    Signed-off-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

24 Sep, 2013

1 commit

  • Add a generic associative array implementation that can be used as the
    container for keyrings, thereby massively increasing the capacity available
    whilst also speeding up searching in keyrings that contain a lot of keys.

    This may also be useful in FS-Cache for tracking cookies.

    Documentation is added into Documentation/associative_array.txt

    Some of the properties of the implementation are:

    (1) Objects are opaque pointers. The implementation does not care where they
    point (if anywhere) or what they point to (if anything).

    [!] NOTE: Pointers to objects _must_ be zero in the two least significant
    bits.

    (2) Objects do not need to contain linkage blocks for use by the array. This
    permits an object to be located in multiple arrays simultaneously.
    Rather, the array is made up of metadata blocks that point to objects.

    (3) Objects are labelled as being one of two types (the type is a bool value).
    This information is stored in the array, but has no consequence to the
    array itself or its algorithms.

    (4) Objects require index keys to locate them within the array.

    (5) Index keys must be unique. Inserting an object with the same key as one
    already in the array will replace the old object.

    (6) Index keys can be of any length and can be of different lengths.

    (7) Index keys should encode the length early on, before any variation due to
    length is seen.

    (8) Index keys can include a hash to scatter objects throughout the array.

    (9) The array can iterated over. The objects will not necessarily come out in
    key order.

    (10) The array can be iterated whilst it is being modified, provided the RCU
    readlock is being held by the iterator. Note, however, under these
    circumstances, some objects may be seen more than once. If this is a
    problem, the iterator should lock against modification. Objects will not
    be missed, however, unless deleted.

    (11) Objects in the array can be looked up by means of their index key.

    (12) Objects can be looked up whilst the array is being modified, provided the
    RCU readlock is being held by the thread doing the look up.

    The implementation uses a tree of 16-pointer nodes internally that are indexed
    on each level by nibbles from the index key. To improve memory efficiency,
    shortcuts can be emplaced to skip over what would otherwise be a series of
    single-occupancy nodes. Further, nodes pack leaf object pointers into spare
    space in the node rather than making an extra branch until as such time an
    object needs to be added to a full node.

    Signed-off-by: David Howells

    David Howells
     

08 Sep, 2013

1 commit

  • Pull crypto update from Herbert Xu:
    "Here is the crypto update for 3.12:

    - Added MODULE_SOFTDEP to allow pre-loading of modules.
    - Reinstated crct10dif driver using the module softdep feature.
    - Allow via rng driver to be auto-loaded.

    - Split large input data when necessary in nx.
    - Handle zero length messages correctly for GCM/XCBC in nx.
    - Handle SHA-2 chunks bigger than block size properly in nx.

    - Handle unaligned lengths in omap-aes.
    - Added SHA384/SHA512 to omap-sham.
    - Added OMAP5/AM43XX SHAM support.
    - Added OMAP4 TRNG support.

    - Misc fixes"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (66 commits)
    Reinstate "crypto: crct10dif - Wrap crc_t10dif function all to use crypto transform framework"
    hwrng: via - Add MODULE_DEVICE_TABLE
    crypto: fcrypt - Fix bitoperation for compilation with clang
    crypto: nx - fix SHA-2 for chunks bigger than block size
    crypto: nx - fix GCM for zero length messages
    crypto: nx - fix XCBC for zero length messages
    crypto: nx - fix limits to sg lists for AES-CCM
    crypto: nx - fix limits to sg lists for AES-XCBC
    crypto: nx - fix limits to sg lists for AES-GCM
    crypto: nx - fix limits to sg lists for AES-CTR
    crypto: nx - fix limits to sg lists for AES-CBC
    crypto: nx - fix limits to sg lists for AES-ECB
    crypto: nx - add offset to nx_build_sg_lists()
    padata - Register hotcpu notifier after initialization
    padata - share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
    hwrng: omap - reorder OMAP TRNG driver code
    crypto: omap-sham - correct dma burst size
    crypto: omap-sham - Enable Polling mode if DMA fails
    crypto: tegra-aes - bitwise vs logical and
    crypto: sahara - checking the wrong variable
    ...

    Linus Torvalds
     

07 Sep, 2013

1 commit


03 Sep, 2013

1 commit

  • Instead of taking the spinlock, the lockless versions atomically check
    that the lock is not taken, and do the reference count update using a
    cmpxchg() loop. This is semantically identical to doing the reference
    count update protected by the lock, but avoids the "wait for lock"
    contention that you get when accesses to the reference count are
    contended.

    Note that a "lockref" is absolutely _not_ equivalent to an atomic_t.
    Even when the lockref reference counts are updated atomically with
    cmpxchg, the fact that they also verify the state of the spinlock means
    that the lockless updates can never happen while somebody else holds the
    spinlock.

    So while "lockref_put_or_lock()" looks a lot like just another name for
    "atomic_dec_and_lock()", and both optimize to lockless updates, they are
    fundamentally different: the decrement done by atomic_dec_and_lock() is
    truly independent of any lock (as long as it doesn't decrement to zero),
    so a locked region can still see the count change.

    The lockref structure, in contrast, really is a *locked* reference
    count. If you hold the spinlock, the reference count will be stable and
    you can modify the reference count without using atomics, because even
    the lockless updates will see and respect the state of the lock.

    In order to enable the cmpxchg lockless code, the architecture needs to
    do three things:

    (1) Make sure that the "arch_spinlock_t" and an "unsigned int" can fit
    in an aligned u64, and have a "cmpxchg()" implementation that works
    on such a u64 data type.

    (2) define a helper function to test for a spinlock being unlocked
    ("arch_spin_value_unlocked()")

    (3) select the "ARCH_USE_CMPXCHG_LOCKREF" config variable in its
    Kconfig file.

    This enables it for x86-64 (but not 32-bit, we'd need to make sure
    cmpxchg() turns into the proper cmpxchg8b in order to enable it for
    32-bit mode).

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

25 Jul, 2013

1 commit

  • Pull crypto fixes from Herbert Xu:
    "This push fixes a memory corruption issue in caam, as well as
    reverting the new optimised crct10dif implementation as it breaks boot
    on initrd systems.

    Hopefully crct10dif will be reinstated once the supporting code is
    added so that it doesn't break boot"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    Revert "crypto: crct10dif - Wrap crc_t10dif function all to use crypto transform framework"
    crypto: caam - Fixed the memory out of bound overwrite issue

    Linus Torvalds
     

24 Jul, 2013

1 commit

  • This reverts commits
    67822649d7305caf3dd50ed46c27b99c94eff996
    39761214eefc6b070f29402aa1165f24d789b3f7
    0b95a7f85718adcbba36407ef88bba0a7379ed03
    31d939625a9a20b1badd2d4e6bf6fd39fa523405
    2d31e518a42828df7877bca23a958627d60408bc

    Unfortunately this change broke boot on some systems that used an
    initrd which does not include the newly created crct10dif modules.
    As these modules are required by sd_mod under certain configurations
    this is a serious problem.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

10 Jul, 2013

2 commits

  • This patchset is for supporting LZ4 compression and the crypto API using
    it.

    As shown below, the size of data is a little bit bigger but compressing
    speed is faster under the enabled unaligned memory access. We can use
    lz4 de/compression through crypto API as well. Also, It will be useful
    for another potential user of lz4 compression.

    lz4 Compression Benchmark:
    Compiler: ARM gcc 4.6.4
    ARMv7, 1 GHz based board
    Kernel: linux 3.4
    Uncompressed data Size: 101 MB
    Compressed Size compression Speed
    LZO 72.1MB 32.1MB/s, 33.0MB/s(UA)
    LZ4 75.1MB 30.4MB/s, 35.9MB/s(UA)
    LZ4HC 59.8MB 2.4MB/s, 2.5MB/s(UA)
    - UA: Unaligned memory Access support
    - Latest patch set for LZO applied

    This patch:

    Add support for LZ4 compression in the Linux Kernel. LZ4 Compression APIs
    for kernel are based on LZ4 implementation by Yann Collet and were changed
    for kernel coding style.

    LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
    LZ4 source repository : http://code.google.com/p/lz4/
    svn revision : r90

    Two APIs are added:

    lz4_compress() support basic lz4 compression whereas lz4hc_compress()
    support high compression or CPU performance get lower but compression
    ratio get higher. Also, we require the pre-allocated working memory with
    the defined size and destination buffer must be allocated with the size of
    lz4_compressbound.

    [akpm@linux-foundation.org: make lz4_compresshcctx() static]
    Signed-off-by: Chanho Min
    Cc: "Darrick J. Wong"
    Cc: Bob Pearson
    Cc: Richard Weinberger
    Cc: Herbert Xu
    Cc: Yann Collet
    Cc: Kyungsik Lee
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chanho Min
     
  • Add support for extracting LZ4-compressed kernel images, as well as
    LZ4-compressed ramdisk images in the kernel boot process.

    Signed-off-by: Kyungsik Lee
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Russell King
    Cc: Borislav Petkov
    Cc: Florian Fainelli
    Cc: Yann Collet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kyungsik Lee
     

06 Jul, 2013

1 commit

  • Pull crypto update from Herbert Xu:
    - Do not idle omap device between crypto operations in one session.
    - Added sha224/sha384 shims for SSSE3.
    - More optimisations for camellia-aesni-avx2.
    - Removed defunct blowfish/twofish AVX2 implementations.
    - Added unaligned buffer self-tests.
    - Added PCLMULQDQ optimisation for CRCT10DIF.
    - Added support for Freescale's DCP co-processor
    - Misc fixes.

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (44 commits)
    crypto: testmgr - test hash implementations with unaligned buffers
    crypto: testmgr - test AEADs with unaligned buffers
    crypto: testmgr - test skciphers with unaligned buffers
    crypto: testmgr - check that entries in alg_test_descs are in correct order
    Revert "crypto: twofish - add AVX2/x86_64 assembler implementation of twofish cipher"
    Revert "crypto: blowfish - add AVX2/x86_64 implementation of blowfish cipher"
    crypto: camellia-aesni-avx2 - tune assembly code for more performance
    hwrng: bcm2835 - fix MODULE_LICENSE tag
    hwrng: nomadik - use clk_prepare_enable()
    crypto: picoxcell - replace strict_strtoul() with kstrtoul()
    crypto: dcp - Staticize local symbols
    crypto: dcp - Use NULL instead of 0
    crypto: dcp - Use devm_* APIs
    crypto: dcp - Remove redundant platform_set_drvdata()
    hwrng: use platform_{get,set}_drvdata()
    crypto: omap-aes - Don't idle/start AES device between Encrypt operations
    crypto: crct10dif - Use PTR_RET
    crypto: ux500 - Cocci spatch "resource_size.spatch"
    crypto: sha256_ssse3 - add sha224 support
    crypto: sha512_ssse3 - add sha384 support
    ...

    Linus Torvalds
     

04 Jul, 2013

1 commit

  • Pull "exotic" arch fixes from Geert Uytterhoeven:
    "This is a collection of several exotic architecture fixes, and a few
    other fixes for issues that were detected while doing the former"

    * 'exotic-arch-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (35 commits)
    lib: Move fonts from drivers/video/console/ to lib/fonts/
    console/font: Refactor font support code selection logic
    Revert "staging/solo6x10: depend on CONFIG_FONTS"
    input: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEP
    score: Wire up asm-generic/xor.h
    score: Remove unneeded
    openrisc: Wire up asm-generic/xor.h
    h8300/boot: Use POSIX "$((..))" instead of bashism "$[...]"
    h8300: Mark H83002 and H83048 CPU support broken
    h8300: Switch h8300 to drivers/Kconfig
    h8300: Limit timer channel ranges in Kconfig
    h8300: Wire up asm-generic/xor.h
    h8300: Fill the system call table using a CALL() macro
    h8300: Fix
    h8300: Hardcode symbol prefixes in asm sources
    h8300: add missing definition for read_barries_depends()
    frv: head.S - Remove commented-out initialization code
    cris: Wire up asm-generic/vga.h
    parport: disable PC-style parallel port support on cris
    console: Disable VGA text console support on cris
    ...

    Linus Torvalds
     

28 Jun, 2013

1 commit

  • Several drivers need font support independent of CONFIG_VT, cfr. commit
    9cbce8d7e1dae0744ca4f68d62aa7de18196b6f4, "console/font: Refactor font
    support code selection logic").
    Hence move the fonts and their support logic from drivers/video/console/ to
    its own library directory lib/fonts/.
    This also allows to limit processing of drivers/video/console/Makefile to
    CONFIG_VT=y again.

    [Kevin Hilman : Update arch/arm/boot/compressed/Makefile]
    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     

06 Jun, 2013

1 commit

  • Since we have at least one user of this function outside of CONFIG_NET
    scope, we have to provide this function independently. The proposed
    solution is to move it under lib/net_utils.c with corresponding
    configuration variable and select wherever it is needed.

    Signed-off-by: Andy Shevchenko
    Reported-by: Arnd Bergmann
    Acked-by: David S. Miller
    Acked-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Andy Shevchenko
     

20 May, 2013

1 commit


16 Apr, 2013

1 commit

  • We want to be able to use the utf16 functions that are currently present
    in the EFI variables code in platform-specific code as well. Move them to
    the kernel core, and in the process rename them to accurately describe what
    they do - they don't handle UTF16, only UCS2.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Matt Fleming

    Matthew Garrett
     

18 Jan, 2013

1 commit

  • The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
    while now and is almost always enabled by default. As agreed during the
    Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

    CC: Andrew Morton
    Acked-by: Paul E. McKenney
    CC: Dmitry Kasatkin
    CC: James Morris
    CC: "Michael S. Tsirkin"
    CC: Akinobu Mita
    CC: Ingo Molnar
    Cc: Greg Kroah-Hartman
    Signed-off-by: Kees Cook
    Acked-by: Catalin Marinas
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     

18 Dec, 2012

1 commit

  • Currently only block_dev and uprobes use percpu_rw_semaphore,
    add the config option selected by BLOCK || UPROBES.

    Signed-off-by: Oleg Nesterov
    Cc: Anton Arapov
    Cc: Ingo Molnar
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Mikulas Patocka
    Cc: "Paul E. McKenney"
    Cc: Peter Zijlstra
    Cc: Srikar Dronamraju
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

08 Oct, 2012

1 commit

  • Implement a simple static OID registry that allows the mapping of an encoded
    OID to an enum value for ease of use.

    The OID registry index enum appears in the:

    linux/oid_registry.h

    header file. A script generates the registry from lines in the header file
    that look like:

    OID_foo,/*1.2.3.4*/

    The actual OID is taken to be represented by the numbers with interpolated
    dots in the comment.

    All other lines in the header are ignored.

    The registry is queries by calling:

    OID look_up_oid(const void *data, size_t datasize);

    This returns a number from the registry enum representing the OID if found or
    OID__NR if not.

    Signed-off-by: David Howells
    Signed-off-by: Rusty Russell

    David Howells
     

31 Jul, 2012

3 commits

  • Merge Andrew's first set of patches:
    "Non-MM patches:

    - lots of misc bits

    - tree-wide have_clk() cleanups

    - quite a lot of printk tweaks. I draw your attention to "printk:
    convert the format for KERN_ to a 2 byte pattern" which
    looks a bit scary. But afaict it's solid.

    - backlight updates

    - lib/ feature work (notably the addition and use of memweight())

    - checkpatch updates

    - rtc updates

    - nilfs updates

    - fatfs updates (partial, still waiting for acks)

    - kdump, proc, fork, IPC, sysctl, taskstats, pps, etc

    - new fault-injection feature work"

    * Merge emailed patches from Andrew Morton : (128 commits)
    drivers/misc/lkdtm.c: fix missing allocation failure check
    lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table()
    fault-injection: add tool to run command with failslab or fail_page_alloc
    fault-injection: add selftests for cpu and memory hotplug
    powerpc: pSeries reconfig notifier error injection module
    memory: memory notifier error injection module
    PM: PM notifier error injection module
    cpu: rewrite cpu-notifier-error-inject module
    fault-injection: notifier error injection
    c/r: fcntl: add F_GETOWNER_UIDS option
    resource: make sure requested range is included in the root range
    include/linux/aio.h: cpp->C conversions
    fs: cachefiles: add support for large files in filesystem caching
    pps: return PTR_ERR on error in device_create
    taskstats: check nla_reserve() return
    sysctl: suppress kmemleak messages
    ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION
    ipc: compat: use signed size_t types for msgsnd and msgrcv
    ipc: allow compat IPC version field parsing if !ARCH_WANT_OLD_COMPAT_IPC
    ipc: add COMPAT_SHMLBA support
    ...

    Linus Torvalds
     
  • Introduce CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE and use this instead
    of the multitude of #if defined() checks in atomic64_test.c

    Signed-off-by: Catalin Marinas
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Catalin Marinas
     
  • Pull MIPS updates from Ralf Baechle:
    "More hardware support across the field including a bunch of device
    drivers. The highlight however really are further steps towards
    device tree.

    This has been sitting in -next for ages. All MIPS _defconfigs have
    been tested to boot or where I don't have hardware available, to at
    least build fine."

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (77 commits)
    MIPS: Loongson 1B: Add defconfig
    MIPS: Loongson 1B: Add board support
    MIPS: Netlogic: early console fix
    MIPS: Netlogic: Fix indentation of smpboot.S
    MIPS: Netlogic: remove cpu_has_dc_aliases define for XLP
    MIPS: Netlogic: Remove unused pcibios_fixups
    MIPS: Netlogic: Add XLP SoC devices in FDT
    MIPS: Netlogic: Add IRQ mappings for more devices
    MIPS: Netlogic: USB support for XLP
    MIPS: Netlogic: XLP PCIe controller support.
    MIPS: Netlogic: Platform changes for XLR/XLS I2C
    MIPS: Netlogic: Platform NAND/NOR flash support
    MIPS: Netlogic: Platform changes for XLS USB
    MIPS: Netlogic: Remove NETLOGIC_ prefix
    MIPS: Netlogic: SMP wakeup code update
    MIPS: Netlogic: Update comments in smpboot.S
    MIPS: BCM63XX: Add 96328avng reference board
    MIPS: Expose PCIe drivers for MIPS
    MIPS: BCM63XX: Add PCIe Support for BCM6328
    MIPS: BCM63XX: Move the PCI initialization into its own function
    ...

    Linus Torvalds
     

23 Jul, 2012

1 commit

  • libfdt is part of the device tree support in scripts/dtc/libfdt. For
    some platforms that use the Device Tree, we want to be able to edit
    the flattened device tree form.

    We don't want to burden kernel builds that do not require it, so we
    gate compilation of libfdt files with CONFIG_LIBFDT. So if it is
    needed, you need to do this in your Kconfig:

    select LIBFDT

    And in the Makefile of the code using libfdt something like:

    ccflags-y := -I$(src)/../../../scripts/dtc/libfdt

    Signed-off-by: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: devicetree-discuss@lists.ozlabs.org
    Cc: Grant Likely
    Cc: linux-kernel@vger.kernel.org
    Acked-by: Rob Herring
    Signed-off-by: Ralf Baechle

    David Daney