aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-12-20drm/amdgpu: update golden setting for hainanFlora Cui1-14/+23
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-12-20drm/amdgpu: update rev id for pitcairnFlora Cui1-0/+1
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-12-20drm/amdgpu: update golden setting for pitcairnFlora Cui1-10/+16
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-12-20drm/amdgpu: update golden setting/tiling table of tahitiFlora Cui2-161/+221
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-12-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds25-86/+148
Pull networking fixes and cleanups from David Miller: 1) Use rb_entry() instead of hardcoded container_of(), from Geliang Tang. 2) Use correct memory barriers in stammac driver, from Pavel Machek. 3) Fix assoc bind address handling in SCTP, from Xin Long. 4) Make the length check for UFO handling consistent between __ip_append_data() and ip_finish_output(), from Zheng Li. 5) HSI driver compatible strings were busted fro hix5hd2, from Dongpo Li. 6) Handle devm_ioremap() errors properly in cavium driver, from Arvind Yadav. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (22 commits) RDS: use rb_entry() net_sched: sch_netem: use rb_entry() net_sched: sch_fq: use rb_entry() net/mlx5: use rb_entry() ethernet: sfc: Add Kconfig entry for vendor Solarflare sctp: not copying duplicate addrs to the assoc's bind address list sctp: reduce indent level in sctp_copy_local_addr_list ARM: dts: hix5hd2: don't change the existing compatible string net: hix5hd2_gmac: fix compatible strings name openvswitch: Add a missing break statement. net: netcp: ethss: fix 10gbe host port tx pri map configuration net: netcp: ethss: fix errors in ethtool ops fsl/fman: enable compilation on ARM64 fsl/fman: A007273 only applies to PPC SoCs powerpc: fsl/fman: remove fsl,fman from of_device_ids[] fsl/fman: fix 1G support for QSGMII interfaces dt: bindings: net: use boolean dt properties for eee broken modes net: phy: use boolean dt properties for eee broken modes net: phy: fix sign type error in genphy_config_eee_advert ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output ...
2016-12-20Merge branch 'akpm' (patches from Andrew)Linus Torvalds28-47/+942
Merge final set of updates from Andrew Morton: - a series to make IMA play better across kexec - a handful of random fixes * emailed patches from Andrew Morton <[email protected]>: printk: fix typo in CONSOLE_LOGLEVEL_DEFAULT help text ratelimit: fix WARN_ON_RATELIMIT return value kcov: make kcov work properly with KASLR enabled arm64: setup: introduce kaslr_offset() mm: fadvise: avoid expensive remote LRU cache draining after FADV_DONTNEED ima: platform-independent hash value ima: define a canonical binary_runtime_measurements list format ima: support restoring multiple template formats ima: store the builtin/custom template definitions in a list ima: on soft reboot, save the measurement list powerpc: ima: send the kexec buffer to the next kernel ima: maintain memory size needed for serializing the measurement list ima: permit duplicate measurement list entries ima: on soft reboot, restore the measurement list powerpc: ima: get the kexec buffer passed by the previous kernel
2016-12-20Merge branch 'mailbox-for-next' of ↵Linus Torvalds3-234/+407
git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - new features (poll and SRAM usage) added to the mailbox-test driver - major update of Broadcom's PDC controller driver - minor fix for auto-loading test and STI driver modules * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: mailbox-test: allow reserved areas in SRAM mailbox: mailbox-test: add support for fasync/poll mailbox: bcm-pdc: Remove unnecessary void* casts mailbox: bcm-pdc: Simplify interrupt handler logic mailbox: bcm-pdc: Performance improvements mailbox: bcm-pdc: Don't use iowrite32 to write DMA descriptors mailbox: bcm-pdc: Convert from threaded IRQ to tasklet mailbox: bcm-pdc: Try to improve branch prediction mailbox: bcm-pdc: streamline rx code mailbox: bcm-pdc: Convert from interrupts to poll for tx done mailbox: bcm-pdc: PDC driver leaves debugfs files after removal mailbox: bcm-pdc: Changes so mbox client can be removed / re-inserted mailbox: bcm-pdc: Use octal permissions rather than symbolic mailbox: sti: Fix module autoload for OF registration mailbox: mailbox-test: Fix module autoload
2016-12-20Merge branch 'i2c/for-current' of ↵Linus Torvalds6-25/+61
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang. * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mux: mlxcpld: fix i2c mux selection caching i2c: designware: fix wrong Tx/Rx FIFO for ACPI i2c: xgene: Fix missing code of DTB support i2c: mux: pca954x: fix i2c mux selection caching i2c: octeon: thunderx: Limit register access retries
2016-12-20Merge tag 'doc-4.10-3' of git://git.lwn.net/linuxLinus Torvalds1-0/+5
Pull documentation fix from Jonathan Corbet: "A single fix for the build system. It would appear that the docutils developers, in their wisdom, broke the API in the 0.13 release. This fix detects the breakage and allows the docs to be built with both the old and new versions" * tag 'doc-4.10-3' of git://git.lwn.net/linux: docs: sphinx-extensions: make rstFlatTable work with docutils 0.13
2016-12-20Merge tag 'microblaze-4.10-rc1' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds5-2/+20
Pull arch/microblaze updates from Michal Simek: - wire-up new syscalls - add new codes and fpga families - fix a return value * tag 'microblaze-4.10-rc1' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Add new fpga families microblaze: Add missing release version code v9.6 and v10 microblaze: Add missing syscalls microblaze: Fix return value from xilinx_timer_init
2016-12-20Merge tag 'xtensa-20161219' of git://github.com/jcmvbkbc/linux-xtensaLinus Torvalds10-135/+176
Pull Xtensa updates from Max Filippov: - enable HAVE_DMA_CONTIGUOUS, configure shared DMA pool reservation in kc705 DTS - update xtensa DMA-related Documentation/features entries - clean up arch/xtensa/kernel/setup.c: move S32C1I self-test out of it, remove unused declarations, fix screen_info definition * tag 'xtensa-20161219' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: update DMA-related Documentation/features entries xtensa: configure shared DMA pool reservation in kc705 DTS xtensa: enable HAVE_DMA_CONTIGUOUS xtensa: move S32C1I self-test to a separate file xtensa: fix screen_info, clean up unused declarations in setup.c
2016-12-20parisc: Optimize timer interrupt functionHelge Deller3-92/+29
Restructure the timer interrupt function to better cope with missed timer irqs. Optimize the calculation when the next interrupt should happen and skip irqs if they would happen too shortly after exit of the irq function. The update_process_times() call is done anyway at every timer irq, so we can safely drop the prof_counter and prof_multiplier variables from the per_cpu structure. Signed-off-by: Helge Deller <[email protected]>
2016-12-20RDS: use rb_entry()Geliang Tang1-1/+1
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20net_sched: sch_netem: use rb_entry()Geliang Tang1-1/+1
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20net_sched: sch_fq: use rb_entry()Geliang Tang1-7/+7
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20net/mlx5: use rb_entry()Geliang Tang1-1/+1
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang <[email protected]> Acked-by: Leon Romanovsky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20ethernet: sfc: Add Kconfig entry for vendor SolarflareTobias Klauser2-1/+21
Since commit 5a6681e22c14 ("sfc: separate out SFC4000 ("Falcon") support into new sfc-falcon driver") there are two drivers for Solarflare devices, but both still show up directly beneath "Ethernet driver support" in the Kconfig. Follow the pattern of other vendors and group them beneath an own vendor Kconfig entry for Solarflare. Cc: Edward Cree <[email protected]> Signed-off-by: Tobias Klauser <[email protected]> Acked-by: Edward Cree <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20Merge branch 'sctp-fixes'David S. Miller2-18/+25
Xin Long says: ==================== sctp: fix the issue that may copy duplicate addrs into assoc's bind address list Patch 1/2 is to fix some indent level. Given that we have kernels out there with this issue, patch 2/2 also fix sctp_raw_to_bind_addrs. v1 -> v2: Explain why we didn't filter the duplicate addresses when global address list gets updated in patch 2/2 changelog. ==================== Signed-off-by: David S. Miller <[email protected]>
2016-12-20sctp: not copying duplicate addrs to the assoc's bind address listXin Long2-0/+6
sctp.local_addr_list is a global address list that is supposed to include all the local addresses. sctp updates this list according to NETDEV_UP/ NETDEV_DOWN notifications. However, if multiple NICs have the same address, the global list would have duplicate addresses. Even if for one NIC, promote secondaries in __inet_del_ifa can also lead to accumulating duplicate addresses. When sctp binds address 'ANY' and creates a connection, it copies all the addresses from global list into asoc's bind addr list, which makes sctp pack the duplicate addresses into INIT/INIT_ACK packets. This patch is to filter the duplicate addresses when copying the addrs from global list in sctp_copy_local_addr_list and unpacking addr_param from cookie in sctp_raw_to_bind_addrs to asoc's bind addr list. Note that we can't filter the duplicate addrs when global address list gets updated, As NETDEV_DOWN event may remove an addr that still exists in another NIC. Signed-off-by: Xin Long <[email protected]> Acked-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20sctp: reduce indent level in sctp_copy_local_addr_listXin Long1-18/+19
This patch is to reduce indent level by using continue when the addr is not allowed, and also drop end_copy by using break. Signed-off-by: Xin Long <[email protected]> Acked-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20Merge tag 'perf-core-for-mingo-20161220' of ↵Ingo Molnar60-731/+1075
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes: New features: - Introduce 'perf sched timehist --idle', to analyse processes going to/from idle state (Namhyung Kim) Fixes: - Allow 'perf record -u user' to continue when facing races with threads going away after having scanned them via /proc (Jiri Olsa) - Fix 'perf mem' --all-user/--all-kernel options (Jiri Olsa) - Support jumps with multiple arguments (Ravi Bangoria) - Fix jumps to before the function where they are located (Ravi Bangoria) - Fix lock-pi help string (Davidlohr Bueso) - Fix build of 'perf trace' in odd systems such as a RHEL PPC one (Jiri Olsa) - Do not overwrite valid build id in 'perf diff' (Kan Liang) - Don't throw error for zero length symbols, allowing the use of the TUI in PowerPC, where such symbols became more common recently (Ravi Bangoria) Infrastructure changes: - Switch of samples/bpf/ to use tools/lib/bpf, removing libbpf duplication (Joe Stringer) - Move headers check into bash script (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2016-12-20Merge branch 'hix5hd2_gmac-compatible-string'David S. Miller3-13/+17
Dongpo Li says: ==================== net: hix5hd2_gmac: keep the compatible string not changed This patch series fix the patch: d0fb6ba75dc0 ("net: hix5hd2_gmac: add generic compatible string") The SoC hix5hd2 compatible string has the suffix "-gmac" and we should not change its compatible string. So we should name all the compatible string with the suffix "-gmac". Creating a new name suffix "-gemac" is unnecessary. ==================== Signed-off-by: David S. Miller <[email protected]>
2016-12-20ARM: dts: hix5hd2: don't change the existing compatible stringDongpo Li1-2/+2
The SoC hix5hd2 compatible string has the suffix "-gmac" and we should not change it. We should only add the generic compatible string "hisi-gmac-v1". Fixes: 0855950ba580 ("ARM: dts: hix5hd2: add gmac generic compatible and clock names") Signed-off-by: Dongpo Li <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20net: hix5hd2_gmac: fix compatible strings nameDongpo Li2-11/+15
The SoC hix5hd2 compatible string has the suffix "-gmac" and we should not change its compatible string. So we should name all the compatible string with the suffix "-gmac". Creating a new name suffix "-gemac" is unnecessary. We also add another SoC compatible string in dt binding documentation and describe which generic version the SoC belongs to. Fixes: d0fb6ba75dc0 ("net: hix5hd2_gmac: add generic compatible string") Signed-off-by: Dongpo Li <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20openvswitch: Add a missing break statement.Jarno Rajahalme1-0/+1
Add a break statement to prevent fall-through from OVS_KEY_ATTR_ETHERNET to OVS_KEY_ATTR_TUNNEL. Without the break actions setting ethernet addresses fail to validate with log messages complaining about invalid tunnel attributes. Fixes: 0a6410fbde ("openvswitch: netlink: support L3 packets") Signed-off-by: Jarno Rajahalme <[email protected]> Acked-by: Pravin B Shelar <[email protected]> Acked-by: Jiri Benc <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20net: netcp: ethss: fix 10gbe host port tx pri map configurationWingMan Kwok1-1/+2
This patch adds the missing 10gbe host port tx priority map configurations. Signed-off-by: WingMan Kwok <[email protected]> Signed-off-by: Murali Karicheri <[email protected]> Signed-off-by: Sekhar Nori <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20net: netcp: ethss: fix errors in ethtool opsWingMan Kwok1-5/+16
In ethtool ops, it needs to retrieve the corresponding ethss module (gbe or xgbe) from the net_device structure. Prior to this patch, the retrieving procedure only checks for the gbe module. This patch fixes the issue by checking the xgbe module if the net_device structure does not correspond to the gbe module. Signed-off-by: WingMan Kwok <[email protected]> Signed-off-by: Murali Karicheri <[email protected]> Signed-off-by: Sekhar Nori <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20Merge branch 'fsl-fixes'David S. Miller4-4/+17
Madalin Bucur says: ==================== fsl/fman: fixes for ARM The patch set fixes advertised speeds for QSGMII interfaces, disables A007273 erratum workaround on non-PowerPC platforms where it does not apply, enables compilation on ARM64 and addresses a probing issue on non PPC platforms. Changes from v3: removed redundant comment, added ack by Scott Changes from v2: merged fsl/fman changes to avoid a point of failure Changes from v1: unifying probing on all supported platforms ==================== Signed-off-by: David S. Miller <[email protected]>
2016-12-20fsl/fman: enable compilation on ARM64Madalin Bucur1-1/+1
Signed-off-by: Madalin Bucur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20fsl/fman: A007273 only applies to PPC SoCsMadalin Bucur1-0/+8
Signed-off-by: Madalin Bucur <[email protected]> Reviewed-by: Camelia Groza <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20powerpc: fsl/fman: remove fsl,fman from of_device_ids[]Madalin Bucur2-3/+7
The fsl/fman drivers will use of_platform_populate() on all supported platforms. Call of_platform_populate() to probe the FMan sub-nodes. Signed-off-by: Igal Liberman <[email protected]> Signed-off-by: Madalin Bucur <[email protected]> Acked-by: Scott Wood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20fsl/fman: fix 1G support for QSGMII interfacesMadalin Bucur1-0/+1
QSGMII ports were not advertising 1G speed. Signed-off-by: Madalin Bucur <[email protected]> Reviewed-by: Camelia Groza <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20Merge branch 'phy-broken-modes'David S. Miller3-26/+25
Jerome Brunet says: ==================== phy: Fix integration of eee-broken-modes The purpose of this series is to fix the integration of the ethernet phy property "eee-broken-modes" [0] The v3 of this series has been merged, missing a fix (error reported by kbuild robot) available in the v4 [1] More importantly, Florian opposed adding a DT property mapping a device register this directly [2]. The concern was that the property could be abused to implement platform configuration policy. After discussing it, I think we agreed that such information about the HW (defect) should appear in the platform DT. However, the preferred way is to add a boolean property for each EEE broken mode. [0]: http://lkml.kernel.org/r/[email protected] [1]: http://lkml.kernel.org/r/[email protected] [2]: http://lkml.kernel.org/r/[email protected] ==================== Signed-off-by: David S. Miller <[email protected]>
2016-12-20dt: bindings: net: use boolean dt properties for eee broken modesjbrunet2-21/+8
The patches regarding eee-broken-modes was merged before all people involved could find an agreement on the best way to move forward. While we agreed on having a DT property to mark particular modes as broken, the value used for eee-broken-modes mapped the phy register in very direct way. Because of this, the concern is that it could be used to implement configuration policies instead of describing a broken HW. In the end, having a boolean property for each mode seems to be preferred over one bit field value mapping the register (too) directly. Cc: Florian Fainelli <[email protected]> Signed-off-by: Jerome Brunet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20net: phy: use boolean dt properties for eee broken modesjbrunet1-3/+15
The patches regarding eee-broken-modes was merged before all people involved could find an agreement on the best way to move forward. While we agreed on having a DT property to mark particular modes as broken, the value used for eee-broken-modes mapped the phy register in very direct way. Because of this, the concern is that it could be used to implement configuration policies instead of describing a broken HW. In the end, having a boolean property for each mode seems to be preferred over one bit field value mapping the register (too) directly. Cc: Florian Fainelli <[email protected]> Signed-off-by: Jerome Brunet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20net: phy: fix sign type error in genphy_config_eee_advertjbrunet1-2/+2
In genphy_config_eee_advert, the return value of phy_read_mmd_indirect is checked to know if the register could be accessed but the result is assigned to a 'u32'. Changing to 'int' to correctly get errors from phy_read_mmd_indirect. Fixes: d853d145ea3e ("net: phy: add an option to disable EEE advertisement") Reported-by: Julia Lawall <[email protected]> Signed-off-by: Jerome Brunet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-20printk: fix typo in CONSOLE_LOGLEVEL_DEFAULT help textBorislav Petkov1-1/+1
s/prink/printk/ Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Borislav Petkov <[email protected]> Cc: Olof Johansson <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20ratelimit: fix WARN_ON_RATELIMIT return valueJiri Slaby1-2/+5
The macro is to be used similarly as WARN_ON as: if (WARN_ON_RATELIMIT(condition, state)) do_something(); One would expect only 'condition' to affect the 'if', but WARN_ON_RATELIMIT does internally only: WARN_ON((condition) && __ratelimit(state)) So the 'if' is affected by the ratelimiting state too. Fix this by returning 'condition' in any case. Note that nobody uses WARN_ON_RATELIMIT yet, so there is nothing to worry about. But I was about to use it and was a bit surprised. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20kcov: make kcov work properly with KASLR enabledAlexander Popov1-1/+7
Subtract KASLR offset from the kernel addresses reported by kcov. Tested on x86_64 and AArch64 (Hikey LeMaker). Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Alexander Popov <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Rob Herring <[email protected]> Cc: Kefeng Wang <[email protected]> Cc: AKASHI Takahiro <[email protected]> Cc: Jon Masters <[email protected]> Cc: David Daney <[email protected]> Cc: Ganapatrao Kulkarni <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Nicolai Stange <[email protected]> Cc: James Morse <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Alexander Popov <[email protected]> Cc: syzkaller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20arm64: setup: introduce kaslr_offset()Alexander Popov2-4/+9
Introduce kaslr_offset() similar to x86_64 to fix kcov. [ Updated by Will Deacon ] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Alexander Popov <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Rob Herring <[email protected]> Cc: Kefeng Wang <[email protected]> Cc: AKASHI Takahiro <[email protected]> Cc: Jon Masters <[email protected]> Cc: David Daney <[email protected]> Cc: Ganapatrao Kulkarni <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Nicolai Stange <[email protected]> Cc: James Morse <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Alexander Popov <[email protected]> Cc: syzkaller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20mm: fadvise: avoid expensive remote LRU cache draining after FADV_DONTNEEDJohannes Weiner1-1/+14
When FADV_DONTNEED cannot drop all pages in the range, it observes that some pages might still be on per-cpu LRU caches after recent instantiation and so initiates remote calls to all CPUs to flush their local caches. However, in most cases, the fadvise happens from the same context that instantiated the pages, and any pre-LRU pages in the specified range are most likely sitting on the local CPU's LRU cache, and so in many cases this results in unnecessary remote calls, which, in a loaded system, can hold up the fadvise() call significantly. [ I didn't record it in the extreme case we observed at Facebook, unfortunately. We had a slow-to-respond system and noticed it lru_add_drain_all() leading the profile during fadvise calls. This patch came out of thinking about the code and how we commonly call FADV_DONTNEED. FWIW, I wrote a silly directory tree walker/searcher that recurses through /usr to read and FADV_DONTNEED each file it finds. On a 2 socket 40 ht machine, over 1% is spent in lru_add_drain_all(). With the patch, that cost is gone; the local drain cost shows at 0.09%. ] Try to avoid the remote call by flushing the local LRU cache before even attempting to invalidate anything. It's a cheap operation, and the local LRU cache is the most likely to hold any pre-LRU pages in the specified fadvise range. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Acked-by: Mel Gorman <[email protected]> Acked-by: Hillf Danton <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20ima: platform-independent hash valueAndreas Steffen1-2/+4
For remote attestion it is important for the ima measurement values to be platform-independent. Therefore integer fields to be hashed must be converted to canonical format. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Andreas Steffen <[email protected]> Signed-off-by: Mimi Zohar <[email protected]> Cc: Thiago Jung Bauermann <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Dmitry Kasatkin <[email protected]> Cc: Josh Sklar <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Baoquan He <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Stewart Smith <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20ima: define a canonical binary_runtime_measurements list formatMimi Zohar6-13/+66
The IMA binary_runtime_measurements list is currently in platform native format. To allow restoring a measurement list carried across kexec with a different endianness than the targeted kernel, this patch defines little-endian as the canonical format. For big endian systems wanting to save/restore the measurement list from a system with a different endianness, a new boot command line parameter named "ima_canonical_fmt" is defined. Considerations: use of the "ima_canonical_fmt" boot command line option will break existing userspace applications on big endian systems expecting the binary_runtime_measurements list to be in platform native format. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mimi Zohar <[email protected]> Acked-by: Dmitry Kasatkin <[email protected]> Cc: Thiago Jung Bauermann <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Andreas Steffen <[email protected]> Cc: Josh Sklar <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Baoquan He <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Stewart Smith <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20ima: support restoring multiple template formatsMimi Zohar1-3/+49
The configured IMA measurement list template format can be replaced at runtime on the boot command line, including a custom template format. This patch adds support for restoring a measuremement list containing multiple builtin/custom template formats. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mimi Zohar <[email protected]> Acked-by: Dmitry Kasatkin <[email protected]> Cc: Thiago Jung Bauermann <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Andreas Steffen <[email protected]> Cc: Josh Sklar <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Baoquan He <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Stewart Smith <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20ima: store the builtin/custom template definitions in a listMimi Zohar3-11/+43
The builtin and single custom templates are currently stored in an array. In preparation for being able to restore a measurement list containing multiple builtin/custom templates, this patch stores the builtin and custom templates as a linked list. This will permit defining more than one custom template per boot. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mimi Zohar <[email protected]> Acked-by: Dmitry Kasatkin <[email protected]> Cc: Thiago Jung Bauermann <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Andreas Steffen <[email protected]> Cc: Josh Sklar <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Baoquan He <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Stewart Smith <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20ima: on soft reboot, save the measurement listMimi Zohar5-1/+135
The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and restored on boot. This patch uses the kexec buffer passing mechanism to pass the serialized IMA binary_runtime_measurements to the next kernel. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thiago Jung Bauermann <[email protected]> Signed-off-by: Mimi Zohar <[email protected]> Acked-by: "Eric W. Biederman" <[email protected]> Acked-by: Dmitry Kasatkin <[email protected]> Cc: Andreas Steffen <[email protected]> Cc: Josh Sklar <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Baoquan He <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Stewart Smith <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20powerpc: ima: send the kexec buffer to the next kernelThiago Jung Bauermann5-6/+129
The IMA kexec buffer allows the currently running kernel to pass the measurement list via a kexec segment to the kernel that will be kexec'd. This is the architecture-specific part of setting up the IMA kexec buffer for the next kernel. It will be used in the next patch. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thiago Jung Bauermann <[email protected]> Signed-off-by: Mimi Zohar <[email protected]> Acked-by: "Eric W. Biederman" <[email protected]> Cc: Andreas Steffen <[email protected]> Cc: Dmitry Kasatkin <[email protected]> Cc: Josh Sklar <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Baoquan He <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Stewart Smith <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20ima: maintain memory size needed for serializing the measurement listMimi Zohar3-2/+64
In preparation for serializing the binary_runtime_measurements, this patch maintains the amount of memory required. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mimi Zohar <[email protected]> Acked-by: Dmitry Kasatkin <[email protected]> Cc: Thiago Jung Bauermann <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Andreas Steffen <[email protected]> Cc: Josh Sklar <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Baoquan He <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Stewart Smith <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20ima: permit duplicate measurement list entriesMimi Zohar1-6/+10
Measurements carried across kexec need to be added to the IMA measurement list, but should not prevent measurements of the newly booted kernel from being added to the measurement list. This patch adds support for allowing duplicate measurements. The "boot_aggregate" measurement entry is the delimiter between soft boots. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mimi Zohar <[email protected]> Acked-by: Dmitry Kasatkin <[email protected]> Cc: Thiago Jung Bauermann <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Andreas Steffen <[email protected]> Cc: Josh Sklar <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Baoquan He <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Stewart Smith <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-12-20ima: on soft reboot, restore the measurement listMimi Zohar6-0/+255
The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and restored on boot. This patch restores the measurement list. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mimi Zohar <[email protected]> Acked-by: Dmitry Kasatkin <[email protected]> Cc: Thiago Jung Bauermann <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Andreas Steffen <[email protected]> Cc: Josh Sklar <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Baoquan He <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Stewart Smith <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>