linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3.10 00/14] 3.10.84-stable review
@ 2015-07-08  7:31 Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 01/14] sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context Greg Kroah-Hartman
                   ` (16 more replies)
  0 siblings, 17 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah.kh, stable

This is the start of the stable review cycle for the 3.10.84 release.
There are 14 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Fri Jul 10 07:30:40 UTC 2015.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v3.x/stable-review/patch-3.10.84-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 3.10.84-rc1

Jan Kara <jack@suse.cz>
    fs: Fix S_NOSEC handling

Radim Krčmář <rkrcmar@redhat.com>
    KVM: x86: make vapics_in_nmi_mode atomic

James Hogan <james.hogan@imgtec.com>
    MIPS: Fix KVM guest fixmap address

Bjorn Helgaas <bhelgaas@google.com>
    x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A

Anton Blanchard <anton@samba.org>
    powerpc/perf: Fix book3s kernel to userspace backtraces

Marc Zyngier <marc.zyngier@arm.com>
    arm: KVM: force execution of HCPTR access on VM exit

Horia Geant? <horia.geanta@freescale.com>
    Revert "crypto: talitos - convert to use be16_add_cpu()"

Horia Geant? <horia.geanta@freescale.com>
    crypto: talitos - avoid memleak in talitos_alg_alloc()

Alexander Sverdlin <alexander.sverdlin@nokia.com>
    sctp: Fix race between OOTB responce and route removal

Willem de Bruijn <willemb@google.com>
    packet: avoid out of bounds read in round robin fanout

Eric Dumazet <edumazet@google.com>
    packet: read num_members once in packet_rcv_fanout()

Nikolay Aleksandrov <razor@blackwall.org>
    bridge: fix br_stp_set_bridge_priority race conditions

Nikolay Aleksandrov <razor@blackwall.org>
    bridge: fix multicast router rlist endless loop

Sowmini Varadhan <sowmini.varadhan@oracle.com>
    sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context


-------------

Diffstat:

 Makefile                                    |  4 ++--
 arch/arm/kvm/interrupts.S                   | 10 ++++------
 arch/arm/kvm/interrupts_head.S              | 20 ++++++++++++++++++--
 arch/mips/include/asm/mach-generic/spaces.h |  4 ++++
 arch/powerpc/perf/core-book3s.c             | 11 ++++++++++-
 arch/sparc/kernel/ldc.c                     |  2 +-
 arch/x86/include/asm/kvm_host.h             |  2 +-
 arch/x86/kvm/i8254.c                        |  2 +-
 arch/x86/kvm/lapic.c                        |  4 ++--
 arch/x86/pci/acpi.c                         | 11 +++++++++++
 drivers/crypto/talitos.c                    |  4 +++-
 fs/inode.c                                  |  4 ++--
 net/bridge/br_ioctl.c                       |  2 --
 net/bridge/br_multicast.c                   |  7 +++----
 net/bridge/br_stp_if.c                      |  4 +++-
 net/packet/af_packet.c                      | 20 +++-----------------
 net/sctp/output.c                           |  4 +++-
 17 files changed, 71 insertions(+), 44 deletions(-)



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 01/14] sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 02/14] bridge: fix multicast router rlist endless loop Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Sowmini Varadhan

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sowmini Varadhan <sowmini.varadhan@oracle.com>

Upstream commit 671d773297969bebb1732e1cdc1ec03aa53c6be2

Since it is possible for vnet_event_napi to end up doing
vnet_control_pkt_engine -> ... -> vnet_send_attr ->
vnet_port_alloc_tx_ring -> ldc_alloc_exp_dring -> kzalloc()
(i.e., in softirq context), kzalloc() should be called with
GFP_ATOMIC from ldc_alloc_exp_dring.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/sparc/kernel/ldc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -2306,7 +2306,7 @@ void *ldc_alloc_exp_dring(struct ldc_cha
 	if (len & (8UL - 1))
 		return ERR_PTR(-EINVAL);
 
-	buf = kzalloc(len, GFP_KERNEL);
+	buf = kzalloc(len, GFP_ATOMIC);
 	if (!buf)
 		return ERR_PTR(-ENOMEM);
 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 02/14] bridge: fix multicast router rlist endless loop
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 01/14] sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 03/14] bridge: fix br_stp_set_bridge_priority race conditions Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nikolay Aleksandrov, Herbert Xu,
	David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nikolay Aleksandrov <razor@blackwall.org>

[ Upstream commit 1a040eaca1a22f8da8285ceda6b5e4a2cb704867 ]

Since the addition of sysfs multicast router support if one set
multicast_router to "2" more than once, then the port would be added to
the hlist every time and could end up linking to itself and thus causing an
endless loop for rlist walkers.
So to reproduce just do:
echo 2 > multicast_router; echo 2 > multicast_router;
in a bridge port and let some igmp traffic flow, for me it hangs up
in br_multicast_flood().
Fix this by adding a check in br_multicast_add_router() if the port is
already linked.
The reason this didn't happen before the addition of multicast_router
sysfs entries is because there's a !hlist_unhashed check that prevents
it.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Fixes: 0909e11758bd ("bridge: Add multicast_router sysfs entries")
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/bridge/br_multicast.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1026,6 +1026,9 @@ static void br_multicast_add_router(stru
 	struct net_bridge_port *p;
 	struct hlist_node *slot = NULL;
 
+	if (!hlist_unhashed(&port->rlist))
+		return;
+
 	hlist_for_each_entry(p, &br->router_list, rlist) {
 		if ((unsigned long) port >= (unsigned long) p)
 			break;
@@ -1053,12 +1056,8 @@ static void br_multicast_mark_router(str
 	if (port->multicast_router != 1)
 		return;
 
-	if (!hlist_unhashed(&port->rlist))
-		goto timer;
-
 	br_multicast_add_router(br, port);
 
-timer:
 	mod_timer(&port->multicast_router_timer,
 		  now + br->multicast_querier_interval);
 }



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 03/14] bridge: fix br_stp_set_bridge_priority race conditions
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 01/14] sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 02/14] bridge: fix multicast router rlist endless loop Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 04/14] packet: read num_members once in packet_rcv_fanout() Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nikolay Aleksandrov, David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nikolay Aleksandrov <razor@blackwall.org>

[ Upstream commit 2dab80a8b486f02222a69daca6859519e05781d9 ]

After the ->set() spinlocks were removed br_stp_set_bridge_priority
was left running without any protection when used via sysfs. It can
race with port add/del and could result in use-after-free cases and
corrupted lists. Tested by running port add/del in a loop with stp
enabled while setting priority in a loop, crashes are easily
reproducible.
The spinlocks around sysfs ->set() were removed in commit:
14f98f258f19 ("bridge: range check STP parameters")
There's also a race condition in the netlink priority support that is
fixed by this change, but it was introduced recently and the fixes tag
covers it, just in case it's needed the commit is:
af615762e972 ("bridge: add ageing_time, stp_state, priority over netlink")

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Fixes: 14f98f258f19 ("bridge: range check STP parameters")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/bridge/br_ioctl.c  |    2 --
 net/bridge/br_stp_if.c |    4 +++-
 2 files changed, 3 insertions(+), 3 deletions(-)

--- a/net/bridge/br_ioctl.c
+++ b/net/bridge/br_ioctl.c
@@ -247,9 +247,7 @@ static int old_dev_ioctl(struct net_devi
 		if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN))
 			return -EPERM;
 
-		spin_lock_bh(&br->lock);
 		br_stp_set_bridge_priority(br, args[1]);
-		spin_unlock_bh(&br->lock);
 		return 0;
 
 	case BRCTL_SET_PORT_PRIORITY:
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -241,12 +241,13 @@ bool br_stp_recalculate_bridge_id(struct
 	return true;
 }
 
-/* called under bridge lock */
+/* Acquires and releases bridge lock */
 void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio)
 {
 	struct net_bridge_port *p;
 	int wasroot;
 
+	spin_lock_bh(&br->lock);
 	wasroot = br_is_root_bridge(br);
 
 	list_for_each_entry(p, &br->port_list, list) {
@@ -264,6 +265,7 @@ void br_stp_set_bridge_priority(struct n
 	br_port_state_selection(br);
 	if (br_is_root_bridge(br) && !wasroot)
 		br_become_root_bridge(br);
+	spin_unlock_bh(&br->lock);
 }
 
 /* called under bridge lock */



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 04/14] packet: read num_members once in packet_rcv_fanout()
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 03/14] bridge: fix br_stp_set_bridge_priority race conditions Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 05/14] packet: avoid out of bounds read in round robin fanout Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Eric Dumazet, Willem de Bruijn,
	David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Eric Dumazet <edumazet@google.com>

[ Upstream commit f98f4514d07871da7a113dd9e3e330743fd70ae4 ]

We need to tell compiler it must not read f->num_members multiple
times. Otherwise testing if num is not zero is flaky, and we could
attempt an invalid divide by 0 in fanout_demux_cpu()

Note bug was present in packet_rcv_fanout_hash() and
packet_rcv_fanout_lb() but final 3.1 had a simple location
after commit 95ec3eb417115fb ("packet: Add 'cpu' fanout policy.")

Fixes: dc99f600698dc ("packet: Add fanout support.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/packet/af_packet.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1217,7 +1217,7 @@ static int packet_rcv_fanout(struct sk_b
 			     struct packet_type *pt, struct net_device *orig_dev)
 {
 	struct packet_fanout *f = pt->af_packet_priv;
-	unsigned int num = f->num_members;
+	unsigned int num = ACCESS_ONCE(f->num_members);
 	struct packet_sock *po;
 	unsigned int idx;
 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 05/14] packet: avoid out of bounds read in round robin fanout
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 04/14] packet: read num_members once in packet_rcv_fanout() Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 06/14] sctp: Fix race between OOTB responce and route removal Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Eric Dumazet, Willem de Bruijn,
	David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Willem de Bruijn <willemb@google.com>

[ Upstream commit 468479e6043c84f5a65299cc07cb08a22a28c2b1 ]

PACKET_FANOUT_LB computes f->rr_cur such that it is modulo
f->num_members. It returns the old value unconditionally, but
f->num_members may have changed since the last store. Ensure
that the return value is always < num.

When modifying the logic, simplify it further by replacing the loop
with an unconditional atomic increment.

Fixes: dc99f600698d ("packet: Add fanout support.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/packet/af_packet.c |   18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1150,16 +1150,6 @@ static void packet_sock_destruct(struct
 	sk_refcnt_debug_dec(sk);
 }
 
-static int fanout_rr_next(struct packet_fanout *f, unsigned int num)
-{
-	int x = atomic_read(&f->rr_cur) + 1;
-
-	if (x >= num)
-		x = 0;
-
-	return x;
-}
-
 static unsigned int fanout_demux_hash(struct packet_fanout *f,
 				      struct sk_buff *skb,
 				      unsigned int num)
@@ -1171,13 +1161,9 @@ static unsigned int fanout_demux_lb(stru
 				    struct sk_buff *skb,
 				    unsigned int num)
 {
-	int cur, old;
+	unsigned int val = atomic_inc_return(&f->rr_cur);
 
-	cur = atomic_read(&f->rr_cur);
-	while ((old = atomic_cmpxchg(&f->rr_cur, cur,
-				     fanout_rr_next(f, num))) != cur)
-		cur = old;
-	return cur;
+	return val % num;
 }
 
 static unsigned int fanout_demux_cpu(struct packet_fanout *f,



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 06/14] sctp: Fix race between OOTB responce and route removal
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 05/14] packet: avoid out of bounds read in round robin fanout Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 07/14] crypto: talitos - avoid memleak in talitos_alg_alloc() Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Sverdlin, Neil Horman,
	Marcelo Ricardo Leitner, Vlad Yasevich, David S. Miller

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alexander Sverdlin <alexander.sverdlin@nokia.com>

[ Upstream commit 29c4afc4e98f4dc0ea9df22c631841f9c220b944 ]

There is NULL pointer dereference possible during statistics update if the route
used for OOTB responce is removed at unfortunate time. If the route exists when
we receive OOTB packet and we finally jump into sctp_packet_transmit() to send
ABORT, but in the meantime route is removed under our feet, we take "no_route"
path and try to update stats with IP_INC_STATS(sock_net(asoc->base.sk), ...).

But sctp_ootb_pkt_new() used to prepare responce packet doesn't call
sctp_transport_set_owner() and therefore there is no asoc associated with this
packet. Probably temporary asoc just for OOTB responces is overkill, so just
introduce a check like in all other places in sctp_packet_transmit(), where
"asoc" is dereferenced.

To reproduce this, one needs to
0. ensure that sctp module is loaded (otherwise ABORT is not generated)
1. remove default route on the machine
2. while true; do
     ip route del [interface-specific route]
     ip route add [interface-specific route]
   done
3. send enough OOTB packets (i.e. HB REQs) from another host to trigger ABORT
   responce

On x86_64 the crash looks like this:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
IP: [<ffffffffa05ec9ac>] sctp_packet_transmit+0x63c/0x730 [sctp]
PGD 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: ...
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O    4.0.5-1-ARCH #1
Hardware name: ...
task: ffffffff818124c0 ti: ffffffff81800000 task.ti: ffffffff81800000
RIP: 0010:[<ffffffffa05ec9ac>]  [<ffffffffa05ec9ac>] sctp_packet_transmit+0x63c/0x730 [sctp]
RSP: 0018:ffff880127c037b8  EFLAGS: 00010296
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000015ff66b480
RDX: 00000015ff66b400 RSI: ffff880127c17200 RDI: ffff880123403700
RBP: ffff880127c03888 R08: 0000000000017200 R09: ffffffff814625af
R10: ffffea00047e4680 R11: 00000000ffffff80 R12: ffff8800b0d38a28
R13: ffff8800b0d38a28 R14: ffff8800b3e88000 R15: ffffffffa05f24e0
FS:  0000000000000000(0000) GS:ffff880127c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000020 CR3: 00000000c855b000 CR4: 00000000000007f0
Stack:
 ffff880127c03910 ffff8800b0d38a28 ffffffff8189d240 ffff88011f91b400
 ffff880127c03828 ffffffffa05c94c5 0000000000000000 ffff8800baa1c520
 0000000000000000 0000000000000001 0000000000000000 0000000000000000
Call Trace:
 <IRQ>
 [<ffffffffa05c94c5>] ? sctp_sf_tabort_8_4_8.isra.20+0x85/0x140 [sctp]
 [<ffffffffa05d6b42>] ? sctp_transport_put+0x52/0x80 [sctp]
 [<ffffffffa05d0bfc>] sctp_do_sm+0xb8c/0x19a0 [sctp]
 [<ffffffff810b0e00>] ? trigger_load_balance+0x90/0x210
 [<ffffffff810e0329>] ? update_process_times+0x59/0x60
 [<ffffffff812c7a40>] ? timerqueue_add+0x60/0xb0
 [<ffffffff810e0549>] ? enqueue_hrtimer+0x29/0xa0
 [<ffffffff8101f599>] ? read_tsc+0x9/0x10
 [<ffffffff8116d4b5>] ? put_page+0x55/0x60
 [<ffffffff810ee1ad>] ? clockevents_program_event+0x6d/0x100
 [<ffffffff81462b68>] ? skb_free_head+0x58/0x80
 [<ffffffffa029a10b>] ? chksum_update+0x1b/0x27 [crc32c_generic]
 [<ffffffff81283f3e>] ? crypto_shash_update+0xce/0xf0
 [<ffffffffa05d3993>] sctp_endpoint_bh_rcv+0x113/0x280 [sctp]
 [<ffffffffa05dd4e6>] sctp_inq_push+0x46/0x60 [sctp]
 [<ffffffffa05ed7a0>] sctp_rcv+0x880/0x910 [sctp]
 [<ffffffffa05ecb50>] ? sctp_packet_transmit_chunk+0xb0/0xb0 [sctp]
 [<ffffffffa05ecb70>] ? sctp_csum_update+0x20/0x20 [sctp]
 [<ffffffff814b05a5>] ? ip_route_input_noref+0x235/0xd30
 [<ffffffff81051d6b>] ? ack_ioapic_level+0x7b/0x150
 [<ffffffff814b27be>] ip_local_deliver_finish+0xae/0x210
 [<ffffffff814b2e15>] ip_local_deliver+0x35/0x90
 [<ffffffff814b2a15>] ip_rcv_finish+0xf5/0x370
 [<ffffffff814b3128>] ip_rcv+0x2b8/0x3a0
 [<ffffffff81474193>] __netif_receive_skb_core+0x763/0xa50
 [<ffffffff81476c28>] __netif_receive_skb+0x18/0x60
 [<ffffffff81476cb0>] netif_receive_skb_internal+0x40/0xd0
 [<ffffffff814776c8>] napi_gro_receive+0xe8/0x120
 [<ffffffffa03946aa>] rtl8169_poll+0x2da/0x660 [r8169]
 [<ffffffff8147896a>] net_rx_action+0x21a/0x360
 [<ffffffff81078dc1>] __do_softirq+0xe1/0x2d0
 [<ffffffff8107912d>] irq_exit+0xad/0xb0
 [<ffffffff8157d158>] do_IRQ+0x58/0xf0
 [<ffffffff8157b06d>] common_interrupt+0x6d/0x6d
 <EOI>
 [<ffffffff810e1218>] ? hrtimer_start+0x18/0x20
 [<ffffffffa05d65f9>] ? sctp_transport_destroy_rcu+0x29/0x30 [sctp]
 [<ffffffff81020c50>] ? mwait_idle+0x60/0xa0
 [<ffffffff810216ef>] arch_cpu_idle+0xf/0x20
 [<ffffffff810b731c>] cpu_startup_entry+0x3ec/0x480
 [<ffffffff8156b365>] rest_init+0x85/0x90
 [<ffffffff818eb035>] start_kernel+0x48b/0x4ac
 [<ffffffff818ea120>] ? early_idt_handlers+0x120/0x120
 [<ffffffff818ea339>] x86_64_start_reservations+0x2a/0x2c
 [<ffffffff818ea49c>] x86_64_start_kernel+0x161/0x184
Code: 90 48 8b 80 b8 00 00 00 48 89 85 70 ff ff ff 48 83 bd 70 ff ff ff 00 0f 85 cd fa ff ff 48 89 df 31 db e8 18 63 e7 e0 48 8b 45 80 <48> 8b 40 20 48 8b 40 30 48 8b 80 68 01 00 00 65 48 ff 40 78 e9
RIP  [<ffffffffa05ec9ac>] sctp_packet_transmit+0x63c/0x730 [sctp]
 RSP <ffff880127c037b8>
CR2: 0000000000000020
---[ end trace 5aec7fd2dc983574 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff)
drm_kms_helper: panic occurred, switching back to text console
---[ end Kernel panic - not syncing: Fatal exception in interrupt

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/sctp/output.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -618,7 +618,9 @@ out:
 	return err;
 no_route:
 	kfree_skb(nskb);
-	IP_INC_STATS(sock_net(asoc->base.sk), IPSTATS_MIB_OUTNOROUTES);
+
+	if (asoc)
+		IP_INC_STATS(sock_net(asoc->base.sk), IPSTATS_MIB_OUTNOROUTES);
 
 	/* FIXME: Returning the 'err' will effect all the associations
 	 * associated with a socket, although only one of the paths of the



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 07/14] crypto: talitos - avoid memleak in talitos_alg_alloc()
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 06/14] sctp: Fix race between OOTB responce and route removal Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 08/14] Revert "crypto: talitos - convert to use be16_add_cpu()" Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Horia Geanta, Herbert Xu

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Horia Geant? <horia.geanta@freescale.com>

commit 5fa7dadc898567ce14d6d6d427e7bd8ce6eb5d39 upstream.

Fixes: 1d11911a8c57 ("crypto: talitos - fix warning: 'alg' may be used uninitialized in this function")
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/crypto/talitos.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -2621,6 +2621,7 @@ static struct talitos_crypto_alg *talito
 		break;
 	default:
 		dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type);
+		kfree(t_alg);
 		return ERR_PTR(-EINVAL);
 	}
 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 08/14] Revert "crypto: talitos - convert to use be16_add_cpu()"
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 07/14] crypto: talitos - avoid memleak in talitos_alg_alloc() Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 09/14] arm: KVM: force execution of HCPTR access on VM exit Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wei Yongjun, Horia Geanta, Herbert Xu

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Horia Geant? <horia.geanta@freescale.com>

commit 69d9cd8c592f1abce820dbce7181bbbf6812cfbd upstream.

This reverts commit 7291a932c6e27d9768e374e9d648086636daf61c.

The conversion to be16_add_cpu() is incorrect in case cryptlen is
negative due to premature (i.e. before addition / subtraction)
implicit conversion of cryptlen (int -> u16) leading to sign loss.

Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/crypto/talitos.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -935,7 +935,8 @@ static int sg_to_link_tbl(struct scatter
 		sg_count--;
 		link_tbl_ptr--;
 	}
-	be16_add_cpu(&link_tbl_ptr->len, cryptlen);
+	link_tbl_ptr->len = cpu_to_be16(be16_to_cpu(link_tbl_ptr->len)
+					+ cryptlen);
 
 	/* tag end of link table */
 	link_tbl_ptr->j_extent = DESC_PTR_LNKTBL_RETURN;



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 09/14] arm: KVM: force execution of HCPTR access on VM exit
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 08/14] Revert "crypto: talitos - convert to use be16_add_cpu()" Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 10/14] powerpc/perf: Fix book3s kernel to userspace backtraces Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Vikram Sethi, Marc Zyngier

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Marc Zyngier <marc.zyngier@arm.com>

commit 85e84ba31039595995dae80b277378213602891b upstream.

On VM entry, we disable access to the VFP registers in order to
perform a lazy save/restore of these registers.

On VM exit, we restore access, test if we did enable them before,
and save/restore the guest/host registers if necessary. In this
sequence, the FPEXC register is always accessed, irrespective
of the trapping configuration.

If the guest didn't touch the VFP registers, then the HCPTR access
has now enabled such access, but we're missing a barrier to ensure
architectural execution of the new HCPTR configuration. If the HCPTR
access has been delayed/reordered, the subsequent access to FPEXC
will cause a trap, which we aren't prepared to handle at all.

The same condition exists when trapping to enable VFP for the guest.

The fix is to introduce a barrier after enabling VFP access. In the
vmexit case, it can be relaxed to only takes place if the guest hasn't
accessed its view of the VFP registers, making the access to FPEXC safe.

The set_hcptr macro is modified to deal with both vmenter/vmexit and
vmtrap operations, and now takes an optional label that is branched to
when the guest hasn't touched the VFP registers.

Reported-by: Vikram Sethi <vikrams@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/kvm/interrupts.S      |   10 ++++------
 arch/arm/kvm/interrupts_head.S |   20 ++++++++++++++++++--
 2 files changed, 22 insertions(+), 8 deletions(-)

--- a/arch/arm/kvm/interrupts.S
+++ b/arch/arm/kvm/interrupts.S
@@ -159,13 +159,9 @@ __kvm_vcpu_return:
 	@ Don't trap coprocessor accesses for host kernel
 	set_hstr vmexit
 	set_hdcr vmexit
-	set_hcptr vmexit, (HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11))
+	set_hcptr vmexit, (HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11)), after_vfp_restore
 
 #ifdef CONFIG_VFPv3
-	@ Save floating point registers we if let guest use them.
-	tst	r2, #(HCPTR_TCP(10) | HCPTR_TCP(11))
-	bne	after_vfp_restore
-
 	@ Switch VFP/NEON hardware state to the host's
 	add	r7, vcpu, #VCPU_VFP_GUEST
 	store_vfp_state r7
@@ -177,6 +173,8 @@ after_vfp_restore:
 	@ Restore FPEXC_EN which we clobbered on entry
 	pop	{r2}
 	VFPFMXR FPEXC, r2
+#else
+after_vfp_restore:
 #endif
 
 	@ Reset Hyp-role
@@ -458,7 +456,7 @@ switch_to_guest_vfp:
 	push	{r3-r7}
 
 	@ NEON/VFP used.  Turn on VFP access.
-	set_hcptr vmexit, (HCPTR_TCP(10) | HCPTR_TCP(11))
+	set_hcptr vmtrap, (HCPTR_TCP(10) | HCPTR_TCP(11))
 
 	@ Switch VFP/NEON hardware state to the guest's
 	add	r7, r0, #VCPU_VFP_HOST
--- a/arch/arm/kvm/interrupts_head.S
+++ b/arch/arm/kvm/interrupts_head.S
@@ -570,8 +570,13 @@ vcpu	.req	r0		@ vcpu pointer always in r
 .endm
 
 /* Configures the HCPTR (Hyp Coprocessor Trap Register) on entry/return
- * (hardware reset value is 0). Keep previous value in r2. */
-.macro set_hcptr operation, mask
+ * (hardware reset value is 0). Keep previous value in r2.
+ * An ISB is emited on vmexit/vmtrap, but executed on vmexit only if
+ * VFP wasn't already enabled (always executed on vmtrap).
+ * If a label is specified with vmexit, it is branched to if VFP wasn't
+ * enabled.
+ */
+.macro set_hcptr operation, mask, label = none
 	mrc	p15, 4, r2, c1, c1, 2
 	ldr	r3, =\mask
 	.if \operation == vmentry
@@ -580,6 +585,17 @@ vcpu	.req	r0		@ vcpu pointer always in r
 	bic	r3, r2, r3		@ Don't trap defined coproc-accesses
 	.endif
 	mcr	p15, 4, r3, c1, c1, 2
+	.if \operation != vmentry
+	.if \operation == vmexit
+	tst	r2, #(HCPTR_TCP(10) | HCPTR_TCP(11))
+	beq	1f
+	.endif
+	isb
+	.if \label != none
+	b	\label
+	.endif
+1:
+	.endif
 .endm
 
 /* Configures the HDCR (Hyp Debug Configuration Register) on entry/return



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 10/14] powerpc/perf: Fix book3s kernel to userspace backtraces
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 09/14] arm: KVM: force execution of HCPTR access on VM exit Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 11/14] x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Anton Blanchard, Michael Ellerman

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Anton Blanchard <anton@samba.org>

commit 72e349f1124a114435e599479c9b8d14bfd1ebcd upstream.

When we take a PMU exception or a software event we call
perf_read_regs(). This overloads regs->result with a boolean that
describes if we should use the sampled instruction address register
(SIAR) or the regs.

If the exception is in kernel, we start with the kernel regs and
backtrace through the kernel stack. At this point we switch to the
userspace regs and backtrace the user stack with perf_callchain_user().

Unfortunately these regs have not got the perf_read_regs() treatment,
so regs->result could be anything. If it is non zero,
perf_instruction_pointer() decides to use the SIAR, and we get issues
like this:

0.11%  qemu-system-ppc  [kernel.kallsyms]        [k] _raw_spin_lock_irqsave
       |
       ---_raw_spin_lock_irqsave
          |
          |--52.35%-- 0
          |          |
          |          |--46.39%-- __hrtimer_start_range_ns
          |          |          kvmppc_run_core
          |          |          kvmppc_vcpu_run_hv
          |          |          kvmppc_vcpu_run
          |          |          kvm_arch_vcpu_ioctl_run
          |          |          kvm_vcpu_ioctl
          |          |          do_vfs_ioctl
          |          |          sys_ioctl
          |          |          system_call
          |          |          |
          |          |          |--67.08%-- _raw_spin_lock_irqsave <--- hi mum
          |          |          |          |
          |          |          |           --100.00%-- 0x7e714
          |          |          |                     0x7e714

Notice the bogus _raw_spin_irqsave when we transition from kernel
(system_call) to userspace (0x7e714). We inserted what was in the SIAR.

Add a check in regs_use_siar() to check that the regs in question
are from a PMU exception. With this fix the backtrace makes sense:

     0.47%  qemu-system-ppc  [kernel.vmlinux]         [k] _raw_spin_lock_irqsave
            |
            ---_raw_spin_lock_irqsave
               |
               |--53.83%-- 0
               |          |
               |          |--44.73%-- hrtimer_try_to_cancel
               |          |          kvmppc_start_thread
               |          |          kvmppc_run_core
               |          |          kvmppc_vcpu_run_hv
               |          |          kvmppc_vcpu_run
               |          |          kvm_arch_vcpu_ioctl_run
               |          |          kvm_vcpu_ioctl
               |          |          do_vfs_ioctl
               |          |          sys_ioctl
               |          |          system_call
               |          |          __ioctl
               |          |          0x7e714
               |          |          0x7e714

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/powerpc/perf/core-book3s.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -112,7 +112,16 @@ static inline void power_pmu_bhrb_read(s
 
 static bool regs_use_siar(struct pt_regs *regs)
 {
-	return !!regs->result;
+	/*
+	 * When we take a performance monitor exception the regs are setup
+	 * using perf_read_regs() which overloads some fields, in particular
+	 * regs->result to tell us whether to use SIAR.
+	 *
+	 * However if the regs are from another exception, eg. a syscall, then
+	 * they have not been setup using perf_read_regs() and so regs->result
+	 * is something random.
+	 */
+	return ((TRAP(regs) == 0xf00) && regs->result);
 }
 
 /*



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 11/14] x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 10/14] powerpc/perf: Fix book3s kernel to userspace backtraces Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 12/14] MIPS: Fix KVM guest fixmap address Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Bjorn Helgaas

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Bjorn Helgaas <bhelgaas@google.com>

commit 1dace0116d0b05c967d94644fc4dfe96be2ecd3d upstream.

The Foxconn K8M890-8237A has two PCI host bridges, and we can't assign
resources correctly without the information from _CRS that tells us which
address ranges are claimed by which bridge.  In the bugs mentioned below,
we incorrectly assign a sound card address (this example is from 1033299):

  bus: 00 index 2 [mem 0x80000000-0xfcffffffff]
  ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-7f])
  pci_root PNP0A08:00: host bridge window [mem 0x80000000-0xbfefffff] (ignored)
  pci_root PNP0A08:00: host bridge window [mem 0xc0000000-0xdfffffff] (ignored)
  pci_root PNP0A08:00: host bridge window [mem 0xf0000000-0xfebfffff] (ignored)
  ACPI: PCI Root Bridge [PCI1] (domain 0000 [bus 80-ff])
  pci_root PNP0A08:01: host bridge window [mem 0xbff00000-0xbfffffff] (ignored)
  pci 0000:80:01.0: [1106:3288] type 0 class 0x000403
  pci 0000:80:01.0: reg 10: [mem 0xbfffc000-0xbfffffff 64bit]
  pci 0000:80:01.0: address space collision: [mem 0xbfffc000-0xbfffffff 64bit] conflicts with PCI Bus #00 [mem 0x80000000-0xfcffffffff]
  pci 0000:80:01.0: BAR 0: assigned [mem 0xfd00000000-0xfd00003fff 64bit]
  BUG: unable to handle kernel paging request at ffffc90000378000
  IP: [<ffffffffa0345f63>] azx_create+0x37c/0x822 [snd_hda_intel]

We assigned 0xfd_0000_0000, but that is not in any of the host bridge
windows, and the sound card doesn't work.

Turn on pci=use_crs automatically for this system.

Link: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/931368
Link: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1033299
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/pci/acpi.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -84,6 +84,17 @@ static const struct dmi_system_id pci_cr
 			DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
 		},
 	},
+	/* https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/931368 */
+	/* https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1033299 */
+	{
+		.callback = set_use_crs,
+		.ident = "Foxconn K8M890-8237A",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Foxconn"),
+			DMI_MATCH(DMI_BOARD_NAME, "K8M890-8237A"),
+			DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
+		},
+	},
 
 	/* Now for the blacklist.. */
 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 12/14] MIPS: Fix KVM guest fixmap address
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 11/14] x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08  7:31 ` [PATCH 3.10 14/14] fs: Fix S_NOSEC handling Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, James Hogan, linux-mips, Ralf Baechle

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: James Hogan <james.hogan@imgtec.com>

commit 8e748c8d09a9314eedb5c6367d9acfaacddcdc88 upstream.

KVM guest kernels for trap & emulate run in user mode, with a modified
set of kernel memory segments. However the fixmap address is still in
the normal KSeg3 region at 0xfffe0000 regardless, causing problems when
cache alias handling makes use of them when handling copy on write.

Therefore define FIXADDR_TOP as 0x7ffe0000 in the guest kernel mapped
region when CONFIG_KVM_GUEST is defined.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9887/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/include/asm/mach-generic/spaces.h |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/mips/include/asm/mach-generic/spaces.h
+++ b/arch/mips/include/asm/mach-generic/spaces.h
@@ -90,7 +90,11 @@
 #endif
 
 #ifndef FIXADDR_TOP
+#ifdef CONFIG_KVM_GUEST
+#define FIXADDR_TOP		((unsigned long)(long)(int)0x7ffe0000)
+#else
 #define FIXADDR_TOP		((unsigned long)(long)(int)0xfffe0000)
 #endif
+#endif
 
 #endif /* __ASM_MACH_GENERIC_SPACES_H */



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 3.10 14/14] fs: Fix S_NOSEC handling
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 12/14] MIPS: Fix KVM guest fixmap address Greg Kroah-Hartman
@ 2015-07-08  7:31 ` Greg Kroah-Hartman
  2015-07-08 14:06 ` [PATCH 3.10 00/14] 3.10.84-stable review Guenter Roeck
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-08  7:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jan Kara, Al Viro

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jan Kara <jack@suse.cz>

commit 2426f3910069ed47c0cc58559a6d088af7920201 upstream.

file_remove_suid() could mistakenly set S_NOSEC inode bit when root was
modifying the file. As a result following writes to the file by ordinary
user would avoid clearing suid or sgid bits.

Fix the bug by checking actual mode bits before setting S_NOSEC.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/inode.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1628,8 +1628,8 @@ int file_remove_suid(struct file *file)
 		error = security_inode_killpriv(dentry);
 	if (!error && killsuid)
 		error = __remove_suid(dentry, killsuid);
-	if (!error && (inode->i_sb->s_flags & MS_NOSEC))
-		inode->i_flags |= S_NOSEC;
+	if (!error)
+		inode_has_no_xattr(inode);
 
 	return error;
 }



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3.10 00/14] 3.10.84-stable review
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2015-07-08  7:31 ` [PATCH 3.10 14/14] fs: Fix S_NOSEC handling Greg Kroah-Hartman
@ 2015-07-08 14:06 ` Guenter Roeck
  2015-07-08 14:42 ` Sudip Mukherjee
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2015-07-08 14:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, shuah.kh, stable

On 07/08/2015 12:31 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.84 release.
> There are 14 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri Jul 10 07:30:40 UTC 2015.
> Anything received after that time might be too late.
>

Build results:
	total: 116 pass: 115 fail: 1
Failed builds:
	s390:allmodconfig

Qemu test results:
	total: 27 pass: 27 fail: 0

Results are as expected.
Details are available at http://server.roeck-us.net:8010/builders.

Guenter


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3.10 00/14] 3.10.84-stable review
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2015-07-08 14:06 ` [PATCH 3.10 00/14] 3.10.84-stable review Guenter Roeck
@ 2015-07-08 14:42 ` Sudip Mukherjee
  2015-07-08 16:33 ` Shuah Khan
  2015-07-09 18:13 ` Kevin Hilman
  16 siblings, 0 replies; 20+ messages in thread
From: Sudip Mukherjee @ 2015-07-08 14:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, stable

On Wed, Jul 08, 2015 at 12:31:40AM -0700, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.84 release.
> There are 14 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri Jul 10 07:30:40 UTC 2015.
> Anything received after that time might be too late.
Compiled and booted on x86_32. No errors in dmesg.

regards
sudip
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3.10 00/14] 3.10.84-stable review
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2015-07-08 14:42 ` Sudip Mukherjee
@ 2015-07-08 16:33 ` Shuah Khan
  2015-07-09 18:13 ` Kevin Hilman
  16 siblings, 0 replies; 20+ messages in thread
From: Shuah Khan @ 2015-07-08 16:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, linux, shuah.kh, stable

On 07/08/2015 01:31 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.84 release.
> There are 14 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri Jul 10 07:30:40 UTC 2015.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	kernel.org/pub/linux/kernel/v3.x/stable-review/patch-3.10.84-rc1.gz
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3.10 00/14] 3.10.84-stable review
  2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2015-07-08 16:33 ` Shuah Khan
@ 2015-07-09 18:13 ` Kevin Hilman
  2015-07-10 17:34   ` Greg Kroah-Hartman
  16 siblings, 1 reply; 20+ messages in thread
From: Kevin Hilman @ 2015-07-09 18:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, stable

Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:

> This is the start of the stable review cycle for the 3.10.84 release.
> There are 14 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.

Boot test results from kernelci.org below. Note that the boot failures
found are not new failures in this version, so should not block release.

Kevin



stable-queue boot: 54 boots: 2 failed, 49 passed with 1 offline, 2 conflicts (v3.10.83-14-gf8838f449ad2)

Full Boot Summary: http://kernelci.org/boot/all/job/stable-queue/kernel/v3.10.83-14-gf8838f449ad2/
Full Build Summary: http://kernelci.org/build/stable-queue/kernel/v3.10.83-14-gf8838f449ad2/

Tree: stable-queue
Branch: local/linux-3.10.y-queue
Git Describe: v3.10.83-14-gf8838f449ad2
Git Commit: f8838f449ad2a35a3c8d228c7fed7f00297e20fa
Git URL: git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-stable.git
Tested: 31 unique boards, 12 SoC families, 15 builds out of 137

Boot Failures Detected: http://kernelci.org/boot/?v3.10.83-14-gf8838f449ad2&fail

arm:

    imx_v6_v7_defconfig:
        imx6q-sabrelite: 1 failed lab
        imx6q-sabrelite_rootfs:nfs: 1 failed lab

Offline Platforms:

x86:

    defconfig+CONFIG_OF_UNITTEST=y:
        x86: 1 offline lab

Conflicting Boot Failures Detected: (These likely are not failures as other labs are reporting PASS. Please review.)

x86:

    defconfig+CONFIG_OF_UNITTEST=y:
        x86-kvm:
            lab-mhart: PASS
            lab-tbaker: FAIL
            lab-cambridge: PASS

    x86_64_defconfig:
        x86-kvm:
            lab-mhart: PASS
            lab-tbaker: FAIL
            lab-cambridge: PASS

---
For more info write to <info@kernelci.org>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3.10 00/14] 3.10.84-stable review
  2015-07-09 18:13 ` Kevin Hilman
@ 2015-07-10 17:34   ` Greg Kroah-Hartman
  2015-07-10 18:51     ` Kevin Hilman
  0 siblings, 1 reply; 20+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-10 17:34 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, stable

On Thu, Jul 09, 2015 at 11:13:36AM -0700, Kevin Hilman wrote:
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> 
> > This is the start of the stable review cycle for the 3.10.84 release.
> > There are 14 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> 
> Boot test results from kernelci.org below. Note that the boot failures
> found are not new failures in this version, so should not block release.

Anything we should be backporting to resolve those failures?  Or does
this kernel version just not really matter for those platforms?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3.10 00/14] 3.10.84-stable review
  2015-07-10 17:34   ` Greg Kroah-Hartman
@ 2015-07-10 18:51     ` Kevin Hilman
  0 siblings, 0 replies; 20+ messages in thread
From: Kevin Hilman @ 2015-07-10 18:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, stable

Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:

> On Thu, Jul 09, 2015 at 11:13:36AM -0700, Kevin Hilman wrote:
>> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
>> 
>> > This is the start of the stable review cycle for the 3.10.84 release.
>> > There are 14 patches in this series, all will be posted as a response
>> > to this one.  If anyone has any issues with these being applied, please
>> > let me know.
>> 
>> Boot test results from kernelci.org below. Note that the boot failures
>> found are not new failures in this version, so should not block release.
>
> Anything we should be backporting to resolve those failures?  Or does
> this kernel version just not really matter for those platforms?

We're looking into the failures now, and will submit any backports
needed.  However, I think these remaining failures are just things that
never worked in v3.10, and we're finding as we add platforms to
kernelci.org.  In those cases, we'll just blacklist those from testing
on v3.10.

Kevin


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-07-10 18:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08  7:31 [PATCH 3.10 00/14] 3.10.84-stable review Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 01/14] sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 02/14] bridge: fix multicast router rlist endless loop Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 03/14] bridge: fix br_stp_set_bridge_priority race conditions Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 04/14] packet: read num_members once in packet_rcv_fanout() Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 05/14] packet: avoid out of bounds read in round robin fanout Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 06/14] sctp: Fix race between OOTB responce and route removal Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 07/14] crypto: talitos - avoid memleak in talitos_alg_alloc() Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 08/14] Revert "crypto: talitos - convert to use be16_add_cpu()" Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 09/14] arm: KVM: force execution of HCPTR access on VM exit Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 10/14] powerpc/perf: Fix book3s kernel to userspace backtraces Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 11/14] x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 12/14] MIPS: Fix KVM guest fixmap address Greg Kroah-Hartman
2015-07-08  7:31 ` [PATCH 3.10 14/14] fs: Fix S_NOSEC handling Greg Kroah-Hartman
2015-07-08 14:06 ` [PATCH 3.10 00/14] 3.10.84-stable review Guenter Roeck
2015-07-08 14:42 ` Sudip Mukherjee
2015-07-08 16:33 ` Shuah Khan
2015-07-09 18:13 ` Kevin Hilman
2015-07-10 17:34   ` Greg Kroah-Hartman
2015-07-10 18:51     ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).