Skip to content

Commit

Permalink
Merge branch 'akpm' (patches from Andrew)
Browse files Browse the repository at this point in the history
Merge yet more updates from Andrew Morton:

 - the rest of MM

 - various misc fixes and tweaks

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (22 commits)
  mm: Change return type int to vm_fault_t for fault handlers
  lib/fonts: convert comments to utf-8
  s390: ebcdic: convert comments to UTF-8
  treewide: convert ISO_8859-1 text comments to utf-8
  drivers/gpu/drm/gma500/: change return type to vm_fault_t
  docs/core-api: mm-api: add section about GFP flags
  docs/mm: make GFP flags descriptions usable as kernel-doc
  docs/core-api: split memory management API to a separate file
  docs/core-api: move *{str,mem}dup* to "String Manipulation"
  docs/core-api: kill trailing whitespace in kernel-api.rst
  mm/util: add kernel-doc for kvfree
  mm/util: make strndup_user description a kernel-doc comment
  fs/proc/vmcore.c: hide vmcoredd_mmap_dumps() for nommu builds
  treewide: correct "differenciate" and "instanciate" typos
  fs/afs: use new return type vm_fault_t
  drivers/hwtracing/intel_th/msu.c: change return type to vm_fault_t
  mm: soft-offline: close the race against page allocation
  mm: fix race on soft-offlining free huge pages
  namei: allow restricted O_CREAT of FIFOs and regular files
  hfs: prevent crash on exit from failed search
  ...
  • Loading branch information
Linus Torvalds committed Aug 24, 2018
2 parents d475fac + 2b74030 commit 33e1787
Show file tree
Hide file tree
Showing 63 changed files with 1,209 additions and 1,006 deletions.
1 change: 1 addition & 0 deletions Documentation/core-api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Core utilities
errseq
printk-formats
circular-buffers
mm-api
gfp_mask-from-fs-io
timekeeping
boot-time-mm
Expand Down
59 changes: 4 additions & 55 deletions Documentation/core-api/kernel-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ String Manipulation
.. kernel-doc:: lib/string.c
:export:

.. kernel-doc:: mm/util.c
:functions: kstrdup kstrdup_const kstrndup kmemdup kmemdup_nul memdup_user
vmemdup_user strndup_user memdup_user_nul

Basic Kernel Library Functions
==============================

Expand Down Expand Up @@ -155,60 +159,6 @@ UUID/GUID
.. kernel-doc:: lib/uuid.c
:export:

Memory Management in Linux
==========================

The Slab Cache
--------------

.. kernel-doc:: include/linux/slab.h
:internal:

.. kernel-doc:: mm/slab.c
:export:

.. kernel-doc:: mm/util.c
:export:

User Space Memory Access
------------------------

.. kernel-doc:: arch/x86/include/asm/uaccess.h
:internal:

.. kernel-doc:: arch/x86/lib/usercopy_32.c
:export:

More Memory Management Functions
--------------------------------

.. kernel-doc:: mm/readahead.c
:export:

.. kernel-doc:: mm/filemap.c
:export:

.. kernel-doc:: mm/memory.c
:export:

.. kernel-doc:: mm/vmalloc.c
:export:

.. kernel-doc:: mm/page_alloc.c
:internal:

.. kernel-doc:: mm/mempool.c
:export:

.. kernel-doc:: mm/dmapool.c
:export:

.. kernel-doc:: mm/page-writeback.c
:export:

.. kernel-doc:: mm/truncate.c
:export:

Kernel IPC facilities
=====================

Expand Down Expand Up @@ -437,4 +387,3 @@ Read-Copy Update (RCU)
.. kernel-doc:: include/linux/rcu_sync.h

.. kernel-doc:: kernel/rcu/sync.c

78 changes: 78 additions & 0 deletions Documentation/core-api/mm-api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
======================
Memory Management APIs
======================

User Space Memory Access
========================

.. kernel-doc:: arch/x86/include/asm/uaccess.h
:internal:

.. kernel-doc:: arch/x86/lib/usercopy_32.c
:export:

.. kernel-doc:: mm/util.c
:functions: get_user_pages_fast

Memory Allocation Controls
==========================

Functions which need to allocate memory often use GFP flags to express
how that memory should be allocated. The GFP acronym stands for "get
free pages", the underlying memory allocation function. Not every GFP
flag is allowed to every function which may allocate memory. Most
users will want to use a plain ``GFP_KERNEL``.

.. kernel-doc:: include/linux/gfp.h
:doc: Page mobility and placement hints

.. kernel-doc:: include/linux/gfp.h
:doc: Watermark modifiers

.. kernel-doc:: include/linux/gfp.h
:doc: Reclaim modifiers

.. kernel-doc:: include/linux/gfp.h
:doc: Common combinations

The Slab Cache
==============

.. kernel-doc:: include/linux/slab.h
:internal:

.. kernel-doc:: mm/slab.c
:export:

.. kernel-doc:: mm/util.c
:functions: kfree_const kvmalloc_node kvfree

More Memory Management Functions
================================

.. kernel-doc:: mm/readahead.c
:export:

.. kernel-doc:: mm/filemap.c
:export:

.. kernel-doc:: mm/memory.c
:export:

.. kernel-doc:: mm/vmalloc.c
:export:

.. kernel-doc:: mm/page_alloc.c
:internal:

.. kernel-doc:: mm/mempool.c
:export:

.. kernel-doc:: mm/dmapool.c
:export:

.. kernel-doc:: mm/page-writeback.c
:export:

.. kernel-doc:: mm/truncate.c
:export:
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/net/nfc/pn544.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Required properties:
- compatible: Should be "nxp,pn544-i2c".
- clock-frequency: IC work frequency.
- clock-frequency: I²C work frequency.
- reg: address on the bus
- interrupts: GPIO interrupt to which the chip is connected
- enable-gpios: Output GPIO pin used for enabling/disabling the PN544
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ compatible (optional) - standard definition
- may contain the following strings:
- shared-dma-pool: This indicates a region of memory meant to be
used as a shared pool of DMA buffers for a set of devices. It can
be used by an operating system to instanciate the necessary pool
be used by an operating system to instantiate the necessary pool
management subsystem if necessary.
- vendor specific string in the form <vendor>,[<device>-]<usage>
no-map (optional) - empty property
Expand Down
36 changes: 36 additions & 0 deletions Documentation/sysctl/fs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ Currently, these files are in /proc/sys/fs:
- overflowgid
- pipe-user-pages-hard
- pipe-user-pages-soft
- protected_fifos
- protected_hardlinks
- protected_regular
- protected_symlinks
- suid_dumpable
- super-max
Expand Down Expand Up @@ -182,6 +184,24 @@ applied.

==============================================================

protected_fifos:

The intent of this protection is to avoid unintentional writes to
an attacker-controlled FIFO, where a program expected to create a regular
file.

When set to "0", writing to FIFOs is unrestricted.

When set to "1" don't allow O_CREAT open on FIFOs that we don't own
in world writable sticky directories, unless they are owned by the
owner of the directory.

When set to "2" it also applies to group writable sticky directories.

This protection is based on the restrictions in Openwall.

==============================================================

protected_hardlinks:

A long-standing class of security issues is the hardlink-based
Expand All @@ -202,6 +222,22 @@ This protection is based on the restrictions in Openwall and grsecurity.

==============================================================

protected_regular:

This protection is similar to protected_fifos, but it
avoids writes to an attacker-controlled regular file, where a program
expected to create one.

When set to "0", writing to regular files is unrestricted.

When set to "1" don't allow O_CREAT open on regular files that we
don't own in world writable sticky directories, unless they are
owned by the owner of the directory.

When set to "2" it also applies to group writable sticky directories.

==============================================================

protected_symlinks:

A long-standing class of security issues is the symlink-based
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/sun4i-a10-inet97fv2.dts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright 2014 Open Source Support GmbH
*
* David Lanzend�rfer <david.lanzendoerfer@o2s.ch>
* David Lanzendörfer <david.lanzendoerfer@o2s.ch>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/crypto/sha256_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Glue code for the SHA256 Secure Hash Algorithm assembly implementation
* using optimized ARM assembler and NEON instructions.
*
* Copyright © 2015 Google Inc.
* Copyright © 2015 Google Inc.
*
* This file is based on sha256_ssse3_glue.c:
* Copyright (C) 2013 Intel Corporation
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/crypto/sha256_neon_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Glue code for the SHA256 Secure Hash Algorithm assembly implementation
* using NEON instructions.
*
* Copyright © 2015 Google Inc.
* Copyright © 2015 Google Inc.
*
* This file is based on sha512_neon_glue.c:
* Copyright © 2014 Jussi Kivilinna <jussi.kivilinna@iki.fi>
* Copyright © 2014 Jussi Kivilinna <jussi.kivilinna@iki.fi>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kvm/book3s_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static void kvmppc_set_msr_pr(struct kvm_vcpu *vcpu, u64 msr)
/*
* When switching from 32 to 64-bit, we may have a stale 32-bit
* magic page around, we need to flush it. Typically 32-bit magic
* page will be instanciated when calling into RTAS. Note: We
* page will be instantiated when calling into RTAS. Note: We
* assume that such transition only happens while in kernel mode,
* ie, we never transition from user 32-bit to kernel 64-bit with
* a 32-bit magic page around.
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kvm/book3s_xive.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* Virtual mode variants of the hcalls for use on radix/radix
* with AIL. They require the VCPU's VP to be "pushed"
*
* We still instanciate them here because we use some of the
* We still instantiate them here because we use some of the
* generated utility functions as well in this file.
*/
#define XIVE_RUNTIME_CHECKS
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/powermac/low_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev,
{ NULL, NULL, 0 },
};

/* Only some devices need to have platform functions instanciated
/* Only some devices need to have platform functions instantiated
* here. For now, we have a table. Others, like 9554 i2c GPIOs used
* on Xserve, if we ever do a driver for them, will use their own
* platform function instance
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/sysdev/xive/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static unsigned int xive_get_irq(void)
* of pending priorities. This will also have the effect of
* updating the CPPR to the most favored pending interrupts.
*
* In the future, if we have a way to differenciate a first
* In the future, if we have a way to differentiate a first
* entry (on HW interrupt) from a replay triggered by EOI,
* we could skip this on replays unless we soft-mask tells us
* that a new HW interrupt occurred.
Expand Down
Loading

0 comments on commit 33e1787

Please sign in to comment.