23 Oct, 2019

1 commit

  • The .ioctl and .compat_ioctl file operations have the same prototype so
    they can both point to the same function, which works great almost all
    the time when all the commands are compatible.

    One exception is the s390 architecture, where a compat pointer is only
    31 bit wide, and converting it into a 64-bit pointer requires calling
    compat_ptr(). Most drivers here will never run in s390, but since we now
    have a generic helper for it, it's easy enough to use it consistently.

    I double-checked all these drivers to ensure that all ioctl arguments
    are used as pointers or are ignored, but are not interpreted as integer
    values.

    Acked-by: Jason Gunthorpe
    Acked-by: Daniel Vetter
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Greg Kroah-Hartman
    Acked-by: David Sterba
    Acked-by: Darren Hart (VMware)
    Acked-by: Jonathan Cameron
    Acked-by: Bjorn Andersson
    Acked-by: Dan Williams
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

03 Apr, 2019

2 commits


23 Mar, 2018

1 commit


02 Feb, 2018

1 commit

  • Pull staging/IIO updates from Greg KH:
    "Here is the big Staging and IIO driver patches for 4.16-rc1.

    There is the normal amount of new IIO drivers added, like all
    releases.

    The networking IPX and the ncpfs filesystem are moved into the staging
    tree, as they are on their way out of the kernel due to lack of use
    anymore.

    The visorbus subsystem finall has started moving out of the staging
    tree to the "real" part of the kernel, and the most and fsl-mc
    codebases are almost ready to move out, that will probably happen for
    4.17-rc1 if all goes well.

    Other than that, there is a bunch of license header cleanups in the
    tree, along with the normal amount of coding style churn that we all
    know and love for this codebase. I also got frustrated at the
    Meltdown/Spectre mess and took it out on the dgnc tty driver, deleting
    huge chunks of it that were never even being used.

    Full details of everything is in the shortlog.

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

    * tag 'staging-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (627 commits)
    staging: rtlwifi: remove redundant initialization of 'cfg_cmd'
    staging: rtl8723bs: remove a couple of redundant initializations
    staging: comedi: reformat lines to 80 chars or less
    staging: lustre: separate a connection destroy from free struct kib_conn
    Staging: rtl8723bs: Use !x instead of NULL comparison
    Staging: rtl8723bs: Remove dead code
    Staging: rtl8723bs: Change names to conform to the kernel code
    staging: ccree: Fix missing blank line after declaration
    staging: rtl8188eu: remove redundant initialization of 'pwrcfgcmd'
    staging: rtlwifi: remove unused RTLHALMAC_ST and RTLPHYDM_ST
    staging: fbtft: remove unused FB_TFT_SSD1325 kconfig
    staging: comedi: dt2811: remove redundant initialization of 'ns'
    staging: wilc1000: fix alignments to match open parenthesis
    staging: wilc1000: removed unnecessary defined enums typedef
    staging: wilc1000: remove unnecessary use of parentheses
    staging: rtl8192u: remove redundant initialization of 'timeout'
    staging: sm750fb: fix CamelCase for dispSet var
    staging: lustre: lnet/selftest: fix compile error on UP build
    staging: rtl8723bs: hal_com_phycfg: Remove unneeded semicolons
    staging: rts5208: Fix "seg_no" calculation in reset_ms_card()
    ...

    Linus Torvalds
     

15 Jan, 2018

2 commits

  • Now that the SPDX tag is in all drivers/staging/vme/ files, that
    identifies the license in a specific and legally-defined manner. So the
    extra GPL text wording can be removed as it is no longer needed at all.

    This is done on a quest to remove the 700+ different ways that files in
    the kernel describe the GPL license text. And there's unneeded stuff
    like the address (sometimes incorrect) for the FSF which is never
    needed.

    No copyright headers or other non-license-description text was removed.

    Cc: Martyn Welch
    Cc: Manohar Vanga
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • It's good to have SPDX identifiers in all files to make it easier to
    audit the kernel tree for correct licenses.

    Fix up the remaining staging vme driver to have a proper SPDX
    identifier, based on the license text in the file itself. The SPDX
    identifier is a legally binding shorthand, which can be used instead of
    the full boiler plate text.

    This work is based on a script and data from Thomas Gleixner, Philippe
    Ombredanne, and Kate Stewart.

    Cc: Thomas Gleixner
    Cc: Kate Stewart
    Cc: Philippe Ombredanne
    Cc: Martyn Welch
    Cc: Manohar Vanga
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

08 Jan, 2018

1 commit


30 Dec, 2017

1 commit


14 Nov, 2017

1 commit

  • Pull staging and IIO updates from Greg KH:
    "Here is the "big" staging and IIO driver update for 4.15-rc1.

    Lots and lots of little changes, almost all minor code cleanups as the
    Outreachy application process happened during this development cycle.
    Also happened was a lot of IIO driver activity, and the typec USB code
    moving out of staging to drivers/usb (same commits are in the USB tree
    on a persistent branch to not cause merge issues.)

    Overall, it's a wash, I think we added a few hundred more lines than
    removed, but really only a few thousand were modified at all.

    All of these have been in linux-next for a while. There might be a
    merge issue with Al's vfs tree in the pi433 driver (take his changes,
    they are always better), and the media tree with some of the odd
    atomisp cleanups (take the media tree's version)"

    * tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits)
    staging: lustre: add SPDX identifiers to all lustre files
    staging: greybus: Remove redundant license text
    staging: greybus: add SPDX identifiers to all greybus driver files
    staging: ccree: simplify ioread/iowrite
    staging: ccree: simplify registers access
    staging: ccree: simplify error handling logic
    staging: ccree: remove dead code
    staging: ccree: handle limiting of DMA masks
    staging: ccree: copy IV to DMAable memory
    staging: fbtft: remove redundant initialization of buf
    staging: sm750fb: Fix parameter mistake in poke32
    staging: wilc1000: Fix bssid buffer offset in Txq
    staging: fbtft: fb_ssd1331: fix mirrored display
    staging: android: Fix checkpatch.pl error
    staging: greybus: loopback: convert loopback to use generic async operations
    staging: greybus: operation: add private data with get/set accessors
    staging: greybus: loopback: Fix iteration count on async path
    staging: greybus: loopback: Hold per-connection mutex across operations
    staging: greybus/loopback: use ktime_get() for time intervals
    staging: fsl-dpaa2/eth: Extra headroom in RX buffers
    ...

    Linus Torvalds
     

03 Nov, 2017

1 commit

  • The PIO2 device is (as far as I know) no longer manufactured. I no longer
    have access to the device and this seems unlikely to change. The only
    changes to this driver in a long time have been as a result of API changes
    else where. Time to remove it...

    Signed-off-by: Martyn Welch
    Signed-off-by: Greg Kroah-Hartman

    Martyn Welch
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

16 May, 2017

1 commit

  • Use the BIT(n) macro instead of '(1 << n)' in definitions where the bit
    semantics clearly applies.

    Fixes true positive "Prefer using the BIT macro" checks reported by
    checkpatch.

    Some of these checks are still triggering on definitions using
    '(1 << n)', namely for PIO2_CNTR_SC_DEV1, PIO2_CNTR_RW_LSB and
    PIO2_CNTR_MODE1. Leave them be, as the context there is more of a
    "multi-bit field value" ((val << n), where for some cases 'val' happens
    to be 1) rather than a "single bit" (1 << n), so keeping the value as is
    in the code makes it more readable that using a combination of BIT
    macros.

    Signed-off-by: Ricardo Silva
    Signed-off-by: Greg Kroah-Hartman

    Ricardo Silva
     

11 May, 2017

1 commit

  • Pull hw lockdown support from David Howells:
    "Annotation of module parameters that configure hardware resources
    including ioports, iomem addresses, irq lines and dma channels.

    This allows a future patch to prohibit the use of such module
    parameters to prevent that hardware from being abused to gain access
    to the running kernel image as part of locking the kernel down under
    UEFI secure boot conditions.

    Annotations are made by changing:

    module_param(n, t, p)
    module_param_named(n, v, t, p)
    module_param_array(n, t, m, p)

    to:

    module_param_hw(n, t, hwtype, p)
    module_param_hw_named(n, v, t, hwtype, p)
    module_param_hw_array(n, t, hwtype, m, p)

    where the module parameter refers to a hardware setting

    hwtype specifies the type of the resource being configured. This can
    be one of:

    ioport Module parameter configures an I/O port
    iomem Module parameter configures an I/O mem address
    ioport_or_iomem Module parameter could be either (runtime set)
    irq Module parameter configures an I/O port
    dma Module parameter configures a DMA channel
    dma_addr Module parameter configures a DMA buffer address
    other Module parameter configures some other value

    Note that the hwtype is compile checked, but not currently stored (the
    lockdown code probably won't require it). It is, however, there for
    future use.

    A bonus is that the hwtype can also be used for grepping.

    The intention is for the kernel to ignore or reject attempts to set
    annotated module parameters if lockdown is enabled. This applies to
    options passed on the boot command line, passed to insmod/modprobe or
    direct twiddling in /sys/module/ parameter files.

    The module initialisation then needs to handle the parameter not being
    set, by (1) giving an error, (2) probing for a value or (3) using a
    reasonable default.

    What I can't do is just reject a module out of hand because it may
    take a hardware setting in the module parameters. Some important
    modules, some ipmi stuff for instance, both probe for hardware and
    allow hardware to be manually specified; if the driver is aborts with
    any error, you don't get any ipmi hardware.

    Further, trying to do this entirely in the module initialisation code
    doesn't protect against sysfs twiddling.

    [!] Note that in and of itself, this series of patches should have no
    effect on the the size of the kernel or code execution - that is
    left to a patch in the next series to effect. It does mark
    annotated kernel parameters with a KERNEL_PARAM_FL_HWPARAM flag in
    an already existing field"

    * tag 'hwparam-20170420' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: (38 commits)
    Annotate hardware config module parameters in sound/pci/
    Annotate hardware config module parameters in sound/oss/
    Annotate hardware config module parameters in sound/isa/
    Annotate hardware config module parameters in sound/drivers/
    Annotate hardware config module parameters in fs/pstore/
    Annotate hardware config module parameters in drivers/watchdog/
    Annotate hardware config module parameters in drivers/video/
    Annotate hardware config module parameters in drivers/tty/
    Annotate hardware config module parameters in drivers/staging/vme/
    Annotate hardware config module parameters in drivers/staging/speakup/
    Annotate hardware config module parameters in drivers/staging/media/
    Annotate hardware config module parameters in drivers/scsi/
    Annotate hardware config module parameters in drivers/pcmcia/
    Annotate hardware config module parameters in drivers/pci/hotplug/
    Annotate hardware config module parameters in drivers/parport/
    Annotate hardware config module parameters in drivers/net/wireless/
    Annotate hardware config module parameters in drivers/net/wan/
    Annotate hardware config module parameters in drivers/net/irda/
    Annotate hardware config module parameters in drivers/net/hamradio/
    Annotate hardware config module parameters in drivers/net/ethernet/
    ...

    Linus Torvalds
     

20 Apr, 2017

1 commit

  • When the kernel is running in secure boot mode, we lock down the kernel to
    prevent userspace from modifying the running kernel image. Whilst this
    includes prohibiting access to things like /dev/mem, it must also prevent
    access by means of configuring driver modules in such a way as to cause a
    device to access or modify the kernel image.

    To this end, annotate module_param* statements that refer to hardware
    configuration and indicate for future reference what type of parameter they
    specify. The parameter parser in the core sees this information and can
    skip such parameters with an error message if the kernel is locked down.
    The module initialisation then runs as normal, but just sees whatever the
    default values for those parameters is.

    Note that we do still need to do the module initialisation because some
    drivers have viable defaults set in case parameters aren't specified and
    some drivers support automatic configuration (e.g. PNP or PCI) in addition
    to manually coded parameters.

    This patch annotates drivers in drivers/staging/vme/.

    Suggested-by: Alan Cox
    Signed-off-by: David Howells
    cc: Martyn Welch
    cc: Manohar Vanga
    cc: Greg Kroah-Hartman
    cc: devel@driverdev.osuosl.org

    David Howells
     

14 Mar, 2017

1 commit

  • refcount_t type and corresponding API should be
    used instead of atomic_t when the variable is used as
    a reference counter. This allows to avoid accidental
    refcounter overflows that might lead to use-after-free
    situations.

    Signed-off-by: Elena Reshetova
    Signed-off-by: Hans Liljestrand
    Signed-off-by: Kees Cook
    Signed-off-by: David Windsor
    Signed-off-by: Greg Kroah-Hartman

    Elena Reshetova
     

17 Jan, 2017

1 commit


14 Dec, 2016

1 commit

  • Pull staging/IIO updates from Greg KH:
    "Here's the "big" staging/iio pull request for 4.10-rc1.

    Not as big as 4.9 was, but still just over a thousand changes. We
    almost broke even of lines added vs. removed, as the slicoss driver
    was removed (got a "clean" driver for the same hardware through the
    netdev tree), and some iio drivers were also dropped, but I think we
    ended up adding a few thousand lines to the source tree in the end.
    Other than that it's a lot of minor fixes all over the place, nothing
    major stands out at all.

    All of these have been in linux-next for a while. There will be a
    merge conflict with Al's vfs tree in the lustre code, but the
    resolution for that should be pretty simple, that too has been in
    linux-next"

    * tag 'staging-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1002 commits)
    staging: comedi: comedidev.h: Document usage of 'detach' handler
    staging: fsl-mc: remove unnecessary info prints from bus driver
    staging: fsl-mc: add sysfs ABI doc
    staging/lustre/o2iblnd: Fix misspelled attemps->attempts
    staging/lustre/o2iblnd: Fix misspelling intialized->intialized
    staging/lustre: Convert all bare unsigned to unsigned int
    staging/lustre/socklnd: Fix whitespace problem
    staging/lustre/o2iblnd: Add missing space
    staging/lustre/lnetselftest: Fix potential integer overflow
    staging: greybus: audio_module: remove redundant OOM message
    staging: dgnc: Fix lines longer than 80 characters
    staging: dgnc: fix blank line after '{' warnings.
    staging/android: remove Sync Framework tasks from TODO
    staging/lustre/osc: Revert erroneous list_for_each_entry_safe use
    staging: slicoss: remove the staging driver
    staging: lustre: libcfs: remove lnet upcall code
    staging: lustre: remove set but unused variables
    staging: lustre: osc: set lock data for readahead lock
    staging: lustre: import: don't reconnect during connect interpret
    staging: lustre: clio: remove mtime check in vvp_io_fault_start()
    ...

    Linus Torvalds
     

19 Nov, 2016

1 commit


14 Nov, 2016

1 commit


07 Nov, 2016

4 commits


24 Oct, 2016

1 commit


18 Sep, 2016

1 commit


13 Sep, 2016

1 commit


21 May, 2016

1 commit

  • Pull staging and IIO driver updates from Greg KH:
    "Here's the big staging and iio driver update for 4.7-rc1.

    I think we almost broke even with this release, only adding a few more
    lines than we removed, which isn't bad overall given that there's a
    bunch of new iio drivers added.

    The Lustre developers seem to have woken up from their sleep and have
    been doing a great job in cleaning up the code and pruning unused or
    old cruft, the filesystem is almost readable :)

    Other than that, just a lot of basic coding style cleanups in the
    churn. All have been in linux-next for a while with no reported
    issues"

    * tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits)
    Staging: emxx_udc: emxx_udc: fixed coding style issue
    staging/gdm724x: fix "alignment should match open parenthesis" issues
    staging/gdm724x: Fix avoid CamelCase
    staging: unisys: rename misleading var ii with frag
    staging: unisys: visorhba: switch success handling to error handling
    staging: unisys: visorhba: main path needs to flow down the left margin
    staging: unisys: visorinput: handle_locking_key() simplifications
    staging: unisys: visorhba: fail gracefully for thread creation failures
    staging: unisys: visornic: comment restructuring and removing bad diction
    staging: unisys: fix format string %Lx to %llx for u64
    staging: unisys: remove unused struct members
    staging: unisys: visorchannel: correct variable misspelling
    staging: unisys: visorhba: replace functionlike macro with function
    staging: dgnc: Need to check for NULL of ch
    staging: dgnc: remove redundant condition check
    staging: dgnc: fix 'line over 80 characters'
    staging: dgnc: clean up the dgnc_get_modem_info()
    staging: lustre: lnet: enable configuration per NI interface
    staging: lustre: o2iblnd: properly set ibr_why
    staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini
    ...

    Linus Torvalds
     

26 Apr, 2016

1 commit

  • This makes the driver use the data pointer added to the gpio_chip
    to store a pointer to the state container instead of relying on
    container_of().

    Cc: Manohar Vanga
    Cc: devel@driverdev.osuosl.org
    Acked-by: Martyn Welch
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Linus Walleij

    Linus Walleij
     

05 Apr, 2016

1 commit


12 Mar, 2016

1 commit


25 Nov, 2015

6 commits


15 Aug, 2015

3 commits