Skip to content
Tags give the ability to mark specific points in history as being important
  • arm-setfs-v4
    ARM: kill CONFIG_SET_FS
    
    This is set of patches to kill set_fs() on the ARM architecture, as part
    of the broader effort described at https://lwn.net/Articles/832121/
    
    I have tested the oabi-compat changes using the LTP tests for the three
    modified syscalls using an Armv7 kernel and a Debian 5 OABI user space.
    
    I also tested the syscall_get_nr() in all combinations of OABI/EABI
    kernel user space and fixed the bugs I found after Russell pointed out
    one of those issues.
    
  • wimax-staging
    wimax: move to staging
    
    After I sent a fix for what appeared to be a harmless warning in
    the wimax user interface code, the conclusion was that the whole
    thing has most likely not been used in a very long time, and the
    user interface possibly been broken since b61a5eea5904 ("wimax: use
    genl_register_family_with_ops()").
    
    Using a shared branch between net-next and staging should help
    coordinate patches getting submitted against it.
    
  • sh5-remove
    29e36fbe · sh: remove sh5 support ·
    sh: remove sh5 support
    
    At long last, this is the removal of the 64-bit sh5 port
    that never went into production.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • compat-ioctl-fix
    compat-ioctl fix for v5.6
    
    One patch in the compat-ioctl series broke 32-bit rootfs for multiple
    people testing on 64-bit kernels. Let's fix it in -rc1 before others
    run into the same issue.
    
  • y2038-drivers-for-v5.6-signed
    y2038: core, driver and file system changes
    
    These are updates to device drivers and file systems that for some reason
    or another were not included in the kernel in the previous y2038 series.
    
    I've gone through all users of time_t again to make sure the kernel is
    in a long-term maintainable state, replacing all remaining references
    to time_t with safe alternatives.
    
    Some related parts of the series were picked up into the nfsd, xfs,
    alsa and v4l2 trees. A final set of patches in linux-mm removes the now
    unused time_t/timeval/timespec types and helper functions after all five
    branches are merged for linux-5.6, ensuring that no new users get merged.
    
    As a result, linux-5.6, or my backport of the patches to 5.4 [1], should
    be the first release that can serve as a base for a 32-bit system designed
    to run beyond year 2038, with a few remaining caveats:
    
    - All user space must be compiled with a 64-bit time_t, which will be
      supported in the coming musl-1.2 and glibc-2.32 releases, along with
      installed kernel headers from linux-5.6 or higher.
    
    - Applications that use the system call interfaces directly need to be
      ported to use the time64 syscalls added in linux-5.1 in place of the
      existing system calls. This impacts most users of futex() and seccomp()
      as well as programming languages that have their own runtime environment
      not based on libc.
    
    - Applications that use a private copy of kernel uapi header files or
      their contents may need to update to the linux-5.6 version, in
      particular for sound/asound.h, xfs/xfs_fs.h, linux/input.h,
      linux/elfcore.h, linux/sockios.h, linux/timex.h and linux/can/bcm.h.
    
    - A few remaining interfaces cannot be changed to pass a 64-bit time_t
      in a compatible way, so they must be configured to use CLOCK_MONOTONIC
      times or (with a y2106 problem) unsigned 32-bit timestamps. Most
      importantly this impacts all users of 'struct input_event'.
    
    - All y2038 problems that are present on 64-bit machines also apply to
      32-bit machines. In particular this affects file systems with on-disk
      timestamps using signed 32-bit seconds: ext4 with ext3-style small
      inodes, ext2, xfs (to be fixed soon) and ufs.
    
    Changes since v1 [2]:
    
    - Add Acks I received
    - Rebase to v5.5-rc1, dropping patches that got merged already
    - Add NFS, XFS and the final three patches from another series
    - Rewrite etnaviv patches
    - Add one late revert to avoid an etnaviv regression
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=y2038-endgame
    [2] https://lore.kernel.org/lkml/20191108213257.3097633-1-arnd@arndb.de/
    
  • asm-generic-5.5
    asm-generic: fixes for v5.5
    
    Here are two bugfixes from Mike Rapoport, both fixing
    compile-time errors for the nds32 architecture that
    were recently introduced.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • block-ioctl-cleanup-5.6
    block, scsi: final compat_ioctl cleanup
    
    This series concludes the work I did for linux-5.5 on the compat_ioctl()
    cleanup, killing off fs/compat_ioctl.c and block/compat_ioctl.c by moving
    everything into drivers.
    
    Overall this would be a reduction both in complexity and line count, but
    as I'm also adding documentation the overall number of lines increases
    in the end.
    
    My plan was originally to keep the SCSI and block parts separate.
    This did not work easily because of interdependencies: I cannot
    do the final SCSI cleanup in a good way without first addressing the
    CDROM ioctls, so this is one series that I hope could be merged through
    either the block or the scsi git trees, or possibly both if you can
    pull in the same branch.
    
    The series comes in these steps:
    
    1. clean up the sg v3 interface as suggested by Linus. I have
       talked about this with Doug Gilbert as well, and he would
       rebase his sg v4 patches on top of "compat: scsi: sg: fix v3
       compat read/write interface"
    
    2. Actually moving handlers out of block/compat_ioctl.c and
       block/scsi_ioctl.c into drivers, mixed in with cleanup
       patches
    
    3. Document how to do this right. I keep getting asked about this,
       and it helps to point to some documentation file.
    
    The branch is based on another one that fixes a couple of bugs found
    during the creation of this series.
    
    Changes since v3:
      https://lore.kernel.org/lkml/20200102145552.1853992-1-arnd@arndb.de/
    
    - Move sr_compat_ioctl fixup to correct patch (Ben Hutchings)
    - Add Reviewed-by tags
    
    Changes since v2:
      https://lore.kernel.org/lkml/20191217221708.3730997-1-arnd@arndb.de/
    
    - Rebase to v5.5-rc4, which contains the earlier bugfixes
    - Fix sr_block_compat_ioctl() error handling bug found by
      Ben Hutchings
    - Fix idecd_locked_compat_ioctl() compat_ptr() bug
    - Don't try to handle HDIO_DRIVE_TASKFILE in drivers/ide
    - More documentation improvements
    
    Changes since v1:
      https://lore.kernel.org/lkml/20191211204306.1207817-1-arnd@arndb.de/
    
    - move out the bugfixes into a branch for itself
    - clean up scsi sg driver further as suggested by Christoph Hellwig
    - avoid some ifdefs by moving compat_ptr() out of asm/compat.h
    - split out the blkdev_compat_ptr_ioctl function; bug spotted by
      Ben Hutchings
    - Improve formatting of documentation
    
  • block-ioctl-fixes-5.5
    block: ioctl fixes for v5.5
    
    My work on eliminating the fs/compat_ioctl.c and block/compat_ioctl.c
    files for linux-5.6 uncovered a couple of bugs that should be fixed
    as soon as possible:
    
    - the pktcdvd driver was broken in linux-5.5 with my previous
      cleanup series and needs a oneline patch.
    
    - multiple ioctl commands were added in the past two years without
      a compat handler, I'm adding one patch per kernel version that
      needs the fixes to be backported.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • y2038-alsa-v8-signed
    ALSA: Fix year 2038 issue for sound subsystem
    
    This is a series I worked on with Baolin in 2017 and 2018, but we
    never quite managed to finish up the last pieces. During the
    ALSA developer meetup at ELC-E 2018 in Edinburgh, a decision was
    made to go with this approach for keeping best compatibility
    with existing source code, and then I failed to follow up by
    resending the patches.
    
    Now I have patches for all remaining time_t uses in the kernel,
    so it's absolutely time to revisit them. I have done more
    review of the patches myself and found a couple of minor issues
    that I have fixed up, otherwise the series is still the same as
    before.
    
    Conceptually, the idea of these patches is:
    
    - 64-bit applications should see no changes at all, neither
      compile-time nor run-time.
    
    - 32-bit code compiled with a 64-bit time_t currently
      does not work with ALSA, and requires kernel changes and/or
      sound/asound.h changes
    
    - Most 32-bit code using these interfaces will work correctly
      on a modified kernel, with or without the uapi header changes.
    
    - 32-bit code using SNDRV_TIMER_IOCTL_TREAD requires the
      updated header file for 64-bit time_t support
    
    - 32-bit i386 user space with 64-bit time_t is broken for
      SNDRV_PCM_IOCTL_STATUS, SNDRV_RAWMIDI_IOCTL_STATUS and
      SNDRV_PCM_IOCTL_SYNC_PTR because of i386 alignment. This is also
      addressed by the updated uapi header.
    
    - PCM mmap is currently supported on native x86 kernels
      (both 32-bit and 64-bit) but not for compat mode. This series breaks
      the 32-bit native mmap support for 32-bit time_t, but instead allows
      it for 64-bit time_t on both native and compat kernels. This seems to
      be the best trade-off, as mmap support is optional already, and most
      32-bit code runs in compat mode anyway.
    
    - I've tried to avoid breaking compilation of 32-bit code
      as much as possible. Anything that does break however is likely code
      that is already broken on 64-bit time_t and needs source changes to
      fix them.
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git y2038-alsa-v8
    [2] https://lore.kernel.org/lkml/CAK8P3a2Os66+iwQYf97qh05W2JP8rmWao8zmKoHiXqVHvyYAJA@mail.gmail.com/T/#m6519cb07cfda08adf1dedea6596bb98892b4d5dc
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
    Changes since v7: (Arnd):
     - Fix a typo found by Ben Hutchings
    
    Changes since v6: (Arnd):
     - Add a patch to update the API versions
     - Hide a timespec reference in #ifndef __KERNEL__ to remove the
       last reference to time_t
     - Use a more readable way to do padding and describe it in the
       changelog
     - Rebase to linux-5.5-rc1, changing include/sound/soc-component.h
       and sound/drivers/aloop.c as needed.
    
    Changes since v5 (Arnd):
     - Rebased to linux-5.4-rc4
     - Updated to completely remove timespec and time_t references from alsa
     - found and fixed a few bugs
    
    Changes since v4 (Baolin):
     - Add patch 5 to change trigger_tstamp member of struct snd_pcm_runtime.
     - Add patch 8 to change internal timespec.
     - Add more explanation in commit message.
     - Use ktime_get_real_ts64() in patch 6.
     - Split common code out into a separate function in patch 6.
     - Fix tu->tread bug in patch 6 and remove #if __BITS_PER_LONG == 64 macro.
    
    Changes since v3:
     - Move struct snd_pcm_status32 to pcm.h file.
     - Modify comments and commit message.
     - Add new patch2 ~ patch6.
    
    Changes since v2:
     - Renamed all structures to make clear.
     - Remove CONFIG_X86_X32 macro and introduced new compat_snd_pcm_status64_x86_32.
    
    Changes since v1:
     - Add one macro for struct snd_pcm_status_32 which only active in 32bits kernel.
     - Convert pcm_compat.c to use struct snd_pcm_status_64.
     - Convert pcm_native.c to use struct snd_pcm_status_64.
    
  • y2038-cleanups-5.5
    y2038: syscall implementation cleanups
    
    This is a series of cleanups for the y2038 work, mostly intended
    for namespace cleaning: the kernel defines the traditional
    time_t, timeval and timespec types that often lead to y2038-unsafe
    code. Even though the unsafe usage is mostly gone from the kernel,
    having the types and associated functions around means that we
    can still grow new users, and that we may be missing conversions
    to safe types that actually matter.
    
    There are still a number of driver specific patches needed to
    get the last users of these types removed, those have been
    submitted to the respective maintainers.
    
    Link: https://lore.kernel.org/lkml/20191108210236.1296047-1-arnd@arndb.de/
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • compat-ioctl-5.5
    compat_ioctl: remove most of fs/compat_ioctl.c
    
    As part of the cleanup of some remaining y2038 issues, I came to
    fs/compat_ioctl.c, which still has a couple of commands that need support
    for time64_t.
    
    In completely unrelated work, I spent time on cleaning up parts of this
    file in the past, moving things out into drivers instead.
    
    After Al Viro reviewed an earlier version of this series and did a lot
    more of that cleanup, I decided to try to completely eliminate the rest
    of it and move it all into drivers.
    
    This series incorporates some of Al's work and many patches of my own,
    but in the end stops short of actually removing the last part, which is
    the scsi ioctl handlers. I have patches for those as well, but they need
    more testing or possibly a rewrite.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • compat-ioctl-5.4-2
    compat_ioctl: remove most of fs/compat_ioctl.c
    
    As part of the cleanup of some remaining y2038 issues, I came to
    fs/compat_ioctl.c, which still has a couple of commands that need support
    for time64_t.
    
    In completely unrelated work, I spent time on cleaning up parts of this
    file in the past, moving things out into drivers instead.
    
    After Al Viro reviewed an earlier version of this series and did a lot
    more of that cleanup, I decided to try to completely eliminate the rest
    of it and move it all into drivers.
    
    This series incorporates some of Al's work and many patches of my own,
    but in the end stops short of actually removing the last part, which is
    the scsi ioctl handlers. I have patches for those as well, but they need
    more testing or possibly a rewrite.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • compat-ioctl-5.4
    compat_ioctl: remove most of fs/compat_ioctl.c
    
    As part of the cleanup of some remaining y2038 issues, I came to
    fs/compat_ioctl.c, which still has a couple of commands that need support
    for time64_t.
    
    In completely unrelated work, I spent time on cleaning up parts of this
    file in the past, moving things out into drivers instead.
    
    After Al Viro reviewed an earlier version of this series and did a lot
    more of that cleanup, I decided to try to completely eliminate the rest
    of it and move it all into drivers.
    
    This series incorporates some of Al's work and many patches of my own,
    but in the end stops short of actually removing the last part, which is
    the scsi ioctl handlers. I have patches for those as well, but they need
    more testing or possibly a rewrite.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • y2038-vfs
    y2038: add inode timestamp clamping
    
    This series from Deepa Dinamani adds a per-superblock minimum/maximum
    timestamp limit for a file system, and clamps timestamps as they are
    written, to avoid random behavior from integer overflow as well as having
    different time stamps on disk vs in memory.
    
    At mount time, a warning is now printed for any file system that can
    represent current timestamps but not future timestamps more than 30
    years into the future, similar to the arbitrary 30 year limit that was
    added to settimeofday().
    
    This was picked as a compromise to warn users to migrate to other file
    systems (e.g. ext4 instead of ext3) when they need the file system to
    survive beyond 2038 (or similar limits in other file systems), but not
    get in the way of normal usage.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • isdn-removal
    isdn: deprecate non-mISDN drivers
    
    When isdn4linux came up in the context of another patch series, I
    remembered that we had discussed removing it a while ago.
    
    It turns out that the suggestion from Karsten Keil wa to remove I4L
    in 2018 after the last public ISDN networks are shut down. This has
    happened now (with a very small number of exceptions), so I guess it's
    time to try again.
    
    We currently have three ISDN stacks in the kernel: the original
    isdn4linux (with the hisax driver), the newer CAPI (with four drivers),
    and finally the mISDN stack (supporting roughly the same hardware as
    hisax).
    
    As far as I can tell, anyone using ISDN with mainline kernel drivers in
    the past few years uses mISDN, and this is typically used for voice-only
    PBX installations that don't require a public network.
    
    The older stacks support additional features for data networks, but those
    typically make no sense any more if there is no network to connect to.
    
    My proposal for this time is to kill off isdn4linux entirely, as it seems
    to have been unusable for quite a while. This code has been abandoned
    for many years and it does cause problems for treewide maintenance as
    it tends to do everything that we try to stop doing.
    Birger Harzenetter mentioned that is is still using i4l in order to
    make use of the 'divert' feature that is not part of mISDN, but has
    otherwise moved on to mISDN for normal operation, like apparently
    everyone else.
    
    CAPI in turn is not quite as obsolete, but two of the drivers (avm
    and hysdn) don't seem to be used at all, while another one (gigaset)
    will stop being maintained as Paul Bolle is no longer able to
    test it after the network gets shut down in September.
    All three are now moved into drivers/staging to let others speak
    up in case there are remaining users.
    This leaves Bluetooth CMTP as the only remaining user of CAPI, but
    Marcel Holtmann wishes to keep maintaining it.
    
    For the discussion on version 1, see [2]
    Unfortunately, Karsten Keil as the maintainer has not participated in
    the discussion.
    
          Arnd
    
    [1] https://patchwork.kernel.org/patch/8484861/#17900371
    [2] https://listserv.isdn4linux.de/pipermail/isdn4linux/2019-April/thread.html
    
  • y2038-fix
    y2038: A build fix for compat mode
    
    Here is one more patch on top of the y2038 changes already pulled
    for linux-5.1, for some reason this had escaped all testing.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • y2038-syscall-abi
    y2038: additional syscall ABI cleanup
    
    This is a follow-up to the y2038 syscall patches already merged in the tip
    tree.  As the final 32-bit RISC-V syscall ABI is still being decided on,
    this is the last chance to make a few corrections to leave out interfaces
    based on 32-bit time_t along with the old off_t and rlimit types.
    
    The series achieves this in a few steps:
    
    - A couple of bug fixes for minor regressions I introduced
      in the original series
    
    - A couple of older patches from Yury Norov that I had never
      merged in the past, these fix up the openat/open_by_handle_at and
      getrlimit/setrlimit syscalls to disallow the old versions of off_t
      and rlimit.
    
    - Hiding the deprecated system calls behind an #ifdef in
      include/uapi/asm-generic/unistd.h
    
    - Change arch/riscv to drop all these ABIs.
    
    Originally, the plan was to also leave these out on C-Sky, but that now
    has a glibc port that uses the older interfaces, so we need to leave
    them in place.
    
  • y2038-new-syscalls
    y2038: Add time64 system calls
    
    This series finally gets us to the point of having system calls with
    64-bit time_t on all architectures, after a long time of incremental
    preparation patches.
    
    There was actually one conversion that I missed during the summer,
    i.e. Deepa's timex series, which I now updated based the 5.0-rc1 changes
    and review comments.
    
    The following system calls are now added on all 32-bit architectures
    using the same system call numbers:
    
    403 clock_gettime64
    404 clock_settime64
    405 clock_adjtime64
    406 clock_getres_time64
    407 clock_nanosleep_time64
    408 timer_gettime64
    409 timer_settime64
    410 timerfd_gettime64
    411 timerfd_settime64
    412 utimensat_time64
    413 pselect6_time64
    414 ppoll_time64
    416 io_pgetevents_time64
    417 recvmmsg_time64
    418 mq_timedsend_time64
    419 mq_timedreceiv_time64
    420 semtimedop_time64
    421 rt_sigtimedwait_time64
    422 futex_time64
    423 sched_rr_get_interval_time64
    
    Each one of these corresponds directly to an existing system call
    that includes a 'struct timespec' argument, or a structure containing
    a timespec or (in case of clock_adjtime) timeval. Not included here
    are new versions of getitimer/setitimer and getrusage/waitid, which
    are planned for the future but only needed to make a consistent API
    rather than for correct operation beyond y2038. These four system
    calls are based on 'timeval', and it has not been finally decided
    what the replacement kernel interface will use instead.
    
    So far, I have done a lot of build testing across most architectures,
    which has found a number of bugs. Runtime testing so far included
    testing LTP on 32-bit ARM with the existing system calls, to ensure
    we do not regress for existing binaries, and a test with a 32-bit
    x86 build of LTP against a modified version of the musl C library
    that has been adapted to the new system call interface [3].
    This library can be used for testing on all architectures supported
    by musl-1.1.21, but it is not how the support is getting integrated
    into the official musl release. Official musl support is planned
    but will require more invasive changes to the library.
    
    Link: https://lore.kernel.org/lkml/20190110162435.309262-1-arnd@arndb.de/T/
    Link: https://lore.kernel.org/lkml/20190118161835.2259170-1-arnd@arndb.de/
    Link: https://git.linaro.org/people/arnd/musl-y2038.git/ [2]
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • y2038-syscall-cleanup
    arch: System call unification and cleanup
    
    The system call tables have diverged a bit over the years, and a number
    of the recent additions never made it into all architectures, for one
    reason or another.
    
    This is an attempt to clean it up as far as we can without breaking
    compatibility, doing a number of steps:
    
    - Add system calls that have not yet been integrated into all
      architectures but that we definitely want there. This includes
      {,f}statfs64() and get{eg,eu,g,p,u,pp}id() on alpha, which have
      been missing traditionally.
    
    - The s390 compat syscall handling is cleaned up to be more like
      what we do on other architectures, while keeping the 31-bit
      pointer extension. This was merged as a shared branch by the
      s390 maintainers and is included here in order to base the other
      patches on top.
    
    - Add the separate ipc syscalls on all architectures that
      traditionally only had sys_ipc(). This version is done without
      support for IPC_OLD that is we have in sys_ipc. The
      new semtimedop_time64 syscall will only be added here, not
      in sys_ipc
    
    - Add syscall numbers for a couple of syscalls that we probably
      don't need everywhere, in particular pkey_* and rseq,
      for the purpose of symmetry: if it's in asm-generic/unistd.h,
      it makes sense to have it everywhere. I expect that any future
      system calls will get assigned on all platforms together, even
      when they appear to be specific to a single architecture.
    
    - Prepare for having the same system call numbers for any future
      calls. In combination with the generated tables, this hopefully
      makes it easier to add new calls across all architectures
      together.
    
    All of the above are technically separate from the y2038 work,
    but are done as preparation before we add the new 64-bit time_t
    system calls everywhere, providing a common baseline set of system
    calls.
    
    I expect that glibc and other libraries that want to use 64-bit
    time_t will require linux-5.1 kernel headers for building in
    the future, and at a much later point may also require linux-5.1
    or a later version as the minimum kernel at runtime. Having a
    common baseline then allows the removal of many architecture or
    kernel version specific workarounds.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    
  • y2038-for-4.21
    y2038: more syscalls and cleanups
    
    This concludes the main part of the system call rework for 64-bit time_t,
    which has spread over most of year 2018, the last six system calls being
    
     - ppoll
     - pselect6
     - io_pgetevents
     - recvmmsg
     - futex
     - rt_sigtimedwait
    
    As before, nothing changes for 64-bit architectures, while 32-bit
    architectures gain another entry point that differs only in the layout
    of the timespec structure. Hopefully in the next release we can wire up
    all 22 of those system calls on all 32-bit architectures, which gives
    us a baseline version for glibc to start using them.
    
    This does not include the clock_adjtime, getrusage/waitid, and
    getitimer/setitimer system calls. I still plan to have new versions
    of those as well, but they are not required for correct operation of
    the C library since they can be emulated using the old 32-bit time_t
    based system calls.
    
    Aside from the system calls, there are also a few cleanups here,
    removing old kernel internal interfaces that have become unused after
    all references got removed. The arch/sh cleanups are part of this,
    there were posted several times over the past year without a reaction
    from the maintainers, while the corresponding changes made it into all
    other architectures.