06 Nov, 2015

4 commits

  • Pull powerpc updates from Michael Ellerman:

    - Kconfig: remove BE-only platforms from LE kernel build from Boqun
    Feng
    - Refresh ps3_defconfig from Geoff Levand
    - Emit GNU & SysV hashes for the vdso from Michael Ellerman
    - Define an enum for the bolted SLB indexes from Anshuman Khandual
    - Use a local to avoid multiple calls to get_slb_shadow() from Michael
    Ellerman
    - Add gettimeofday() benchmark from Michael Neuling
    - Avoid link stack corruption in __get_datapage() from Michael Neuling
    - Add virt_to_pfn and use this instead of opencoding from Aneesh Kumar
    K.V
    - Add ppc64le_defconfig from Michael Ellerman
    - pseries: extract of_helpers module from Andy Shevchenko
    - Correct string length in pseries_of_derive_parent() from Nathan
    Fontenot
    - Free the MSI bitmap if it was slab allocated from Denis Kirjanov
    - Shorten irq_chip name for the SIU from Christophe Leroy
    - Wait 1s for secondaries to enter OPAL during kexec from Samuel
    Mendoza-Jonas
    - Fix _ALIGN_* errors due to type difference, from Aneesh Kumar K.V
    - powerpc/pseries/hvcserver: don't memset pi_buff if it is null from
    Colin Ian King
    - Disable hugepd for 64K page size, from Aneesh Kumar K.V
    - Differentiate between hugetlb and THP during page walk from Aneesh
    Kumar K.V
    - Make PCI non-optional for pseries from Michael Ellerman
    - Individual System V IPC system calls from Sam bobroff
    - Add selftest of unmuxed IPC calls from Michael Ellerman
    - discard .exit.data at runtime from Stephen Rothwell
    - Delete old orphaned PrPMC 280/2800 DTS and boot file, from Paul
    Gortmaker
    - Use of_get_next_parent to simplify code from Christophe Jaillet
    - Paginate some xmon output from Sam bobroff
    - Add some more elements to the xmon PACA dump from Michael Ellerman
    - Allow the tm-syscall selftest to build with old headers from Michael
    Ellerman
    - Run EBB selftests only on POWER8 from Denis Kirjanov
    - Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPU from Michael
    Ellerman
    - Avoid reference to potentially freed memory in prom.c from Christophe
    Jaillet
    - Quieten boot wrapper output with run_cmd from Geoff Levand
    - EEH fixes and cleanups from Gavin Shan
    - Fix recursive fenced PHB on Broadcom shiner adapter from Gavin Shan
    - Use of_get_next_parent() in of_get_ibm_chip_id() from Michael
    Ellerman
    - Fix section mismatch warning in msi_bitmap_alloc() from Denis
    Kirjanov
    - Fix ps3-lpm white space from Rudhresh Kumar J
    - Fix ps3-vuart null dereference from Colin King
    - nvram: Add missing kfree in error path from Christophe Jaillet
    - nvram: Fix function name in some errors messages, from Christophe
    Jaillet
    - drivers/macintosh: adb: fix misleading Kconfig help text from Aaro
    Koskinen
    - agp/uninorth: fix a memleak in create_gatt_table from Denis Kirjanov
    - cxl: Free virtual PHB when removing from Andrew Donnellan
    - scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target from
    Michael Ellerman
    - scripts/kconfig/Makefile: Fix KBUILD_DEFCONFIG check when building
    with O= from Michael Ellerman
    - Freescale updates from Scott: Highlights include 64-bit book3e
    kexec/kdump support, a rework of the qoriq clock driver, device tree
    changes including qoriq fman nodes, support for a new 85xx board, and
    some fixes.
    - MPC5xxx updates from Anatolij: Highlights include a driver for
    MPC512x LocalPlus Bus FIFO with its device tree binding
    documentation, mpc512x device tree updates and some minor fixes.

    * tag 'powerpc-4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (106 commits)
    powerpc/msi: Fix section mismatch warning in msi_bitmap_alloc()
    powerpc/prom: Use of_get_next_parent() in of_get_ibm_chip_id()
    powerpc/pseries: Correct string length in pseries_of_derive_parent()
    powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry
    powerpc/mpc85xx: Add FSL QorIQ DPAA FMan support to the SoC device tree(s)
    powerpc/mpc85xx: Create dts components for the FSL QorIQ DPAA FMan
    powerpc/fsl: Add #clock-cells and clockgen label to clockgen nodes
    powerpc: handle error case in cpm_muram_alloc()
    powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
    powerpc/book3e-64: Enable kexec
    powerpc/book3e-64/kexec: Set "r4 = 0" when entering spinloop
    powerpc/booke: Only use VIRT_PHYS_OFFSET on booke32
    powerpc/book3e-64/kexec: Enable SMP release
    powerpc/book3e-64/kexec: create an identity TLB mapping
    powerpc/book3e-64: Don't limit paca to 256 MiB
    powerpc/book3e/kdump: Enable crash_kexec_wait_realmode
    powerpc/book3e: support CONFIG_RELOCATABLE
    powerpc/booke64: Fix args to copy_and_flush
    powerpc/book3e-64: rename interrupt_end_book3e with __end_interrupts
    powerpc/e6500: kexec: Handle hardware threads
    ...

    Linus Torvalds
     
  • Pull documentation update from Jon Corbet:
    "There is a nice new document from Neil on how pathname lookups work
    and some new CAN driver documentation. Beyond that, we have
    kernel-doc fixes, a bit more work to support reproducible builds, and
    the usual collection of small fixes"

    * tag 'docs-for-linus' of git://git.lwn.net/linux: (34 commits)
    Documentation: add new description of path-name lookup.
    Documentation/vm/slub.txt: document slabinfo-gnuplot.sh
    Doc: ABI/stable: Fix typo in ABI/stable
    doc: Clarify that nmi_watchdog param is for hardlockups
    Typo correction for description in gpio document.
    DocBook: Fix kernel-doc to be case-insensitive for private:
    kernel-docs.txt: update kernelnewbies reference
    Doc:kvm: Fix typo in Doc/virtual/kvm
    Documentation/Changes: Add bc in "Current Minimal Requirements" section
    Documentation/email-clients.txt: remove trailing whitespace
    DocBook: Use a fixed encoding for output
    MAINTAINERS: The docs tree has moved
    Docs/kernel-parameters: Add earlycon devicetree usage
    SubmittingPatches: make Subject examples match the de facto standard
    Documentation: gpio: mention that -gpio has been deprecated
    Documentation: cgroups: just fix a few typos
    Documentation: Update kselftest.txt
    Documentation: DMA API: Be more explicit that nents is always the same
    Documentation: Update the default value of crashkernel low
    zram: update documentation
    ...

    Linus Torvalds
     
  • Pull security subsystem update from James Morris:
    "This is mostly maintenance updates across the subsystem, with a
    notable update for TPM 2.0, and addition of Jarkko Sakkinen as a
    maintainer of that"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (40 commits)
    apparmor: clarify CRYPTO dependency
    selinux: Use a kmem_cache for allocation struct file_security_struct
    selinux: ioctl_has_perm should be static
    selinux: use sprintf return value
    selinux: use kstrdup() in security_get_bools()
    selinux: use kmemdup in security_sid_to_context_core()
    selinux: remove pointless cast in selinux_inode_setsecurity()
    selinux: introduce security_context_str_to_sid
    selinux: do not check open perm on ftruncate call
    selinux: change CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE default
    KEYS: Merge the type-specific data with the payload data
    KEYS: Provide a script to extract a module signature
    KEYS: Provide a script to extract the sys cert list from a vmlinux file
    keys: Be more consistent in selection of union members used
    certs: add .gitignore to stop git nagging about x509_certificate_list
    KEYS: use kvfree() in add_key
    Smack: limited capability for changing process label
    TPM: remove unnecessary little endian conversion
    vTPM: support little endian guests
    char: Drop owner assignment from i2c_driver
    ...

    Linus Torvalds
     
  • Pull media updates from Mauro Carvalho Chehab:
    "Media updates, including:

    - Lots of improvements at the kABI documentation
    - Split of Videobuf2 into a common part and a V4L2 specific one
    - Split of the VB2 tracing events into a separate header file
    - s5p-mfc got support for Exynos 5433
    - v4l2 fixes for 64-bits alignment when running 32 bits userspace
    on ARM
    - Added support for SDR radio transmitter at core, vivid and hackrf
    drivers
    - Some y2038 fixups
    - Some improvements at V4L2 colorspace support
    - saa7164 converted to use the V4L2 core control framework
    - several new boards additions, cleanups and fixups

    PS: There are two patches for scripts/kernel-doc that are needed by
    the documentation patches on Media. Jon is OK on merging those via
    my tree"

    * tag 'media/v4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (146 commits)
    [media] c8sectpfe: Remove select on CONFIG_FW_LOADER_USER_HELPER_FALLBACK
    [media] DocBook media: update copyright/version numbers
    [media] ivtv: Convert to get_user_pages_unlocked()
    [media] media/v4l2-ctrls: fix setting autocluster to manual with VIDIOC_S_CTRL
    [media] DocBook media: Fix a typo in encoder cmd
    [media] DocBook: add SDR specific info to G_MODULATOR / S_MODULATOR
    [media] DocBook: add SDR specific info to G_TUNER / S_TUNER
    [media] hackrf: do not set human readable name for formats
    [media] hackrf: add support for transmitter
    [media] hackrf: switch to single function which configures everything
    [media] hackrf: add control for RF amplifier
    [media] DocBook: add modulator type field
    [media] v4l: add type field to v4l2_modulator struct
    [media] DocBook: document SDR transmitter
    [media] v4l2: add support for SDR transmitter
    [media] DocBook: document tuner RF gain control
    [media] v4l2: add RF gain control
    [media] v4l2: rename V4L2_TUNER_ADC to V4L2_TUNER_SDR
    [media] media/vivid-osd: fix info leak in ioctl
    [media] media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2
    ...

    Linus Torvalds
     

05 Nov, 2015

2 commits

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver update for 4.4-rc1. Lots of
    different driver and subsystem updates, hwtracing being the largest
    with the addition of some new platforms that are now supported. Full
    details in the shortlog.

    All of these have been in linux-next for a long time with no reported
    issues"

    * tag 'char-misc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (181 commits)
    fpga: socfpga: Fix check of return value of devm_request_irq
    lkdtm: fix ACCESS_USERSPACE test
    mcb: Destroy IDA on module unload
    mcb: Do not return zero on error path in mcb_pci_probe()
    mei: bus: set the device name before running fixup
    mei: bus: use correct lock ordering
    mei: Fix debugfs filename in error output
    char: ipmi: ipmi_ssif: Replace timeval with timespec64
    fpga: zynq-fpga: Fix issue with drvdata being overwritten.
    fpga manager: remove unnecessary null pointer checks
    fpga manager: ensure lifetime with of_fpga_mgr_get
    fpga: zynq-fpga: Change fw format to handle bin instead of bit.
    fpga: zynq-fpga: Fix unbalanced clock handling
    misc: sram: partition base address belongs to __iomem space
    coresight: etm3x: adding documentation for sysFS's cpu interface
    vme: 8-bit status/id takes 256 values, not 255
    fpga manager: Adding FPGA Manager support for Xilinx Zynq 7000
    ARM: zynq: dt: Updated devicetree for Zynq 7000 platform.
    ARM: dt: fpga: Added binding docs for Xilinx Zynq FPGA manager.
    ver_linux: proc/modules, limit text processing to 'sed'
    ...

    Linus Torvalds
     
  • Pull arm64 updates from Catalin Marinas:

    - "genirq: Introduce generic irq migration for cpu hotunplugged" patch
    merged from tip/irq/for-arm to allow the arm64-specific part to be
    upstreamed via the arm64 tree

    - CPU feature detection reworked to cope with heterogeneous systems
    where CPUs may not have exactly the same features. The features
    reported by the kernel via internal data structures or ELF_HWCAP are
    delayed until all the CPUs are up (and before user space starts)

    - Support for 16KB pages, with the additional bonus of a 36-bit VA
    space, though the latter only depending on EXPERT

    - Implement native {relaxed, acquire, release} atomics for arm64

    - New ASID allocation algorithm which avoids IPI on roll-over, together
    with TLB invalidation optimisations (using local vs global where
    feasible)

    - KASan support for arm64

    - EFI_STUB clean-up and isolation for the kernel proper (required by
    KASan)

    - copy_{to,from,in}_user optimisations (sharing the memcpy template)

    - perf: moving arm64 to the arm32/64 shared PMU framework

    - L1_CACHE_BYTES increased to 128 to accommodate Cavium hardware

    - Support for the contiguous PTE hint on kernel mapping (16 consecutive
    entries may be able to use a single TLB entry)

    - Generic CONFIG_HZ now used on arm64

    - defconfig updates

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (91 commits)
    arm64/efi: fix libstub build under CONFIG_MODVERSIONS
    ARM64: Enable multi-core scheduler support by default
    arm64/efi: move arm64 specific stub C code to libstub
    arm64: page-align sections for DEBUG_RODATA
    arm64: Fix build with CONFIG_ZONE_DMA=n
    arm64: Fix compat register mappings
    arm64: Increase the max granular size
    arm64: remove bogus TASK_SIZE_64 check
    arm64: make Timer Interrupt Frequency selectable
    arm64/mm: use PAGE_ALIGNED instead of IS_ALIGNED
    arm64: cachetype: fix definitions of ICACHEF_* flags
    arm64: cpufeature: declare enable_cpu_capabilities as static
    genirq: Make the cpuhotplug migration code less noisy
    arm64: Constify hwcap name string arrays
    arm64/kvm: Make use of the system wide safe values
    arm64/debug: Make use of the system wide safe value
    arm64: Move FP/ASIMD hwcap handling to common code
    arm64/HWCAP: Use system wide safe values
    arm64/capabilities: Make use of system wide safe value
    arm64: Delay cpu feature capability checks
    ...

    Linus Torvalds
     

21 Oct, 2015

2 commits

  • The supplied script takes a signed module file and extracts the tailmost
    signature (there could theoretically be more than one) and dumps all or
    part of it or the unsigned file to stdout.

    Call as:

    scripts/extract-module-sig.pl -[0adnks] module-file >out

    where the initial flag indicates which bit of the signed file you want dumping
    to stdout:

    (*) "-0". Dumps the unsigned data with the signature stripped.

    (*) "-a". Dumps all of the signature data, including the magic number.

    (*) "-d". Dumps the signature information block as a sequence of decimal
    numbers in text form with spaces between (crypto algorithm type,
    hash type, identifier type, signer's name length, key identifier
    length and signature length).

    (*) "-n". Dumps the signer's name contents.

    (*) "-k". Dumps the key identifier contents.

    (*) "-s". Dumps the cryptographic signature contents.

    In the case that the signature is a PKCS#7 (or CMS) message, -n and -k will
    print a warning to stderr and dump nothing to stdout, but will otherwise
    complete okay; the entire PKCS#7/CMS message will be dumped by "-s"; and "-d"
    will show "0 0 2 0 0 ".

    Signed-off-by: David Howells

    David Howells
     
  • The supplied script takes a vmlinux file - and if necessary a System.map
    file - locates the system certificates list and extracts it to the named
    file.

    Call as:

    ./scripts/extract-sys-certs vmlinux certs

    if vmlinux contains symbols and:

    ./scripts/extract-sys-certs -s System.map vmlinux certs

    if it does not.

    It prints something like the following to stdout:

    Have 27 sections
    No symbols in vmlinux, trying System.map
    Have 80088 symbols
    Have 1346 bytes of certs at VMA 0xffffffff8201c540
    Certificate list in section .init.data
    Certificate list at file offset 0x141c540

    If vmlinux contains symbols then that is used rather than System.map - even
    if one is given.

    Signed-off-by: David Howells

    David Howells
     

18 Oct, 2015

22 commits


17 Oct, 2015

1 commit

  • Commit 3716001bcb7f ("deb-pkg: add source package") added the ability to
    create a debian changelog file. This exposed that previously the
    builddeb script hasn't cleared debian/files between builds.

    As debian/files keeps accumulating entries, the changes file will end up
    growing indefinelty. With outdated entries in debian/files, builddeb
    script will exit with failure. This regression impacts those who use
    "make deb-pkg" target to build kernel into a .deb package and never use
    "make mrproper" or other means to clean kernel tree from generated
    directories.

    To fix the regression, remove debian/files before starting build and in
    the generated clean rule.

    Fixes: 3716001bcb7f ("deb-pkg: add source package")
    Signed-off-by: Riku Voipio
    Reported-by: Doug Smythies
    Tested-by: Doug Smythies
    Tested-by: Kalle Valo
    Acked-by: Ben Hutchings
    Cc: Michal Marek
    Cc: maximilian attems
    Cc: Chris J Arges
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Riku Voipio
     

15 Oct, 2015

1 commit

  • My recent commit d2036f30cfe1 ("scripts/kconfig/Makefile: Allow
    KBUILD_DEFCONFIG to be a target"), contained a bug in that when it
    checks if KBUILD_DEFCONFIG is a file it forgets to prepend $(srctree) to
    the path.

    This causes the build to fail when building out of tree (with O=), and
    when the value of KBUILD_DEFCONFIG is 'defconfig'. In that case we will
    fail to find the 'defconfig' file, because we look in the build
    directory not $(srctree), and so we will call Make again with
    'defconfig' as the target. From there we loop infinitely calling 'make
    defconfig' again and again.

    The fix is simple, we need to look for the file under $(srctree).

    Fixes: d2036f30cfe1 ("scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target")
    Reported-by: Olof Johansson
    Acked-by: Michal Marek
    Signed-off-by: Michael Ellerman

    Michael Ellerman
     

13 Oct, 2015

1 commit

  • This patch adds arch specific code for kernel address sanitizer
    (see Documentation/kasan.txt).

    1/8 of kernel addresses reserved for shadow memory. There was no
    big enough hole for this, so virtual addresses for shadow were
    stolen from vmalloc area.

    At early boot stage the whole shadow region populated with just
    one physical page (kasan_zero_page). Later, this page reused
    as readonly zero shadow for some memory that KASan currently
    don't track (vmalloc).
    After mapping the physical memory, pages for shadow memory are
    allocated and mapped.

    Functions like memset/memmove/memcpy do a lot of memory accesses.
    If bad pointer passed to one of these function it is important
    to catch this. Compiler's instrumentation cannot do this since
    these functions are written in assembly.
    KASan replaces memory functions with manually instrumented variants.
    Original functions declared as weak symbols so strong definitions
    in mm/kasan/kasan.c could replace them. Original functions have aliases
    with '__' prefix in name, so we could call non-instrumented variant
    if needed.
    Some files built without kasan instrumentation (e.g. mm/slub.c).
    Original mem* function replaced (via #define) with prefixed variants
    to disable memory access checks for such files.

    Signed-off-by: Andrey Ryabinin
    Tested-by: Linus Walleij
    Reviewed-by: Catalin Marinas
    Signed-off-by: Catalin Marinas

    Andrey Ryabinin
     

12 Oct, 2015

1 commit


10 Oct, 2015

2 commits


06 Oct, 2015

1 commit


01 Oct, 2015

1 commit

  • Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the
    defconfig that should be built by default.

    However currently there is an assumption that KBUILD_DEFCONFIG points to
    a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG).

    We would like to use a target, using merge_config, as our defconfig, so
    adapt the logic in scripts/kconfig/Makefile to allow that.

    To minimise the chance of breaking anything, we first check if
    KBUILD_DEFCONFIG is a file, and if so we do the old logic. If it's not a
    file, then we call the top-level Makefile with KBUILD_DEFCONFIG as the
    target.

    Signed-off-by: Michael Ellerman
    Acked-by: Michal Marek

    Michael Ellerman
     

28 Sep, 2015

1 commit

  • Currently the encoding of documents generated by DocBook depends on
    the current locale. Make the output reproducible independently of
    the locale, by setting the encoding to UTF-8 (LC_CTYPE=C.UTF-8) by
    preference, or ASCII (LC_CTYPE=C) as a fallback.

    LC_CTYPE can normally be overridden by LC_ALL, but the top-level
    Makefile unsets that.

    Signed-off-by: Ben Hutchings
    [jc: added check-lc_ctype to .gitignore]
    Signed-off-by: Jonathan Corbet

    Ben Hutchings
     

25 Sep, 2015

1 commit

  • The sign-file.c program actually uses CMS rather than PKCS#7 to sign a file
    since that allows the target X.509 certificate to be specified by
    subjectKeyId rather than by issuer + serialNumber.

    However, older versions of the OpenSSL crypto library (such as may be found
    in CentOS 5.11) don't support CMS. Assume everything prior to
    OpenSSL-1.0.0 doesn't support CMS and switch to using PKCS#7 in that case.

    Further, the pre-1.0.0 OpenSSL only supports PKCS#7 signing with SHA1, so
    give an error from the sign-file script if the caller requests anything
    other than SHA1.

    The compiler gives the following error with an OpenSSL crypto library
    that's too old:

    HOSTCC scripts/sign-file
    scripts/sign-file.c:23:25: fatal error: openssl/cms.h: No such file or directory
    #include

    Reported-by: Vinson Lee
    Signed-off-by: David Howells
    Acked-by: David Woodhouse

    David Howells