[PATCH 4.2.y-ckt 26/93] ARM: OMAP2+: hwmod: Fix updating of sysconfig register

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Lokesh Vutla commit 3ca4a238106dedc285193ee47f494a6584b6fd2f upstream. Commit 127500ccb766f ("ARM: OMAP2+: Only write the sysconfig on id

[PATCH 4.2.y-ckt 29/93] Input: gtco - fix crash on detecting device without endpoints

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Vladis Dronov commit 162f98dea487206d9ab79fc12ed64700667a894d upstream. The gtco driver expects at least one valid endpoint. If given mal

Re: [PATCH V3 3/4] acpi,pci,irq: remove redundant code in acpi_irq_penalty_init

2016-04-26 Thread Bjorn Helgaas
On Sun, Apr 17, 2016 at 01:36:55PM -0400, Sinan Kaya wrote: > acpi_irq_get_penalty is now calculating the penalty on the fly now. > No need to maintain global list of penalties or calculate them > at the init time. Removing duplicate code in acpi_irq_penalty_init. > > Signed-off-by: Sinan Kaya >

[PATCH 4.2.y-ckt 32/93] dmaengine: hsu: correct use of channel status register

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Andy Shevchenko commit 4f4bc0abff79dc9d7ccbd3143adbf8ad1f4fe6ab upstream. There is a typo in documentation regarding to descriptor empty

[PATCH 4.2.y-ckt 30/93] s390/pci: add extra padding to function measurement block

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Sebastian Ott commit 9d89d9e61d361f3adb75e1aebe4bb367faf16cfa upstream. Newer machines might use a different (larger) format for function

[PATCH 4.2.y-ckt 24/93] iwlwifi: pcie: lower the debug level for RSA semaphore access

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Emmanuel Grumbach commit 9fc515bc9e735c10cd327f05c20f5ef69474188d upstream. IWL_INFO is not an error but still printed by default. "can't

[PATCH 4.2.y-ckt 27/93] ARM: mvebu: Correct unit address for linksys

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Patrick Uiterwijk commit 199831c77c50e6913e893b6bc268ba9f4a9a2bf8 upstream. The USB2 port for Armada 38x is defined to be at 58000, not a

Re: [RFC] a corner case of open(2)

2016-04-26 Thread Valdis . Kletnieks
On Tue, 26 Apr 2016 18:55:38 +0100, Al Viro said: > It is a change of user-visible behaviour, but I would be very > surprised if anything broke from that change. And it would help to simplify > the awful mess we have in there. I have to admit that over the past 3 decades of working with Un

[PATCH 4.2.y-ckt 12/93] sh_eth: fix NULL pointer dereference in sh_eth_ring_format()

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Sergei Shtylyov [ Upstream commit c1b7fca65070bfadca94dd53a4e6b71cd4f69715 ] In a low memory situation, if netdev_alloc_skb() fails on a

[PATCH 4.2.y-ckt 21/93] ipv4: l2tp: fix a potential issue in l2tp_ip_recv

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Haishuang Yan [ Upstream commit 5745b8232e942abd5e16e85fa9b27cc21324acf0 ] pskb_may_pull() can change skb->data, so we have to load ptr/o

Re: [PATCH 23/28] mm, page_alloc: Check multiple page fields with a single branch

2016-04-26 Thread Vlastimil Babka
On 04/15/2016 11:07 AM, Mel Gorman wrote: Every page allocated or freed is checked for sanity to avoid corruptions that are difficult to detect later. A bad page could be due to a number of fields. Instead of using multiple branches, this patch combines multiple fields into a single branch. A de

[PATCH 4.2.y-ckt 25/93] HID: usbhid: fix inconsistent reset/resume/reset-resume behavior

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Alan Stern commit 972e6a993f278b416a8ee3ec65475724fc36feb2 upstream. The usbhid driver has inconsistently duplicated code in its post-res

[PATCH 4.2.y-ckt 22/93] ipv6: l2tp: fix a potential issue in l2tp_ip6_recv

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Haishuang Yan [ Upstream commit be447f305494e019dfc37ea4cdf3b0e4200b4eba ] pskb_may_pull() can change skb->data, so we have to load ptr/o

Re: [PATCH 24/28] mm, page_alloc: Remove unnecessary variable from free_pcppages_bulk

2016-04-26 Thread Vlastimil Babka
On 04/15/2016 11:07 AM, Mel Gorman wrote: The original count is never reused so it can be removed. Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka

[PATCH 4.2.y-ckt 20/93] tun, bpf: fix suspicious RCU usage in tun_{attach, detach}_filter

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Daniel Borkmann [ Upstream commit 5a5abb1fa3b05dd6aa821525832644c1e7d2905f ] Sasha Levin reported a suspicious rcu_dereference_protected(

[PATCH 4.2.y-ckt 17/93] xfrm: Fix crash observed during device unregistration and decryption

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: "subas...@codeaurora.org" [ Upstream commit 071d36bf21bcc837be00cea55bcef8d129e7f609 ] A crash is observed when a decrypted packet is pro

[PATCH 4.2.y-ckt 18/93] qmi_wwan: add "D-Link DWM-221 B1" device id

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= [ Upstream commit e84810c7b85a2d7897797b3ad3e879168a8e032a ] Thomas reports: "Windows: 00 diagnostics 01 m

Re: [PATCH v2] PCI: Designware: remove wrong RC memory base/limit configuration

2016-04-26 Thread Bjorn Helgaas
On Sat, Apr 16, 2016 at 12:03:39PM +0100, Gabriele Paoloni wrote: > Currently dw_pcie_setup_rc configures memory base and memory > limit in the type1 configuration header for the root complex. > In doing so it uses the cpu address (pp->mem_base) rather than > the bus address (pp->mem_bus_addr): thi

[PATCH 4.2.y-ckt 14/93] farsync: fix off-by-one bug in fst_add_one

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Arnd Bergmann [ Upstream commit e725a66c0202b5f36c2f9d59d26a65c53bbf21f7 ] gcc-6 finds an out of bounds access in the fst_add_one functio

[PATCH 4.2.y-ckt 15/93] qlge: Fix receive packets drop.

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Manish Chopra [ Upstream commit 2c9a266afefe137bff06bbe0fc48b4d3b3cb348c ] When running small packets [length < 256 bytes] traffic, packe

Re: random(4) changes

2016-04-26 Thread Pavel Machek
Hi1 > > When dropping the add_disk_randomness function in the legacy /dev/random, I > > would assume that without changes to add_input_randomness and > > add_interrupt_randomness, we become even more entropy-starved. > > Sure, but your system isn't doing anything magical here. The main > diffe

[PATCH 4.2.y-ckt 09/93] net: validate variable length ll headers

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Willem de Bruijn [ Upstream commit 2793a23aacbd754dbbb5cb75093deb7e4103bace ] Netdevice parameter hard_header_len is variously interprete

Re: printk: Add kernel parameter to disable writes to /dev/kmsg

2016-04-26 Thread Pavel Machek
On Mon 2016-04-25 13:06:29, Steven Rostedt wrote: > Over the weekend my server was acting funny. The display wasn't working > well, and I assumed that a driver was going bad. I went to look at the > kernel dmesg, but the buffer only had the following over and over: > > [226062.401405] systemd-logi

[PATCH 4.2.y-ckt 16/93] bonding: fix bond_get_stats()

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Eric Dumazet [ Upstream commit fe30937b65354c7fec244caebbdaae68e28ca797 ] bond_get_stats() can be called from rtnetlink (with RTNL held)

[PATCH 4.2.y-ckt 05/93] sctp: lack the check for ports in sctp_v6_cmp_addr

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Xin Long [ Upstream commit 40b4f0fd74e46c017814618d67ec9127ff20f157 ] As the member .cmp_addr of sctp_af_inet6, sctp_v6_cmp_addr should a

Re: [PATCH v2] Force cppc_cpufreq to report values in KHz to fix user space reporting

2016-04-26 Thread rwells
On 2016-04-19 18:53, Al Stone wrote: On 04/19/2016 02:12 PM, Ashwin Chaugule wrote: + Ryan Hi Al, On 18 April 2016 at 20:11, Al Stone wrote: When CPPC is being used by ACPI on arm64, user space tools such as cpupower report CPU frequency values from sysfs that are incorrect. What the driver

[PATCH 4.2.y-ckt 06/93] qmi_wwan: add Sierra Wireless EM74xx device ID

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= [ Upstream commit bf13c94ccb33c3182efc92ce4989506a0f541243 ] The MC74xx and EM74xx modules use different ID

[PATCH 4.2.y-ckt 10/93] ax25: add link layer header validation function

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Willem de Bruijn [ Upstream commit ea47781c26510e5d97f80f9aceafe9065bd5e3aa ] As variable length protocol, AX25 fails link layer header v

[PATCH 4.2.y-ckt 11/93] packet: validate variable length ll headers

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Willem de Bruijn [ Upstream commit 9ed988cd591500c040b2a6257bc68543e08ceeef ] Replace link layer header validation check ll_header_trunca

[PATCH 4.2.y-ckt 02/93] tunnel: Clear IPCB(skb)->opt before dst_link_failure called

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Bernie Harris [ Upstream commit 5146d1f151122e868e594c7b45115d64825aee5f ] IPCB may contain data from previous layers (in the observed ca

[PATCH 4.2.y-ckt 01/93] usbnet: cleanup after bind() in probe()

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Oliver Neukum commit 1666984c8625b3db19a9abc298931d35ab7bc64b upstream. In case bind() works, but a later error forces bailing in probe()

[PATCH 4.2.y-ckt 08/93] udp6: fix UDP/IPv6 encap resubmit path

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Bill Sommerfeld [ Upstream commit 59dca1d8a6725a121dae6c452de0b2611d5865dc ] IPv4 interprets a negative return value from a protocol hand

[PATCH 4.2.y-ckt 04/93] net: qca_spi: clear IFF_TX_SKB_SHARING

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Stefan Wahren [ Upstream commit a4690afeb0d2d7ba4d60dfa98a89f3bb1ce60ecd ] ether_setup sets IFF_TX_SKB_SHARING but this is not supported

[PATCH 4.2.y-ckt 03/93] net: jme: fix suspend/resume on JMC260

2016-04-26 Thread Kamal Mostafa
4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8< From: Diego Viola [ Upstream commit ee50c130c82175eaa0820c96b6d3763928af2241 ] The JMC260 network card fails to suspend/resume because the call

Re: [PATCH 2/2] localmodconfig: Reset certificate paths

2016-04-26 Thread Benjamin Poirier
On 2016/04/26 10:02, Steven Rostedt wrote: > On Sat, 2 Apr 2016 10:55:22 -0700 > Benjamin Poirier wrote: > > > When using `make localmodconfig` and friends, if the input config comes > > from a kernel that was built in a different environment (for example, the > > canonical case of using localmo

Re: [PATCH] net/mlx5e: avoid stack overflow in mlx5e_open_channels

2016-04-26 Thread Saeed Mahameed
On Tue, Apr 26, 2016 at 6:49 PM, Arnd Bergmann wrote: > On Tuesday 26 April 2016 17:41:45 Saeed Mahameed wrote: >> On Tue, Apr 26, 2016 at 4:53 PM, Arnd Bergmann wrote: >> > >> > Sure, do you want to just edit this when you forward the patch, or >> > do you need me to do it? >> > >> >> Well, I wo

[PATCH v2] localmodconfig: Reset certificate paths

2016-04-26 Thread Benjamin Poirier
When using `make localmodconfig` and friends, if the input config comes from a kernel that was built in a different environment (for example, the canonical case of using localmodconfig to trim a distribution kernel config) the key files for module signature checking will not be available and should

Re: [PATCH] mtd: nand: fix NULL pointer dereference in of_get_nand_ecc_algo

2016-04-26 Thread Boris Brezillon
On Tue, 26 Apr 2016 20:36:16 +0200 Rafał Miłecki wrote: > Our array nand_ecc_algos doesn't specify mappings for all available > enum nand_ecc_algo values. The one missing there is NAND_ECC_UNKNOWN > as this value is reserved for algorithm not being specified at all. > It means we have to be caref

Re: [PATCH v2] net/mlx5e: avoid stack overflow in mlx5e_open_channels

2016-04-26 Thread Saeed Mahameed
On Tue, Apr 26, 2016 at 6:52 PM, Arnd Bergmann wrote: > struct mlx5e_channel_param is a large structure that is allocated > on the stack of mlx5e_open_channels, and with a recent change > it has grown beyond the warning size for the maximum stack > that a single function should use: > > mellanox/m

Re: [RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Ville Syrjälä
On Tue, Apr 26, 2016 at 08:23:46PM +0200, Daniel Vetter wrote: > On Tue, Apr 26, 2016 at 08:40:45PM +0300, Ville Syrjälä wrote: > > On Tue, Apr 26, 2016 at 07:20:49PM +0200, Daniel Vetter wrote: > > > On Tue, Apr 26, 2016 at 07:26:21PM +0300, Ville Syrjälä wrote: > > > > On Tue, Apr 26, 2016 at 04:

Re: random(4) changes

2016-04-26 Thread Stephan Mueller
Am Dienstag, 26. April 2016, 20:44:39 schrieb Pavel Machek: Hi Pavel, > Hi1 > > > > When dropping the add_disk_randomness function in the legacy > > > /dev/random, I > > > would assume that without changes to add_input_randomness and > > > add_interrupt_randomness, we become even more entropy-st

Re: [PATCH 4/4] localmodconfig: Recognize standalone "prompt"

2016-04-26 Thread Benjamin Poirier
On 2016/04/26 11:11, Steven Rostedt wrote: > On Sun, 10 Apr 2016 17:06:33 -0700 > Benjamin Poirier wrote: > > > Note that this may change the resulting .config, causing it to have fewer > > symbols turned on. Before this patch we incorrectly identified some symbols > > as not having a prompt and

[PATCH v2] localmodconfig: Fix whitespace repeat count after "tristate"

2016-04-26 Thread Benjamin Poirier
Also recognize standalone "prompt". Before this patch we incorrectly identified some symbols as not having a prompt and potentially needing to be selected by something else. Note that this patch could theoretically change the resulting .config, causing it to have fewer symbols turned on. However,

Regression of v4.6-rc vs. v4.5: hangs after a few minutes after boot

2016-04-26 Thread Stefan Richter
Hi, v4.6-rc solidly hangs after a short while after boot, login to X11, and doing nothing much remarkable on the just brought up X desktop. Hardware: x86-64, E3-1245 v3 (Haswell), mainboard Supermicro X10SAE, using integrated Intel graphics (HD P4600, i915 driver), C

Re: [PATCH 0/6] Intel Secure Guard Extensions

2016-04-26 Thread Pavel Machek
On Mon 2016-04-25 20:34:07, Jarkko Sakkinen wrote: > Intel(R) SGX is a set of CPU instructions that can be used by > applications to set aside private regions of code and data. The code > outside the enclave is disallowed to access the memory inside the > enclave by the CPU access control. > > Th

Re: [PATCH V3 1/4] acpi,pci,irq: reduce resource requirements

2016-04-26 Thread Sinan Kaya
On 4/26/2016 2:36 PM, Bjorn Helgaas wrote: > On Sun, Apr 17, 2016 at 01:36:53PM -0400, Sinan Kaya wrote: >> Code has been redesigned to calculate penalty requirements on the fly. This >> significantly simplifies the implementation and removes some of the init >> calls from x86 architecture. >> >> S

Re: [RFC] a corner case of open(2)

2016-04-26 Thread Al Viro
On Tue, Apr 26, 2016 at 02:41:37PM -0400, valdis.kletni...@vt.edu wrote: > On Tue, 26 Apr 2016 18:55:38 +0100, Al Viro said: > > > It is a change of user-visible behaviour, but I would be very > > surprised if anything broke from that change. And it would help to simplify > > the awful mess w

Re: Regression of v4.6-rc vs. v4.5: hangs after a few minutes after boot

2016-04-26 Thread Stefan Richter
On Apr 26 Stefan Richter wrote: > Hardware: x86-64, E3-1245 v3 (Haswell), > mainboard Supermicro X10SAE, > using integrated Intel graphics (HD P4600, i915 driver), > C226 PCH's AHCI and USB 2/3, ASMedia ASM1062 AHCI, > Intel LAN (i217, igb driver), >

[PATCH] tracing: add support for tracing MMIO helpers

2016-04-26 Thread Rabin Vincent
Add support for tracing the MMIO helpers readl()/writel() (and their variants), for use while developing and debugging device drivers. The address and the value are saved along with the C expressions used in the driver when calling these MMIO access functions, leading to a trace of the driver's in

Re: [PATCH 0/6] Intel Secure Guard Extensions

2016-04-26 Thread Andy Lutomirski
On Tue, Apr 26, 2016 at 12:00 PM, Pavel Machek wrote: > On Mon 2016-04-25 20:34:07, Jarkko Sakkinen wrote: >> Intel(R) SGX is a set of CPU instructions that can be used by >> applications to set aside private regions of code and data. The code >> outside the enclave is disallowed to access the me

Re: [PATCH arm 1/1] arm: Use _rcuidle tracepoint to allow use from idle

2016-04-26 Thread Paul E. McKenney
g write buffer coherency: ok > CPU0: thread -1, cpu 0, socket 0, mpidr 8000 > > > RCU used illegally from idle CPU! > rcu_scheduler_active = 1, debug_locks = 0 > RCU used illegally from extended quiescent state! > no locks held by swapper/1/0. > > stack backtrace:

Re: LBR callchains from tracepoints

2016-04-26 Thread Peter Zijlstra
On Tue, Apr 26, 2016 at 03:20:32PM -0300, Arnaldo Carvalho de Melo wrote: > Yeah, and that already works in perf, its just that it doesn't work from some > points (PERF_TYPE_SOFTWARE, PERF_TYPE_TRACEPOINT, etc), as described in the > changeset I mentioned. Look at it the other way around, it _only

Re: Regression of v4.6-rc vs. v4.5: hangs after a few minutes after boot

2016-04-26 Thread Stefan Richter
On Apr 26 Stefan Richter wrote: > v4.6-rc solidly hangs after a short while after boot, login to X11, and > doing nothing much remarkable on the just brought up X desktop. > > Hardware: x86-64, E3-1245 v3 (Haswell), > mainboard Supermicro X10SAE, > using integrated Intel graphi

Re: [PATCH 25/28] mm, page_alloc: Inline pageblock lookup in page free fast paths

2016-04-26 Thread Vlastimil Babka
On 04/15/2016 11:07 AM, Mel Gorman wrote: The function call overhead of get_pfnblock_flags_mask() is measurable in the page free paths. This patch uses an inlined version that is faster. Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka

Re: [PATCH 13/28] mm, page_alloc: Remove redundant check for empty zonelist

2016-04-26 Thread Andrew Morton
On Tue, 26 Apr 2016 14:00:11 +0100 Mel Gorman wrote: > If Andrew is watching, please drop this patch if possible. Thud.

Re: [PATCH] can: m_can: fix bitrate setup on latest silicon

2016-04-26 Thread Oliver Hartkopp
On 04/26/2016 03:46 PM, Florian Vallee wrote: According to the m_can user manual changelog the BTP register layout was updated with core revision 3.1.0 Hello Florian, nice to see a real v3.1.0 user emerging on the mailing list :-) I wonder whether this small change covers the updates made bet

Re: [PATCH] tracing: add support for tracing MMIO helpers

2016-04-26 Thread Arnd Bergmann
On Tuesday 26 April 2016 21:04:42 Rabin Vincent wrote: > Add support for tracing the MMIO helpers readl()/writel() (and their > variants), for use while developing and debugging device drivers. > > The address and the value are saved along with the C expressions used in > the driver when calling t

Re: [PATCH arm 1/1] arm: Use _rcuidle tracepoint to allow use from idle

2016-04-26 Thread Steven Rostedt
0, socket 0, mpidr 8000 > > > RCU used illegally from idle CPU! > rcu_scheduler_active = 1, debug_locks = 0 > RCU used illegally from extended quiescent state! > no locks held by swapper/1/0. > > stack backtrace: > CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.6.0-rc5-next-201

Re: [PATCH 0/3] AM57/DRA7 Clock Tree DTSI Fix-ups

2016-04-26 Thread J.D. Schroeder
On 04/26/2016 01:13 PM, Tony Lindgren wrote: > Are any of these needed for the v4.6-rc cycle? I understand that these are arriving a little late especially if we don't get to rc7. However, it would be great if these could get in the v4.6 kernel release. They shouldn't be too risky to anyone, but

[GIT PULL] ARM: SoC fixes for v4.6

2016-04-26 Thread Arnd Bergmann
The following changes since commit 0b24f7a8d6e0d17bcf24433ce5827841a05b5b46: Merge tag 'mvebu-fixes-4.6-1' of git://git.infradead.org/linux-mvebu into fixes (2016-04-12 12:35:07 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git tag

[PATCH 3/8] x86/segments/64: When loadsegment(fs, ...) fails, clear the base

2016-04-26 Thread Andy Lutomirski
On AMD CPUs, a failed loadsegment currently may not clear the FS base. Fix it. While we're at it, prevent loadsegment(gs, xyz) from even compiling on 64-bit kernels. It shouldn't be used. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/segment.h | 42 ++

[PATCH 8/8] selftests/x86/ldt_gdt: Test set_thread_area deletion of an active segment

2016-04-26 Thread Andy Lutomirski
Now that set_thread_area is supposed to give deterministic behavior when it modifies in-use segments, test it. Signed-off-by: Andy Lutomirski --- tools/testing/selftests/x86/ldt_gdt.c | 250 ++ 1 file changed, 250 insertions(+) diff --git a/tools/testing/selftest

[PATCH 5/8] x86/arch_prctl/64: Remove FSBASE/GSBASE < 4G optimization

2016-04-26 Thread Andy Lutomirski
As far as I know, the optimization doesn't work on any modern distro because modern distros use high addresses for ASLR. Remove it. The ptrace code was either wrong or very strange, but the behavior with this patch should be essentially identical to the behavior without this patch unless user cod

[PATCH 6/8] x86/asm/64: Rename thread_struct's fs and gs to fsbase and gsbase

2016-04-26 Thread Andy Lutomirski
Unlike ds and es, these are base addresses, not selectors. Rename them so their meaning is more obvious. On x86_32, the field is still called fs. Fixing that could make sense as a future cleanup. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/elf.h | 6 +++--- arch/x86/include

[PATCH 7/8] x86/tls: Synchronize segment registers in set_thread_area

2016-04-26 Thread Andy Lutomirski
The current behavior of set_thread_area when it modifies a segment that is currently loaded is a bit confused. If CS [1] or SS is modified, the change will take effect on return to userspace because CS and SS are fundamentally always reloaded on return to userspace. Similarly, on 32-bit kernels,

[PATCH 2/8] x86/asm: Make asm/alternative.h safe from assembly

2016-04-26 Thread Andy Lutomirski
asm/alternative.h isn't directly useful from assembly, but it shouldn't break the build. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/alternative.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index be

Re: [RFC] a corner case of open(2)

2016-04-26 Thread Valdis . Kletnieks
On Tue, 26 Apr 2016 20:02:48 +0100, Al Viro said: > > The biggest danger I can see is some shell script doing something like: > > > > foobar > $dir/$targetfile > > > > and $targetfile is unset. If we allow a program to get an open fd that > > refers > > to a directory, what are the semantics of v

[PATCH 1/8] x86/asm: Stop depending on ptrace.h in alternative.h

2016-04-26 Thread Andy Lutomirski
alternative.h pulls in ptrace.h, which means that alternatives can't be used in anything referenced from ptrace.h, which is a mess. Break the dependency by pulling text patching helpers into their own header. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/alternative.h | 33 -

[PATCH 4/8] x86/segments/64: When load_gs_index fails, clear the base

2016-04-26 Thread Andy Lutomirski
On AMD CPUs, a failed load_gs_base currently may not clear the FS base. Fix it. Signed-off-by: Andy Lutomirski --- arch/x86/entry/entry_64.S | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 1693c17dbf81..6344629ae1ce 100644 --

Re: [PATCH 1/6] bus: Add shared MDIO bus framework

2016-04-26 Thread Arnd Bergmann
On Tuesday 26 April 2016 20:23:35 Andrew Lunn wrote: > > A more complex problem would be having a PHY driver for a device > > that can be either an ethernet phy or some other phy. > > I doubt that ever happens. You can have up to 32 different devices on > an MDIO bus. Since an Ethernet PHY and a "

[PATCH 0/8] x86: A round of x86 segmentation improvements

2016-04-26 Thread Andy Lutomirski
Hi all- This is preparation for enabling FSGSBASE and fixing FS/GS switching better than my last attempt. It cleans up the code, fixes two more holes in X86_BUG_NULL_SEG handling (loadsegment(fs, val) and load_gs_index(val) failure handling), and makes set_thread_area behave in a well-defined man

Re: [PATCH] block: partitions: efi: Always check for alternative GPT at end of drive

2016-04-26 Thread Austin S. Hemmelgarn
On 2016-04-26 14:10, Davidlohr Bueso wrote: On Tue, 26 Apr 2016, Austin S. Hemmelgarn wrote: At the absolute minimum, we should be logging (at least at a warning level) that we had to fall back the the backup GPT. If somebody is dealing with a disk that had a torn write to the primary GPT, tha

Re: [PATCH] tracing: add support for tracing MMIO helpers

2016-04-26 Thread Steven Rostedt
On Tue, 26 Apr 2016 21:14:47 +0200 Arnd Bergmann wrote: > > +/* This part must be outside protection */ > > +#include > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > > index e45db6b0d878..feca834436c5 100644 > > --- a/kernel/trace/Kconfig > > +++ b/kernel/trace/Kconfig > > @@ -37

Re: Applied "regulator: rk808: remove linear range definitions with a single range" to the regulator tree

2016-04-26 Thread Heiko Stübner
th this patch applied, 4.6.0-rc5-next-20160426 fails to boot on rk3288-veyron devices with the bug below. Reverting this one patch results in the system booting again: [1.059661] [ cut here ] [1.064272] kernel BUG at drivers/regulator/helpers.c:255! [1.069750] Inter

[PATCH v4 05/21] block_dev: Check permissions towards block device inode when mounting

2016-04-26 Thread Seth Forshee
Unprivileged users should not be able to mount block devices when they lack sufficient privileges towards the block device inode. Update blkdev_get_by_path() to validate that the user has the required access to the inode at the specified path. The check will be skipped for CAP_SYS_ADMIN, so privile

[PATCH v4 09/21] Smack: Handle labels consistently in untrusted mounts

2016-04-26 Thread Seth Forshee
The SMACK64, SMACK64EXEC, and SMACK64MMAP labels are all handled differently in untrusted mounts. This is confusing and potentically problematic. Change this to handle them all the same way that SMACK64 is currently handled; that is, read the label from disk and check it at use time. For SMACK64 an

[PATCH v4 01/21] fs: fix a posible leak of allocated superblock

2016-04-26 Thread Seth Forshee
From: Pavel Tikhomirov We probably need to fix superblock leak in patch (v4 "fs: Add user namesapace member to struct super_block"): Imagine posible code path in sget_userns: we iterate through type->fs_supers and do not find suitable sb, we drop sb_lock to allocate s and go to retry. After we d

[PATCH v4 16/21] fs: Allow superblock owner to access do_remount_sb()

2016-04-26 Thread Seth Forshee
Superblock level remounts are currently restricted to global CAP_SYS_ADMIN, as is the path for changing the root mount to read only on umount. Loosen both of these permission checks to also allow CAP_SYS_ADMIN in any namespace which is privileged towards the userns which originally mounted the file

[PATCH v4 21/21] fuse: Allow user namespace mounts

2016-04-26 Thread Seth Forshee
Signed-off-by: Seth Forshee Acked-by: Miklos Szeredi --- fs/fuse/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 0a771145d853..254f1944ee98 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1199,7 +1199,7 @@ static void

[PATCH v4 17/21] capabilities: Allow privileged user in s_user_ns to set security.* xattrs

2016-04-26 Thread Seth Forshee
A privileged user in s_user_ns will generally have the ability to manipulate the backing store and insert security.* xattrs into the filesystem directly. Therefore the kernel must be prepared to handle these xattrs from unprivileged mounts, and it makes little sense for commoncap to prevent writing

[PATCH v4 18/21] fuse: Add support for pid namespaces

2016-04-26 Thread Seth Forshee
When the userspace process servicing fuse requests is running in a pid namespace then pids passed via the fuse fd are not being translated into that process' namespace. Translation is necessary for the pid to be useful to that process. Since no use case currently exists for changing namespaces all

[PATCH v4 20/21] fuse: Restrict allow_other to the superblock's namespace or a descendant

2016-04-26 Thread Seth Forshee
Unprivileged users are normally restricted from mounting with the allow_other option by system policy, but this could be bypassed for a mount done with user namespace root permissions. In such cases allow_other should not allow users outside the userns to access the mount as doing so would give the

Re: [PATCH v1] ARM: clocksource: make ARM_GLOBAL_TIMER selectable

2016-04-26 Thread Grygorii Strashko
On 04/26/2016 07:02 PM, Liviu Dudau wrote: > On Tue, Apr 26, 2016 at 06:28:52PM +0300, Grygorii Strashko wrote: > > Hi Grygorii, > > First time I'm seeing this patch, so I have a few questions, mostly > related to the commit message: Hm. You are in cc for RFC. Sry, forgot to add link [1]. > >>

[PATCH v4 19/21] fuse: Support fuse filesystems outside of init_user_ns

2016-04-26 Thread Seth Forshee
In order to support mounts from namespaces other than init_user_ns, fuse must translate uids and gids to/from the userns of the process servicing requests on /dev/fuse. This patch does that, with a couple of restrictions on the namespace: - The userns for the fuse connection is fixed to the names

[PATCH v4 14/21] fs: Allow superblock owner to change ownership of inodes with unmappable ids

2016-04-26 Thread Seth Forshee
In a userns mount some on-disk inodes may have ids which do not map into s_user_ns, in which case the in-kernel inodes are owned by invalid users. The superblock owner should be able to change attributes of these inodes but cannot. However it is unsafe to grant the superblock owner privileged acces

[PATCH v4 13/21] fs: Update posix_acl support to handle user namespace mounts

2016-04-26 Thread Seth Forshee
ids in on-disk ACLs should be converted to s_user_ns instead of init_user_ns as is done now. This introduces the possibility for id mappings to fail, and when this happens syscalls will return EOVERFLOW. Signed-off-by: Seth Forshee Acked-by: Serge Hallyn --- fs/posix_acl.c | 67

[PATCH v4 06/21] fs: Treat foreign mounts as nosuid

2016-04-26 Thread Seth Forshee
From: Andy Lutomirski If a process gets access to a mount from a different user namespace, that process should not be able to take advantage of setuid files or selinux entrypoints from that filesystem. Prevent this by treating mounts from other mount namespaces and those not owned by current_use

Re: random(4) changes

2016-04-26 Thread Pavel Machek
Hi! > > > > When dropping the add_disk_randomness function in the legacy > > > > /dev/random, I > > > > would assume that without changes to add_input_randomness and > > > > add_interrupt_randomness, we become even more entropy-starved. > > > > > > Sure, but your system isn't doing anything magic

Re: [PATCH arm 1/1] arm: Use _rcuidle tracepoint to allow use from idle

2016-04-26 Thread Paul E. McKenney
= 0 > > RCU used illegally from extended quiescent state! > > no locks held by swapper/1/0. > > > > stack backtrace: > > CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.6.0-rc5-next-20160426+ #1113 > > Hardware name: Generic OMAP4 (Flattened Device Tree) > > []

Re: [PATCH 0/6] Intel Secure Guard Extensions

2016-04-26 Thread Pavel Machek
On Tue 2016-04-26 12:05:48, Andy Lutomirski wrote: > On Tue, Apr 26, 2016 at 12:00 PM, Pavel Machek wrote: > > On Mon 2016-04-25 20:34:07, Jarkko Sakkinen wrote: > >> Intel(R) SGX is a set of CPU instructions that can be used by > >> applications to set aside private regions of code and data. The

Re: [PATCH arm 1/1] arm: Use _rcuidle tracepoint to allow use from idle

2016-04-26 Thread Tony Lindgren
another warning, See below :) Regards, Tony 8< -- === [ INFO: suspicious RCU usage. ] 4.6.0-rc5-next-20160426+ #1114 Not tainted --- include/trace/events/clk.h:59 suspicious rcu_dereference_check() usage! other info that

Re: [PATCH arm 1/1] arm: Use _rcuidle tracepoint to allow use from idle

2016-04-26 Thread Tony Lindgren
* Steven Rostedt [160426 12:18]: > Time to play "Whack-a-Mole"(TM) :) > Signed-off-by: Steven Rostedt > --- > diff --git a/arch/arm/mach-omap2/powerdomain.c > b/arch/arm/mach-omap2/powerdomain.c > index 78af6d8cf2e2..12b66b5bcc55 100644 > --- a/arch/arm/mach-omap2/powerdomain.c > +++ b/arch/ar

[PATCH v4 15/21] fs: Don't remove suid for CAP_FSETID in s_user_ns

2016-04-26 Thread Seth Forshee
Expand the check in should_remove_suid() to keep privileges for CAP_FSETID in s_user_ns rather than init_user_ns. Signed-off-by: Seth Forshee Acked-by: Serge Hallyn --- fs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/inode.c b/fs/inode.c index 69b8b526c194..c

[PATCH 1/2] clk: bcm2835: Mark the VPU clock as critical

2016-04-26 Thread Eric Anholt
The VPU clock is also the clock for our AXI bus, so we really can't disable it. This might have happened during boot if, for example, uart1 (aux_uart clock) probed and was then disabled before the other consumers of the VPU clock had probed. Signed-off-by: Eric Anholt --- drivers/clk/bcm/clk-bc

Re: [PATCH 1/6] bus: Add shared MDIO bus framework

2016-04-26 Thread Andrew Lunn
On Tue, Apr 26, 2016 at 09:24:34PM +0200, Arnd Bergmann wrote: > On Tuesday 26 April 2016 20:23:35 Andrew Lunn wrote: > > > A more complex problem would be having a PHY driver for a device > > > that can be either an ethernet phy or some other phy. > > > > I doubt that ever happens. You can have u

Re: [PATCH mmotm 3/3] mm, compaction: prevent nr_isolated_* from going negative

2016-04-26 Thread Vlastimil Babka
On 04/26/2016 02:55 AM, Joonsoo Kim wrote: On Mon, Apr 25, 2016 at 03:35:50PM +0200, Vlastimil Babka wrote: @@ -846,9 +845,11 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, spin_unlock_irqrestore(&zone->lru_lock, flags);

[PATCH 2/2] clk: bcm2835: Skip PLLC clocks when deciding on a new clock parent

2016-04-26 Thread Eric Anholt
If the firmware had set up a clock to source from PLLC, go along with it. But if we're looking for a new parent, we don't want to switch it to PLLC because the firmware will force PLLC (and thus the AXI bus clock) to different frequencies during over-temp/under-voltage, without notification to Lin

Re: [PATCH arm 1/1] arm: Use _rcuidle tracepoint to allow use from idle

2016-04-26 Thread Paul E. McKenney
This commit adds an _rcuidle suffix to a pair of trace events to prevent the following splat: > === > [ INFO: suspicious RCU usage. ] > 4.6.0-rc5-next-20160426+ #1114 Not tainted > --- > include

Re: [PATCH 26/28] cpuset: use static key better and convert to new API

2016-04-26 Thread Vlastimil Babka
On 04/15/2016 11:07 AM, Mel Gorman wrote: From: Vlastimil Babka An important function for cpusets is cpuset_node_allowed(), which optimizes on the fact if there's a single root CPU set, it must be trivially allowed. But the check "nr_cpusets() <= 1" doesn't use the cpusets_enabled_key static ke

[PATCH v4 08/21] userns: Replace in_userns with current_in_userns

2016-04-26 Thread Seth Forshee
All current callers of in_userns pass current_user_ns as the first argument. Simplify by replacing in_userns with current_in_userns which checks whether current_user_ns is in the namespace supplied as an argument. Signed-off-by: Seth Forshee Acked-by: James Morris Acked-by: Serge Hallyn --- fs

  1   2   3   4   5   6   7   8   9   10   >