18 Jan, 2020

1 commit

  • /* Background. */
    For a very long time, extending openat(2) with new features has been
    incredibly frustrating. This stems from the fact that openat(2) is
    possibly the most famous counter-example to the mantra "don't silently
    accept garbage from userspace" -- it doesn't check whether unknown flags
    are present[1].

    This means that (generally) the addition of new flags to openat(2) has
    been fraught with backwards-compatibility issues (O_TMPFILE has to be
    defined as __O_TMPFILE|O_DIRECTORY|[O_RDWR or O_WRONLY] to ensure old
    kernels gave errors, since it's insecure to silently ignore the
    flag[2]). All new security-related flags therefore have a tough road to
    being added to openat(2).

    Userspace also has a hard time figuring out whether a particular flag is
    supported on a particular kernel. While it is now possible with
    contemporary kernels (thanks to [3]), older kernels will expose unknown
    flag bits through fcntl(F_GETFL). Giving a clear -EINVAL during
    openat(2) time matches modern syscall designs and is far more
    fool-proof.

    In addition, the newly-added path resolution restriction LOOKUP flags
    (which we would like to expose to user-space) don't feel related to the
    pre-existing O_* flag set -- they affect all components of path lookup.
    We'd therefore like to add a new flag argument.

    Adding a new syscall allows us to finally fix the flag-ignoring problem,
    and we can make it extensible enough so that we will hopefully never
    need an openat3(2).

    /* Syscall Prototype. */
    /*
    * open_how is an extensible structure (similar in interface to
    * clone3(2) or sched_setattr(2)). The size parameter must be set to
    * sizeof(struct open_how), to allow for future extensions. All future
    * extensions will be appended to open_how, with their zero value
    * acting as a no-op default.
    */
    struct open_how { /* ... */ };

    int openat2(int dfd, const char *pathname,
    struct open_how *how, size_t size);

    /* Description. */
    The initial version of 'struct open_how' contains the following fields:

    flags
    Used to specify openat(2)-style flags. However, any unknown flag
    bits or otherwise incorrect flag combinations (like O_PATH|O_RDWR)
    will result in -EINVAL. In addition, this field is 64-bits wide to
    allow for more O_ flags than currently permitted with openat(2).

    mode
    The file mode for O_CREAT or O_TMPFILE.

    Must be set to zero if flags does not contain O_CREAT or O_TMPFILE.

    resolve
    Restrict path resolution (in contrast to O_* flags they affect all
    path components). The current set of flags are as follows (at the
    moment, all of the RESOLVE_ flags are implemented as just passing
    the corresponding LOOKUP_ flag).

    RESOLVE_NO_XDEV => LOOKUP_NO_XDEV
    RESOLVE_NO_SYMLINKS => LOOKUP_NO_SYMLINKS
    RESOLVE_NO_MAGICLINKS => LOOKUP_NO_MAGICLINKS
    RESOLVE_BENEATH => LOOKUP_BENEATH
    RESOLVE_IN_ROOT => LOOKUP_IN_ROOT

    open_how does not contain an embedded size field, because it is of
    little benefit (userspace can figure out the kernel open_how size at
    runtime fairly easily without it). It also only contains u64s (even
    though ->mode arguably should be a u16) to avoid having padding fields
    which are never used in the future.

    Note that as a result of the new how->flags handling, O_PATH|O_TMPFILE
    is no longer permitted for openat(2). As far as I can tell, this has
    always been a bug and appears to not be used by userspace (and I've not
    seen any problems on my machines by disallowing it). If it turns out
    this breaks something, we can special-case it and only permit it for
    openat(2) but not openat2(2).

    After input from Florian Weimer, the new open_how and flag definitions
    are inside a separate header from uapi/linux/fcntl.h, to avoid problems
    that glibc has with importing that header.

    /* Testing. */
    In a follow-up patch there are over 200 selftests which ensure that this
    syscall has the correct semantics and will correctly handle several
    attack scenarios.

    In addition, I've written a userspace library[4] which provides
    convenient wrappers around openat2(RESOLVE_IN_ROOT) (this is necessary
    because no other syscalls support RESOLVE_IN_ROOT, and thus lots of care
    must be taken when using RESOLVE_IN_ROOT'd file descriptors with other
    syscalls). During the development of this patch, I've run numerous
    verification tests using libpathrs (showing that the API is reasonably
    usable by userspace).

    /* Future Work. */
    Additional RESOLVE_ flags have been suggested during the review period.
    These can be easily implemented separately (such as blocking auto-mount
    during resolution).

    Furthermore, there are some other proposed changes to the openat(2)
    interface (the most obvious example is magic-link hardening[5]) which
    would be a good opportunity to add a way for userspace to restrict how
    O_PATH file descriptors can be re-opened.

    Another possible avenue of future work would be some kind of
    CHECK_FIELDS[6] flag which causes the kernel to indicate to userspace
    which openat2(2) flags and fields are supported by the current kernel
    (to avoid userspace having to go through several guesses to figure it
    out).

    [1]: https://lwn.net/Articles/588444/
    [2]: https://lore.kernel.org/lkml/CA+55aFyyxJL1LyXZeBsf2ypriraj5ut1XkNDsunRBqgVjZU_6Q@mail.gmail.com
    [3]: commit 629e014bb834 ("fs: completely ignore unknown open flags")
    [4]: https://sourceware.org/bugzilla/show_bug.cgi?id=17523
    [5]: https://lore.kernel.org/lkml/20190930183316.10190-2-cyphar@cyphar.com/
    [6]: https://youtu.be/ggD-eb3yPVs

    Suggested-by: Christian Brauner
    Signed-off-by: Aleksa Sarai
    Signed-off-by: Al Viro

    Aleksa Sarai
     

29 Oct, 2019

1 commit


10 Oct, 2019

1 commit


01 Oct, 2019

1 commit


13 Sep, 2019

1 commit


20 Jul, 2019

1 commit


15 Jul, 2019

1 commit


25 Jun, 2019

1 commit


10 Jun, 2019

1 commit

  • It's better to use my kadlec@netfilter.org email address in
    the source code. I might not be able to use
    kadlec@blackhole.kfki.hu in the future.

    Signed-off-by: Jozsef Kadlecsik
    Signed-off-by: Jozsef Kadlecsik

    Jozsef Kadlecsik
     

31 May, 2019

1 commit


07 Mar, 2019

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver patch pull request for 5.1-rc1.

    The largest thing by far is the new habanalabs driver for their AI
    accelerator chip. For now it is in the drivers/misc directory but will
    probably move to a new directory soon along with other drivers of this
    type.

    Other than that, just the usual set of individual driver updates and
    fixes. There's an "odd" merge in here from the DRM tree that they
    asked me to do as the MEI driver is starting to interact with the i915
    driver, and it needed some coordination. All of those patches have
    been properly acked by the relevant subsystem maintainers.

    All of these have been in linux-next with no reported issues, most for
    quite some time"

    * tag 'char-misc-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (219 commits)
    habanalabs: adjust Kconfig to fix build errors
    habanalabs: use %px instead of %p in error print
    habanalabs: use do_div for 64-bit divisions
    intel_th: gth: Fix an off-by-one in output unassigning
    habanalabs: fix little-endiancpu conversion warnings
    habanalabs: use NULL to initialize array of pointers
    habanalabs: fix little-endiancpu conversion warnings
    habanalabs: soft-reset device if context-switch fails
    habanalabs: print pointer using %p
    habanalabs: fix memory leak with CBs with unaligned size
    habanalabs: return correct error code on MMU mapping failure
    habanalabs: add comments in uapi/misc/habanalabs.h
    habanalabs: extend QMAN0 job timeout
    habanalabs: set DMA0 completion to SOB 1007
    habanalabs: fix validation of WREG32 to DMA completion
    habanalabs: fix mmu cache registers init
    habanalabs: disable CPU access on timeouts
    habanalabs: add MMU DRAM default page mapping
    habanalabs: Dissociate RAZWI info from event types
    misc/habanalabs: adjust Kconfig to fix build errors
    ...

    Linus Torvalds
     

22 Feb, 2019

1 commit


18 Feb, 2019

1 commit


05 Jan, 2019

1 commit


04 Dec, 2018

1 commit

  • Move Eric Miao and Haojian Zhuang over to CREDITS, since they're AWOL
    for some time already. The git trees have gone away too.

    I'm adding myself as a reviewer. I'd like to be Cc'd on patches and will
    be able to test them, but I don't possess a data sheet thus there might
    be things I'll be unable to review. Hence the Odd-Fixes status.

    Signed-off-by: Lubomir Rintel
    Signed-off-by: Olof Johansson

    Lubomir Rintel
     

26 Nov, 2018

1 commit


19 Nov, 2018

1 commit

  • Jarkko's e-mail address hasn't worked for a long time. We still want to
    keep this driver working as it is critical for some of the OMAP boards.
    I use and test this driver frequently, so change myself as a maintainer
    with "Odd Fixes" status.

    Link: http://lkml.kernel.org/r/20181106222750.12939-1-aaro.koskinen@iki.fi
    Signed-off-by: Aaro Koskinen
    Acked-by: Tony Lindgren
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aaro Koskinen
     

18 Aug, 2018

1 commit

  • Ron Minnich has left Sandia in 2011, and has not been involved in any 9p
    commit in recent years. Also add a CREDITS entry to record his
    contributions.

    Link: http://lkml.kernel.org/r/1534486244-1055-1-git-send-email-asmadeus@codewreck.org
    Signed-off-by: Dominique Martinet
    Cc: Eric Van Hensbergen
    Cc: Ron Minnich
    Cc: Ronald G. Minnich
    Cc: Latchesar Ionkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dominique Martinet
     

06 Mar, 2018

1 commit


10 Nov, 2017

1 commit

  • [akpm@linux-foundation.org: alpha-sort CREDITS, per Randy]
    Link: http://lkml.kernel.org/r/20170915223811.21368-1-jarkko.sakkinen@linux.intel.com
    Signed-off-by: Jarkko Sakkinen
    Cc: Marcel Selhorst
    Cc: Ashley Lai
    Cc: Mimi Zohar
    Cc: Jarkko Sakkinen
    Cc: Boris Brezillon
    Cc: Borislav Petkov
    Cc: Håvard Skinnemoen
    Cc: Martin Kepplinger
    Cc: Pavel Machek
    Cc: Geert Uytterhoeven
    Cc: Hans-Christian Noren Egtvedt
    Cc: Arnaldo Carvalho de Melo
    Cc: Gertjan van Wingerde
    Cc: Greg Kroah-Hartman
    Cc: David S. Miller
    Cc: Mauro Carvalho Chehab
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jarkko Sakkinen
     

13 Sep, 2017

1 commit

  • Pull selinux updates from Paul Moore:
    "A relatively quiet period for SELinux, 11 patches with only two/three
    having any substantive changes.

    These noteworthy changes include another tweak to the NNP/nosuid
    handling, per-file labeling for cgroups, and an object class fix for
    AF_UNIX/SOCK_RAW sockets; the rest of the changes are minor tweaks or
    administrative updates (Stephen's email update explains the file
    explosion in the diffstat).

    Everything passes the selinux-testsuite"

    [ Also a couple of small patches from the security tree from Tetsuo
    Handa for Tomoyo and LSM cleanup. The separation of security policy
    updates wasn't all that clean - Linus ]

    * tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
    selinux: constify nf_hook_ops
    selinux: allow per-file labeling for cgroupfs
    lsm_audit: update my email address
    selinux: update my email address
    MAINTAINERS: update the NetLabel and Labeled Networking information
    selinux: use GFP_NOWAIT in the AVC kmem_caches
    selinux: Generalize support for NNP/nosuid SELinux domain transitions
    selinux: genheaders should fail if too many permissions are defined
    selinux: update the selinux info in MAINTAINERS
    credits: update Paul Moore's info
    selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets
    tomoyo: Update URLs in Documentation/admin-guide/LSM/tomoyo.rst
    LSM: Remove security_task_create() hook.

    Linus Torvalds
     

02 Sep, 2017

1 commit

  • Fix various typos and whitespace errors:

    s/Synopsis/Synopsys/
    s/Designware/DesignWare/
    s/Keystine/Keystone/
    s/gpio/GPIO/
    s/pcie/PCIe/
    s/phy/PHY/
    s/confgiruation/configuration/

    No functional change intended.

    Signed-off-by: Bjorn Helgaas

    Bjorn Helgaas
     

26 Jul, 2017

1 commit


01 May, 2017

1 commit

  • This patch drops support for AVR32 architecture from the Linux kernel.

    The AVR32 architecture is not keeping up with the development of the
    kernel, and since it shares so much of the drivers with Atmel ARM SoC,
    it is starting to hinder these drivers to develop swiftly.

    Also, all AVR32 AP7 SoC processors are end of lifed from Atmel (now
    Microchip).

    Finally, the GCC toolchain is stuck at version 4.2.x, and has not
    received any patches since the last release from Atmel;
    4.2.4-atmel.1.1.3.avr32linux.1. When building kernel v4.10, this
    toolchain is no longer able to properly link the network stack.

    Haavard and I have came to the conclusion that we feel keeping AVR32 on
    life support offers more obstacles for Atmel ARMs, than it gives joy to
    AVR32 users. I also suspect there are very few AVR32 users left today,
    if anybody at all.

    Signed-off-by: Hans-Christian Noren Egtvedt
    Signed-off-by: Håvard Skinnemoen
    Signed-off-by: Nicolas Ferre
    Acked-by: Andy Shevchenko
    Acked-by: Boris Brezillon

    Hans-Christian Noren Egtvedt
     

14 Feb, 2017

1 commit


22 Dec, 2016

1 commit


13 Dec, 2016

1 commit

  • Pull x86 microcode update from Ingo Molnar:
    "The biggest change (by Borislav Petkov) is a thorough rewrite of the
    Intel microcode loader and its interactions with the core code.

    The biggest conceptual change is the decoupling of the microcode
    loading on boot and application processors (which load the microcode
    in different scenarios), so that both parse the input patches with as
    few assumptions as possible - this also fixes various kernel address
    space randomization bugs. (The AP side then goes on and caches the
    result to improve boot performance.)

    Since the AMD side already did this, this change also opened up the
    path towards more unification/simplification of the core microcode
    loading infrastructure:

    10 files changed, 647 insertions(+), 940 deletions(-)

    which speaks for itself"

    * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/microcode: Bump driver version, update copyrights
    x86/microcode: Rework microcode loading
    x86/microcode/intel: Remove intel_lib.c
    x86/microcode/amd: Move private inlines to .c and mark local functions static
    x86/microcode: Collect CPU info on resume
    x86/microcode: Issue the debug printk on resume only on success
    x86/microcode/amd: Hand down the CPU family
    x86/microcode: Export the microcode cache linked list
    x86/microcode: Remove one #ifdef clause
    x86/microcode/intel: Simplify generic_load_microcode()
    x86/microcode: Move driver authors to CREDITS
    x86/microcode: Run the AP-loading routine only on the application processors

    Linus Torvalds
     

03 Dec, 2016

1 commit

  • Ozgur Karatas reported that the very first entry in the CREDITS file had
    the wrong tag for name (M: instead of N: - it happened when moving the
    entry from the MAINTAINERS file, where 'M:' stands for "Maintainer").

    And when I went looking, I found a couple of other cases of wrong
    tagging too.

    Reported-by: Ozgur Karatas
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

28 Oct, 2016

1 commit


25 Oct, 2016

1 commit

  • They're not active anymore.

    Signed-off-by: Borislav Petkov
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20161025095522.11964-3-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     

08 Oct, 2016

1 commit


07 Oct, 2016

1 commit

  • Pull power supply and reset updates from Sebastian Reichel:
    - move power supply drivers to drivers/power/supply
    - unify location of power supply DT documentation
    - tps65217-charger: IRQ support
    - act8945a-charger: misc. cleanups & improvements
    - sbs-battery cleanup
    - fix users of deprecated create_singlethread_workqueue()
    - misc fixes.

    * tag 'for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (46 commits)
    power: supply: bq27xxx_battery: allow kernel poll_interval parameter runtime update
    power: supply: sbs-battery: Cleanup removal of chip->pdata
    power: reset: st: Remove obsolete platforms from dt doc
    power: reset: st-poweroff: Remove obsolete platforms.
    power: reset: zx-reboot: Unmap region obtained by of_iomap
    power: reset: xgene-reboot: Unmap region obtained by of_iomap
    power: supply: ab8500: cleanup with list_first_entry_or_null()
    power: reset: add in missing white space in error message text
    sbs-battery: make writes to ManufacturerAccess optional
    power: bq24257: Fix use of uninitialized pointer bq->charger
    power: supply: sbs-battery: simplify DT parsing
    power: supply: bq24735-charger: Request status GPIO with initial input setup
    power: supply: sbs-battery: Use gpio_desc and sleeping calls for battery detect
    power: supply: act8945a_charger: Add max current property
    power: supply: act8945a_charger: Add capacity level property
    doc: bindings: power: act8945a-charger: Update properties.
    power: supply: act8945a_charger: Fix the power supply type
    power: supply: act8945a_charger: Add status change update support
    power: supply: act8945a_charger: Improve state handling
    power: supply: act8945a_charger: Remove "battery_temperature"
    ...

    Linus Torvalds
     

05 Oct, 2016

1 commit

  • Pull EDAC updates from Borislav Petkov:
    "A lot of movement in the EDAC tree this time around, coarse summary
    below:

    - Altera Arria10 enablement of NAND, DMA, USB, QSPI and SD-MMC FIFO
    buffers (Thor Thayer)

    - split the memory controller part out of mpc85xx and share it with a
    new Freescale ARM Layerscape driver (York Sun)

    - amd64_edac fixes (Yazen Ghannam)

    - misc cleanups, refactoring and fixes all over the place"

    * tag 'edac_for_4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: (37 commits)
    EDAC, altera: Add IRQ Flags to disable IRQ while handling
    EDAC, altera: Correct EDAC IRQ error message
    EDAC, amd64: Autoload module using x86_cpu_id
    EDAC, sb_edac: Remove NULL pointer check on array pci_tad
    EDAC: Remove NO_IRQ from powerpc-only drivers
    EDAC, fsl_ddr: Fix error return code in fsl_mc_err_probe()
    EDAC, fsl_ddr: Add entry to MAINTAINERS
    EDAC: Move Doug Thompson to CREDITS
    EDAC, I3000: Orphan driver
    EDAC, fsl_ddr: Replace simple_strtoul() with kstrtoul()
    EDAC, layerscape: Add Layerscape EDAC support
    EDAC, fsl_ddr: Fix IRQ dispose warning when module is removed
    EDAC, fsl_ddr: Add support for little endian
    EDAC, fsl_ddr: Add missing DDR DRAM types
    EDAC, fsl_ddr: Rename macros and names
    EDAC, fsl-ddr: Separate FSL DDR driver from MPC85xx
    EDAC, mpc85xx: Replace printk() with pr_* format
    EDAC, mpc85xx: Drop setting/clearing RFXE bit in HID1
    EDAC, altera: Rename MC trigger to common name
    EDAC, altera: Rename device trigger to common name
    ...

    Linus Torvalds
     

04 Oct, 2016

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here's the "big" char and misc driver update for 4.9-rc1.

    Lots of little things here, all over the driver tree for subsystems
    that flow through me. Nothing major that I can discern, full details
    are in the shortlog.

    All have been in the linux-next tree with no reported issues"

    * tag 'char-misc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (144 commits)
    drivers/misc/hpilo: Changes to support new security states in iLO5 FW
    at25: fix debug and error messaging
    misc/genwqe: ensure zero initialization
    vme: fake: remove unexpected unlock in fake_master_set()
    vme: fake: mark symbols static where possible
    spmi: pmic-arb: Return an error code if sanity check fails
    Drivers: hv: get rid of id in struct vmbus_channel
    Drivers: hv: make VMBus bus ids persistent
    mcb: Add a dma_device to mcb_device
    mcb: Enable PCI bus mastering by default
    mei: stop the stall timer worker if not needed
    clk: probe common clock drivers earlier
    vme: fake: fix build for 64-bit dma_addr_t
    ttyprintk: Neaten and simplify printing
    mei: me: add kaby point device ids
    coresight: tmc: mark symbols static where possible
    coresight: perf: deal with error condition properly
    Drivers: hv: hv_util: Avoid dynamic allocation in time synch
    fpga manager: Add hardware dependency to Zynq driver
    Drivers: hv: utils: Support TimeSync version 4.0 protocol samples.
    ...

    Linus Torvalds
     

19 Sep, 2016

1 commit


10 Sep, 2016

1 commit


01 Sep, 2016

1 commit


31 Aug, 2016

2 commits


16 Jun, 2016

1 commit

  • For the third time in three years, I'm changing my e-mail at Samsung.
    That's bad, as it may stop communications with me for a while. So, this
    time, I'll also add the mchehab@kernel.org e-mail, as it remains stable
    since ever.

    Cc: stable@vger.kernel.org
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Linus Torvalds

    Mauro Carvalho Chehab