Skip to content
Snippets Groups Projects
  1. Dec 12, 2018
    • Tycho Andersen's avatar
      seccomp: add a return code to trap to userspace · 6a21cc50
      Tycho Andersen authored
      
      This patch introduces a means for syscalls matched in seccomp to notify
      some other task that a particular filter has been triggered.
      
      The motivation for this is primarily for use with containers. For example,
      if a container does an init_module(), we obviously don't want to load this
      untrusted code, which may be compiled for the wrong version of the kernel
      anyway. Instead, we could parse the module image, figure out which module
      the container is trying to load and load it on the host.
      
      As another example, containers cannot mount() in general since various
      filesystems assume a trusted image. However, if an orchestrator knows that
      e.g. a particular block device has not been exposed to a container for
      writing, it want to allow the container to mount that block device (that
      is, handle the mount for it).
      
      This patch adds functionality that is already possible via at least two
      other means that I know about, both of which involve ptrace(): first, one
      could ptrace attach, and then iterate through syscalls via PTRACE_SYSCALL.
      Unfortunately this is slow, so a faster version would be to install a
      filter that does SECCOMP_RET_TRACE, which triggers a PTRACE_EVENT_SECCOMP.
      Since ptrace allows only one tracer, if the container runtime is that
      tracer, users inside the container (or outside) trying to debug it will not
      be able to use ptrace, which is annoying. It also means that older
      distributions based on Upstart cannot boot inside containers using ptrace,
      since upstart itself uses ptrace to monitor services while starting.
      
      The actual implementation of this is fairly small, although getting the
      synchronization right was/is slightly complex.
      
      Finally, it's worth noting that the classic seccomp TOCTOU of reading
      memory data from the task still applies here, but can be avoided with
      careful design of the userspace handler: if the userspace handler reads all
      of the task memory that is necessary before applying its security policy,
      the tracee's subsequent memory edits will not be read by the tracer.
      
      Signed-off-by: default avatarTycho Andersen <tycho@tycho.ws>
      CC: Kees Cook <keescook@chromium.org>
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Oleg Nesterov <oleg@redhat.com>
      CC: Eric W. Biederman <ebiederm@xmission.com>
      CC: "Serge E. Hallyn" <serge@hallyn.com>
      Acked-by: default avatarSerge Hallyn <serge@hallyn.com>
      CC: Christian Brauner <christian@brauner.io>
      CC: Tyler Hicks <tyhicks@canonical.com>
      CC: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      6a21cc50
  2. Sep 20, 2018
  3. Sep 09, 2018
    • Henrik Austad's avatar
      Drop all 00-INDEX files from Documentation/ · a7ddcea5
      Henrik Austad authored
      
      This is a respin with a wider audience (all that get_maintainer returned)
      and I know this spams a *lot* of people. Not sure what would be the correct
      way, so my apologies for ruining your inbox.
      
      The 00-INDEX files are supposed to give a summary of all files present
      in a directory, but these files are horribly out of date and their
      usefulness is brought into question. Often a simple "ls" would reveal
      the same information as the filenames are generally quite descriptive as
      a short introduction to what the file covers (it should not surprise
      anyone what Documentation/sched/sched-design-CFS.txt covers)
      
      A few years back it was mentioned that these files were no longer really
      needed, and they have since then grown further out of date, so perhaps
      it is time to just throw them out.
      
      A short status yields the following _outdated_ 00-INDEX files, first
      counter is files listed in 00-INDEX but missing in the directory, last
      is files present but not listed in 00-INDEX.
      
      List of outdated 00-INDEX:
      Documentation: (4/10)
      Documentation/sysctl: (0/1)
      Documentation/timers: (1/0)
      Documentation/blockdev: (3/1)
      Documentation/w1/slaves: (0/1)
      Documentation/locking: (0/1)
      Documentation/devicetree: (0/5)
      Documentation/power: (1/1)
      Documentation/powerpc: (0/5)
      Documentation/arm: (1/0)
      Documentation/x86: (0/9)
      Documentation/x86/x86_64: (1/1)
      Documentation/scsi: (4/4)
      Documentation/filesystems: (2/9)
      Documentation/filesystems/nfs: (0/2)
      Documentation/cgroup-v1: (0/2)
      Documentation/kbuild: (0/4)
      Documentation/spi: (1/0)
      Documentation/virtual/kvm: (1/0)
      Documentation/scheduler: (0/2)
      Documentation/fb: (0/1)
      Documentation/block: (0/1)
      Documentation/networking: (6/37)
      Documentation/vm: (1/3)
      
      Then there are 364 subdirectories in Documentation/ with several files that
      are missing 00-INDEX alltogether (and another 120 with a single file and no
      00-INDEX).
      
      I don't really have an opinion to whether or not we /should/ have 00-INDEX,
      but the above 00-INDEX should either be removed or be kept up to date. If
      we should keep the files, I can try to keep them updated, but I rather not
      if we just want to delete them anyway.
      
      As a starting point, remove all index-files and references to 00-INDEX and
      see where the discussion is going.
      
      Signed-off-by: default avatarHenrik Austad <henrik@austad.us>
      Acked-by: default avatar"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Just-do-it-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Reviewed-by: default avatarJens Axboe <axboe@kernel.dk>
      Acked-by: default avatarPaul Moore <paul@paul-moore.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Acked-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.com>
      Cc: [Almost everybody else]
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      a7ddcea5
  4. Sep 03, 2018
  5. Aug 10, 2018
  6. Jul 19, 2018
  7. Jul 15, 2018
  8. May 16, 2018
  9. May 14, 2018
  10. May 08, 2018
  11. Apr 16, 2018
  12. Mar 16, 2018
    • Arnd Bergmann's avatar
      arch: remove tile port · bb9d8126
      Arnd Bergmann authored
      The Tile architecture port was added by Chris Metcalf in 2010, and
      maintained until early 2018 when he orphaned it due to his departure
      from Mellanox, and nobody else stepped up to maintain it. The product
      line is still around in the form of the BlueField SoC, but no longer
      uses the Tile architecture.
      
      There are also still products for sale with Tile-GX SoCs, notably the
      Mikrotik CCR router family. The products all use old (linux-3.3) kernels
      with lots of patches and won't be upgraded by their manufacturers. There
      have been efforts to port both OpenWRT and Debian to these, but both
      projects have stalled and are very unlikely to be continued in the future.
      
      Given that we are reasonably sure that nobody is still using the port
      with an upstream kernel any more, it seems better to remove it now while
      the port is in a good shape than to let it bitrot for a few years first.
      
      Cc: Chris Metcalf <chris.d.metcalf@gmail.com>
      Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      Link: http://www.mellanox.com/page/npu_multicore_overview
      Link: https://jenkins.debian.net/view/rebootstrap/job/rebootstrap_tilegx_gcc7/
      
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      bb9d8126
  13. Jan 27, 2018
  14. Jun 26, 2017
  15. Apr 27, 2017
  16. Apr 12, 2017
  17. Mar 09, 2017
    • Jens Wiklander's avatar
      tee: generic TEE subsystem · 967c9cca
      Jens Wiklander authored
      
      Initial patch for generic TEE subsystem.
      This subsystem provides:
      * Registration/un-registration of TEE drivers.
      * Shared memory between normal world and secure world.
      * Ioctl interface for interaction with user space.
      * Sysfs implementation_id of TEE driver
      
      A TEE (Trusted Execution Environment) driver is a driver that interfaces
      with a trusted OS running in some secure environment, for example,
      TrustZone on ARM cpus, or a separate secure co-processor etc.
      
      The TEE subsystem can serve a TEE driver for a Global Platform compliant
      TEE, but it's not limited to only Global Platform TEEs.
      
      This patch builds on other similar implementations trying to solve
      the same problem:
      * "optee_linuxdriver" by among others
        Jean-michel DELORME<jean-michel.delorme@st.com> and
        Emmanuel MICHEL <emmanuel.michel@st.com>
      * "Generic TrustZone Driver" by Javier González <javier@javigon.com>
      
      Acked-by: default avatarAndreas Dannenberg <dannenberg@ti.com>
      Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
      Tested-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> (RCAR H3)
      Tested-by: default avatarScott Branden <scott.branden@broadcom.com>
      Reviewed-by: default avatarJavier González <javier@javigon.com>
      Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
      967c9cca
  18. Jan 26, 2017
  19. Jan 18, 2017
    • Bjorn Andersson's avatar
      rpmsg: Driver for user space endpoint interface · c0cdc19f
      Bjorn Andersson authored
      
      This driver allows rpmsg instances to expose access to rpmsg endpoints
      to user space processes. It provides a control interface, allowing
      userspace to export endpoints and an endpoint interface for each exposed
      endpoint.
      
      The implementation is based on prior art by Texas Instrument, Google,
      PetaLogix and was derived from a FreeRTOS performance statistics driver
      written by Michal Simek.
      
      The control interface provides a "create endpoint" ioctl, which is fed a
      name, source and destination address. The three values are used to
      create the endpoint, in a backend-specific way, and a rpmsg endpoint
      device is created - with the three parameters are available in sysfs for
      udev usage.
      
      E.g. to create an endpoint device for one of the Qualcomm SMD channel
      related to DIAG one would issue:
      
        struct rpmsg_endpoint_info info = { "DIAG_CNTL", 0, 0 };
        int fd = open("/dev/rpmsg_ctrl0", O_RDWR);
        ioctl(fd, RPMSG_CREATE_EPT_IOCTL, &info);
      
      Each created endpoint device shows up as an individual character device
      in /dev, allowing permission to be controlled on a per-endpoint basis.
      The rpmsg endpoint will be created and destroyed following the opening
      and closing of the endpoint device, allowing rpmsg backends to open and
      close the physical channel, if supported by the wire protocol.
      
      Cc: Marek Novak <marek.novak@nxp.com>
      Cc: Matteo Sartori <matteo.sartori@t3lab.it>
      Cc: Michal Simek <monstr@monstr.eu>
      Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      c0cdc19f
  20. Sep 06, 2016
  21. Aug 02, 2016
  22. Jul 12, 2016
  23. Jun 25, 2016
  24. Mar 10, 2016
  25. Nov 20, 2015
  26. Oct 29, 2015
    • Matias Bjørling's avatar
      lightnvm: Support for Open-Channel SSDs · cd9e9808
      Matias Bjørling authored
      
      Open-channel SSDs are devices that share responsibilities with the host
      in order to implement and maintain features that typical SSDs keep
      strictly in firmware. These include (i) the Flash Translation Layer
      (FTL), (ii) bad block management, and (iii) hardware units such as the
      flash controller, the interface controller, and large amounts of flash
      chips. In this way, Open-channels SSDs exposes direct access to their
      physical flash storage, while keeping a subset of the internal features
      of SSDs.
      
      LightNVM is a specification that gives support to Open-channel SSDs
      LightNVM allows the host to manage data placement, garbage collection,
      and parallelism. Device specific responsibilities such as bad block
      management, FTL extensions to support atomic IOs, or metadata
      persistence are still handled by the device.
      
      The implementation of LightNVM consists of two parts: core and
      (multiple) targets. The core implements functionality shared across
      targets. This is initialization, teardown and statistics. The targets
      implement the interface that exposes physical flash to user-space
      applications. Examples of such targets include key-value store,
      object-store, as well as traditional block devices, which can be
      application-specific.
      
      Contributions in this patch from:
      
        Javier Gonzalez <jg@lightnvm.io>
        Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
        Jesper Madsen <jmad@itu.dk>
      
      Signed-off-by: default avatarMatias Bjørling <m@bjorling.me>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      cd9e9808
  27. Oct 04, 2015
    • Alexander Shishkin's avatar
      stm class: Introduce an abstraction for System Trace Module devices · 7bd1d409
      Alexander Shishkin authored
      
      A System Trace Module (STM) is a device exporting data in System Trace
      Protocol (STP) format as defined by MIPI STP standards. Examples of such
      devices are Intel(R) Trace Hub and Coresight STM.
      
      This abstraction provides a unified interface for software trace sources
      to send their data over an STM device to a debug host. In order to do
      that, such a trace source needs to be assigned a pair of master/channel
      identifiers that all the data from this source will be tagged with. The
      STP decoder on the debug host side will use these master/channel tags to
      distinguish different trace streams from one another inside one STP
      stream.
      
      This abstraction provides a configfs-based policy management mechanism
      for dynamic allocation of these master/channel pairs based on trace
      source-supplied string identifier. It has the flexibility of being
      defined at runtime and at the same time (provided that the policy
      definition is aligned with the decoding end) consistency.
      
      For userspace trace sources, this abstraction provides write()-based and
      mmap()-based (if the underlying stm device allows this) output mechanism.
      
      For kernel-side trace sources, we provide "stm_source" device class that
      can be connected to an stm device at run time.
      
      Cc: linux-api@vger.kernel.org
      Reviewed-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7bd1d409
  28. Sep 04, 2015
    • Andrea Arcangeli's avatar
      userfaultfd: uAPI · 1038628d
      Andrea Arcangeli authored
      
      Defines the uAPI of the userfaultfd, notably the ioctl numbers and protocol.
      
      Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Acked-by: default avatarPavel Emelyanov <xemul@parallels.com>
      Cc: Sanidhya Kashyap <sanidhya.gatech@gmail.com>
      Cc: zhang.zhanghailiang@huawei.com
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Andres Lagar-Cavilla <andreslc@google.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Peter Feiner <pfeiner@google.com>
      Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: "Huangpeng (Peter)" <peter.huangpeng@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1038628d
  29. Aug 27, 2015
  30. Aug 04, 2015
  31. Jul 24, 2015
    • Azael Avalos's avatar
      toshiba_acpi: Add /dev/toshiba_acpi device · fc5462f8
      Azael Avalos authored
      
      There were previous attempts to "merge" the toshiba SMM module to the
      toshiba_acpi one, they were trying to imitate what the old toshiba
      module does, however, some models (TOS1900 devices) come with a
      "crippled" implementation and do not provide all the "features" a
      "genuine" Toshiba BIOS does.
      
      This patch adds a new device called toshiba_acpi, which aim is to
      enable userspace to access the SMM on Toshiba laptops via ACPI calls.
      
      Creating a new convenience _IOWR command to access the SCI functions
      by opening/closing the SCI internally to avoid buggy BIOS, while at
      the same time providing backwards compatibility.
      
      Older programs (and new) who wish to access the SMM on newer models
      can do it by pointing their path to /dev/toshiba_acpi (instead of
      /dev/toshiba) as the toshiba.h header was modified to reflect these
      changes as well as adds all the toshiba_acpi paths and command,
      however, it is strongly recommended to use the new IOCTL for any
      SCI command to avoid any buggy BIOS.
      
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      fc5462f8
  32. Jul 01, 2015
  33. Feb 26, 2015
  34. Oct 08, 2014
  35. Aug 09, 2014
  36. Jun 20, 2014
  37. Jan 24, 2014
  38. Oct 17, 2013
    • Clemens Ladisch's avatar
      ALSA: add DICE driver · 82fbb4f7
      Clemens Ladisch authored
      
      As a start point for further development, this is an incomplete driver
      for DICE devices:
      - only playback (so no clock source except the bus clock)
      - only 44.1 kHz
      - no MIDI
      - recovery after bus reset is slow
      - hwdep device is created, but not actually implemented
      
      Contains compilation fixes by Stefan Richter.
      
      Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
      82fbb4f7
Loading