aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-07-15Input: adp5589 - initialize GPIO controller parent deviceLars-Peter Clausen1-0/+1
While not strictly required for normal operation setting the GPIO parent device allows the GPIO framework to generate more verbose debug output for the GPIO chip. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Alexandru Ardelean <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-07-15Input: iforce - remove empty multiline commentsTim Schumacher6-18/+0
Those are remnants of the SPDX identifier migration, which haven't been removed properly. Signed-off-by: Tim Schumacher <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-07-15Merge tag 'v5.2' into nextDmitry Torokhov30539-477578/+566339
Sync up with mainline to resolve conflicts in iforce driver.
2019-07-15Input: synaptics - fix misuse of strlcpyJoe Perches1-1/+1
Probable cut&paste typo - use the correct field size. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2019-07-15Documentation: filesystem: Convert xfs.txt to ReSTSheriff Esseson4-71/+67
Move xfs.txt to admin-guide, convert xfs.txt to ReST and broken references Signed-off-by: Sheriff Esseson <[email protected]> Reviewed-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
2019-07-15iomap: start moving code to fs/iomap/Darrick J. Wong3-0/+7
Create the build infrastructure we need to start migrating iomap code to fs/iomap/ from fs/iomap.c. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
2019-07-15Revert "x86/ptrace: Prevent ptrace from clearing the FS/GS selector" and fix ↵Andy Lutomirski2-20/+16
the test This reverts commit 48f5e52e916b55fb73754833efbacc7f8081a159. The ptrace ABI change was a prerequisite to the proposed design for FSGSBASE. Since FSGSBASE support has been reverted, and since I'm not convinced that the ABI was ever adequately tested, revert the ABI change as well. This also modifies the test case so that it tests the preexisting behavior. Signed-off-by: Andy Lutomirski <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/fca39c478ea7fb15bc76fe8a36bd180810a067f6.1563200250.git.luto@kernel.org
2019-07-15xfs: sync up xfs_trans_inode with userspaceEric Sandeen1-0/+4
Add an XFS_ICHGTIME_CREATE case to xfs_trans_ichgtime() to keep in sync with userspace. (Currently no kernel caller sends this flag.) Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
2019-07-15xfs: move xfs_trans_inode.c to libxfs/Eric Sandeen2-2/+2
Userspace now has an identical xfs_trans_inode.c which it has already moved to libxfs/ so do the same move for kernelspace. Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
2019-07-15LSM: SafeSetID: fix use of literal -1 in capable hookJann Horn1-1/+1
The capable() hook returns an error number. -EPERM is actually the same as -1, so this doesn't make a difference in behavior. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Micah Morton <[email protected]>
2019-07-15LSM: SafeSetID: verify transitive constrainednessJann Horn2-2/+40
Someone might write a ruleset like the following, expecting that it securely constrains UID 1 to UIDs 1, 2 and 3: 1:2 1:3 However, because no constraints are applied to UIDs 2 and 3, an attacker with UID 1 can simply first switch to UID 2, then switch to any UID from there. The secure way to write this ruleset would be: 1:2 1:3 2:2 3:3 , which uses "transition to self" as a way to inhibit the default-allow policy without allowing anything specific. This is somewhat unintuitive. To make sure that policy authors don't accidentally write insecure policies because of this, let the kernel verify that a new ruleset does not contain any entries that are constrained, but transitively unconstrained. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Micah Morton <[email protected]>
2019-07-15LSM: SafeSetID: add read handlerJann Horn2-4/+32
For debugging a running system, it is very helpful to be able to see what policy the system is using. Add a read handler that can dump out a copy of the loaded policy. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Micah Morton <[email protected]>
2019-07-15LSM: SafeSetID: rewrite userspace API to atomic updatesJann Horn4-169/+149
The current API of the SafeSetID LSM uses one write() per rule, and applies each written rule instantly. This has several downsides: - While a policy is being loaded, once a single parent-child pair has been loaded, the parent is restricted to that specific child, even if subsequent rules would allow transitions to other child UIDs. This means that during policy loading, set*uid() can randomly fail. - To replace the policy without rebooting, it is necessary to first flush all old rules. This creates a time window in which no constraints are placed on the use of CAP_SETUID. - If we want to perform sanity checks on the final policy, this requires that the policy isn't constructed in a piecemeal fashion without telling the kernel when it's done. Other kernel APIs - including things like the userns code and netfilter - avoid this problem by performing updates atomically. Luckily, SafeSetID hasn't landed in a stable (upstream) release yet, so maybe it's not too late to completely change the API. The new API for SafeSetID is: If you want to change the policy, open "safesetid/whitelist_policy" and write the entire policy, newline-delimited, in there. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Micah Morton <[email protected]>
2019-07-15LSM: SafeSetID: fix userns handling in securityfsJann Horn1-3/+3
Looking at current_cred() in write handlers is bad form, stop doing that. Also, let's just require that the write is coming from the initial user namespace. Especially SAFESETID_WHITELIST_FLUSH requires privilege over all namespaces, and SAFESETID_WHITELIST_ADD should probably require it as well. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Micah Morton <[email protected]>
2019-07-15LSM: SafeSetID: refactor policy parsingJann Horn1-51/+33
In preparation for changing the policy parsing logic, refactor the line parsing logic to be less verbose and move it into a separate function. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Micah Morton <[email protected]>
2019-07-15LSM: SafeSetID: refactor safesetid_security_capable()Jann Horn1-15/+26
At the moment, safesetid_security_capable() has two nested conditional blocks, and one big comment for all the logic. Chop it up and reduce the amount of indentation. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Micah Morton <[email protected]>
2019-07-15LSM: SafeSetID: refactor policy hash tableJann Horn2-44/+37
parent_kuid and child_kuid are kuids, there is no reason to make them uint64_t. (And anyway, in the kernel, the normal name for that would be u64, not uint64_t.) check_setuid_policy_hashtable_key() and check_setuid_policy_hashtable_key_value() are basically the same thing, merge them. Also fix the comment that claimed that (1<<8)==128. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Micah Morton <[email protected]>
2019-07-15LSM: SafeSetID: fix check for setresuid(new1, new2, new3)Jann Horn1-90/+35
With the old code, when a process with the (real,effective,saved) UID set (1,1,1) calls setresuid(2,3,4), safesetid_task_fix_setuid() only checks whether the transition 1->2 is permitted; the transitions 1->3 and 1->4 are not checked. Fix this. This is also a good opportunity to refactor safesetid_task_fix_setuid() to be less verbose - having one branch per set*uid() syscall is unnecessary. Note that this slightly changes semantics: The UID transition check for UIDs that were not in the old cred struct is now always performed against the policy of the RUID. I think that's more consistent anyway, since the RUID is also the one that decides whether any policy is enforced at all. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Micah Morton <[email protected]>
2019-07-15LSM: SafeSetID: fix pr_warn() to include newlineJann Horn1-2/+2
Fix the pr_warn() calls in the SafeSetID LSM to have newlines at the end. Without this, denial messages will be buffered as incomplete lines in log_output(), and will then only show up once something else prints into dmesg. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Micah Morton <[email protected]>
2019-07-15NFSv4: Validate the stateid before applying it to state recoveryTrond Myklebust1-2/+19
If the stateid is the zero or invalid stateid, then it is pointless to attempt to use it for recovery. In that case, try to fall back to using the open state stateid, or just doing a general recovery of all state on a given inode. Signed-off-by: Trond Myklebust <[email protected]>
2019-07-15docs: kbuild: fix build with pdf and fix some minor issuesMauro Carvalho Chehab5-11/+33
The tag ".. include" should be replaced by ".. literalinclude" at issues.rst, otherwise it causes TeX to crash due to excessive usage of stack with Sphinx 2.0. While here, solve a few minor issues at the kbuild book output by adding extra blank lines. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: block: fix pdf outputMauro Carvalho Chehab1-4/+5
Add an extra blank line and use a markup for the enumberated list, in order to make it possible to build the block book on pdf format. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: arm: fix a breakage with pdf outputMauro Carvalho Chehab1-0/+1
Add an extra blank line, as otherwise XeLaTex will complain with: ! LaTeX Error: Too deeply nested. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: don't use nested tablesMauro Carvalho Chehab4-21/+19
Nested tables aren't supported for pdf output on Sphinx 1.7.9: admin-guide/laptops/sonypi:: nested tables are not yet implemented. admin-guide/laptops/toshiba_haps:: nested tables are not yet implemented. driver-api/nvdimm/btt:: nested tables are not yet implemented. s390/debugging390:: nested tables are not yet implemented. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Andy Shevchenko <[email protected]> # laptops
2019-07-15docs: gpio: add sysfs interface to the admin-guideMauro Carvalho Chehab7-6/+7
While this is stated as obsoleted, the sysfs interface described there is still valid, and belongs to the admin-guide. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Linus Walleij <[email protected]>
2019-07-15docs: locking: add it to the main indexMauro Carvalho Chehab2-1/+2
The locking directory is part of the Kernel API bookset. Add it to the index file. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: add some directories to the main documentation indexMauro Carvalho Chehab13-12/+25
The contents of those directories were orphaned at the documentation body. While those directories could likely be moved to be inside some guide, I'm opting to just adding their indexes to the main one, removing the :orphan: and adding the SPDX header. For the drivers, the rationale is that the documentation contains a mix of Kernelspace, uAPI and admin-guide. So, better to keep them on separate directories, as we've be doing with similar subsystem-specific docs that were not split yet. For the others, well... I'm too lazy to do the move. Also, it seems to make sense to keep at least some of those at the main dir (like kbuild, for example). In any case, a latter patch could do the move. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Bartlomiej Zolnierkiewicz <[email protected]>
2019-07-15docs: add SPDX tags to new index filesMauro Carvalho Chehab21-0/+41
All those new files I added are under GPL v2.0 license. Add the corresponding SPDX headers to them. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: add a memory-devices subdir to driver-apiMauro Carvalho Chehab4-2/+19
There are two docs describing memory device drivers. Add both to this new chapter of the driver-api. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: phy: place documentation under driver-apiMauro Carvalho Chehab8-4/+20
This subsystem-specific documentation belongs to the driver-api. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: serial: move it to the driver-apiMauro Carvalho Chehab14-9/+10
The contents of this directory is mostly driver-api stuff. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: driver-api: add remaining converted dirs to itMauro Carvalho Chehab7-8/+7
There are a number of driver-specific descriptions that contain a mix of userspace and kernelspace documentation. Just like we did with other similar subsystems, add them at the driver-api groupset, but don't move the directories. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: driver-api: add xilinx driver API documentationMauro Carvalho Chehab3-1/+1
The current file there (emmi) provides a description of the driver uAPI and kAPI. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: driver-api: add a series of orphaned documentsMauro Carvalho Chehab49-45/+71
There are lots of documents under Documentation/*.txt and a few other orphan documents elsehwere that belong to the driver-API book. Move them to their right place. Reviewed-by: Cornelia Huck <[email protected]> # vfio-related parts Acked-by: Logan Gunthorpe <[email protected]> # switchtec Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: admin-guide: add a series of orphaned documentsMauro Carvalho Chehab40-33/+47
There are lots of documents that belong to the admin-guide but are on random places (most under Documentation root dir). Move them to the admin guide. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Acked-by: Bartlomiej Zolnierkiewicz <[email protected]>
2019-07-15docs: cgroup-v1: add it to the admin-guide bookMauro Carvalho Chehab36-33/+32
Those files belong to the admin guide, so add them. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: aoe: add it to the driver-api bookMauro Carvalho Chehab10-6/+5
Those files belong to the admin guide, so add them. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Justin Sanders <[email protected]>
2019-07-15docs: add some documentation dirs to the driver-api bookMauro Carvalho Chehab5-4/+8
Those are subsystem docs, with a mix of kABI and user-faced docs. While they're not split, keep the dirs where they are, adding just a pointer to the main index. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: driver-model: move it to the driver-api bookMauro Carvalho Chehab24-17/+16
The audience for the Kernel driver-model is clearly Kernel hackers. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Jeff Kirsher <[email protected]> # ice driver changes
2019-07-15docs: lp855x-driver.rst: add it to the driver-api bookMauro Carvalho Chehab3-3/+2
The content of this file is intended for backlight Kernel developers. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: ocxl.rst: add it to the uAPI bookMauro Carvalho Chehab3-3/+2
The content of this file is user-faced. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Andrew Donnellan <[email protected]>
2019-07-15docs: x86: move two x86-specific files to x86 arch dirMauro Carvalho Chehab5-2/+4
Those two docs belong to the x86 architecture: Documentation/Intel-IOMMU.txt -> Documentation/x86/intel-iommu.rst Documentation/intel_txt.txt -> Documentation/x86/intel_txt.rst Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: security: move some books to it and updateMauro Carvalho Chehab7-3/+5
The following files belong to security: Documentation/security/LSM.rst -> Documentation/security/lsm-development.rst Documentation/lsm.txt -> Documentation/security/lsm.rst Documentation/SAK.txt -> Documentation/security/sak.rst Documentation/siphash.txt -> Documentation/security/siphash.rst Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: blockdev: add it to the admin-guideMauro Carvalho Chehab22-26/+24
The blockdev book basically contains user-faced documentation. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: admin-guide: add kdump documentation into itMauro Carvalho Chehab14-15/+15
The Kdump documentation describes procedures with admins use in order to solve issues on their systems. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: admin-guide: add laptops documentationMauro Carvalho Chehab17-12/+11
The docs under Documentation/laptops contain users specific information. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Andy Shevchenko <[email protected]>
2019-07-15docs: admin-guide: move sysctl directory to itMauro Carvalho Chehab20-13/+12
The stuff under sysctl describes /sys interface from userspace point of view. So, add it to the admin-guide and remove the :orphan: from its index file. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: early-userspace: move to driver-api guideMauro Carvalho Chehab7-6/+5
Those documents describe a kAPI. So, add to the driver-api book. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: device-mapper: move it to the admin-guideMauro Carvalho Chehab35-6/+5
The DM support describes lots of aspects related to mapped disk partitions from the userspace PoV. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2019-07-15docs: add arch doc directories to the indexMauro Carvalho Chehab9-14/+11
Now that several arch documents were converted to ReST, add their indexes to Documentation/index.rst and remove the :orphan: from them. Signed-off-by: Mauro Carvalho Chehab <[email protected]>