All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Sparc
@ 2018-04-13 17:23 David Miller
  2018-04-13 17:38 ` David Miller
  0 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2018-04-13 17:23 UTC (permalink / raw)
  To: stable

[-- Attachment #1: Type: Text/Plain, Size: 74 bytes --]


Please queue up the attached sparc bug fix for 4.16 -stable.

Thank you.

[-- Attachment #2: sparc_416.mbox --]
[-- Type: Application/Octet-Stream, Size: 102 bytes --]

usage: git request-pull [options] start url [end]

    -p                    show patch text as well


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

* Re: [PATCH] Sparc
  2018-04-13 17:23 [PATCH] Sparc David Miller
@ 2018-04-13 17:38 ` David Miller
  2018-04-14 14:05   ` Greg KH
  0 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2018-04-13 17:38 UTC (permalink / raw)
  To: stable

[-- Attachment #1: Type: Text/Plain, Size: 191 bytes --]

From: David Miller <davem@davemloft.net>
Date: Fri, 13 Apr 2018 13:23:45 -0400 (EDT)

> 
> Please queue up the attached sparc bug fix for 4.16 -stable.

Sorry, this is the correct mbox file.

[-- Attachment #2: sparc_416.mbox --]
[-- Type: Application/Octet-Stream, Size: 1799 bytes --]

From d641d793b013a0d68373c799fb5840caff56f9f1 Mon Sep 17 00:00:00 2001
From: Rob Gardner <rob.gardner@oracle.com>
Date: Sat, 31 Mar 2018 22:53:01 -0600
Subject: [PATCH] sparc64: Properly range check DAX completion index

[ Upstream commit 49d7006d9f01d435661d03bbea3db4c33935b3d8 ]

Each Oracle DAX CCB has a corresponding completion area, and the required
number of areas must fit within a previously allocated array of completion
areas beginning at the requested index.  Since the completion area index
is specified by a file offset, a user can pass arbitrary values, including
negative numbers. So the index must be thoroughly range checked to prevent
access to addresses outside the bounds of the allocated completion
area array.  The index cannot be negative, and it cannot exceed the
total array size, less the number of CCBs requested. The old code did
not check for negative values and was off by one on the upper bound.

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Jonathan Helman <jonathan.helman@oracle.com>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/sbus/char/oradax.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/sbus/char/oradax.c b/drivers/sbus/char/oradax.c
index 03dc04739225..c44d7c7ffc92 100644
--- a/drivers/sbus/char/oradax.c
+++ b/drivers/sbus/char/oradax.c
@@ -880,7 +880,7 @@ static int dax_ccb_exec(struct dax_ctx *ctx, const char __user *buf,
 	dax_dbg("args: ccb_buf_len=%ld, idx=%d", count, idx);
 
 	/* for given index and length, verify ca_buf range exists */
-	if (idx + nccbs >= DAX_CA_ELEMS) {
+	if (idx < 0 || idx > (DAX_CA_ELEMS - nccbs)) {
 		ctx->result.exec.status = DAX_SUBMIT_ERR_NO_CA_AVAIL;
 		return 0;
 	}
-- 
2.14.3


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

* Re: [PATCH] Sparc
  2018-04-13 17:38 ` David Miller
@ 2018-04-14 14:05   ` Greg KH
  0 siblings, 0 replies; 21+ messages in thread
From: Greg KH @ 2018-04-14 14:05 UTC (permalink / raw)
  To: David Miller; +Cc: stable

On Fri, Apr 13, 2018 at 01:38:41PM -0400, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Fri, 13 Apr 2018 13:23:45 -0400 (EDT)
> 
> > 
> > Please queue up the attached sparc bug fix for 4.16 -stable.
> 
> Sorry, this is the correct mbox file.

now queued up, thanks.

greg k-h

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

* Re: [PATCH] Sparc
  2020-02-06  4:54 ` Sasha Levin
@ 2020-02-06  6:49   ` Greg KH
  0 siblings, 0 replies; 21+ messages in thread
From: Greg KH @ 2020-02-06  6:49 UTC (permalink / raw)
  To: Sasha Levin; +Cc: David Miller, stable

On Wed, Feb 05, 2020 at 11:54:26PM -0500, Sasha Levin wrote:
> On Wed, Feb 05, 2020 at 03:11:10PM +0100, David Miller wrote:
> > 
> > Please queue up the attached sparc bug fix for -stable, thanks!
> 
> I've queued it up for all branches, thanks!

You forgot 5.5.y :)

I've added it there now too, thanks.

greg k-h

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

* Re: [PATCH] Sparc
  2020-02-05 14:11 David Miller
@ 2020-02-06  4:54 ` Sasha Levin
  2020-02-06  6:49   ` Greg KH
  0 siblings, 1 reply; 21+ messages in thread
From: Sasha Levin @ 2020-02-06  4:54 UTC (permalink / raw)
  To: David Miller; +Cc: stable

On Wed, Feb 05, 2020 at 03:11:10PM +0100, David Miller wrote:
>
>Please queue up the attached sparc bug fix for -stable, thanks!

I've queued it up for all branches, thanks!

-- 
Thanks,
Sasha

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

* [PATCH] Sparc
@ 2020-02-05 14:11 David Miller
  2020-02-06  4:54 ` Sasha Levin
  0 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2020-02-05 14:11 UTC (permalink / raw)
  To: stable

[-- Attachment #1: Type: Text/Plain, Size: 65 bytes --]


Please queue up the attached sparc bug fix for -stable, thanks!

[-- Attachment #2: 0001-sparc32-fix-struct-ipc64_perm-type-definition.patch --]
[-- Type: Text/X-Patch, Size: 2233 bytes --]

From 34ca70ef7d3a9fa7e89151597db5e37ae1d429b4 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 14 Jan 2020 14:26:14 +0100
Subject: [PATCH] sparc32: fix struct ipc64_perm type definition

[ Upstream commit 34ca70ef7d3a9fa7e89151597db5e37ae1d429b4 ]

As discussed in the strace issue tracker, it appears that the sparc32
sysvipc support has been broken for the past 11 years. It was however
working in compat mode, which is how it must have escaped most of the
regular testing.

The problem is that a cleanup patch inadvertently changed the uid/gid
fields in struct ipc64_perm from 32-bit types to 16-bit types in uapi
headers.

Both glibc and uclibc-ng still use the original types, so they should
work fine with compat mode, but not natively.  Change the definitions
to use __kernel_uid32_t and __kernel_gid32_t again.

Fixes: 83c86984bff2 ("sparc: unify ipcbuf.h")
Link: https://github.com/strace/strace/issues/116
Cc: <stable@vger.kernel.org> # v2.6.29
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: "Dmitry V . Levin" <ldv@altlinux.org>
Cc: Rich Felker <dalias@libc.org>
Cc: libc-alpha@sourceware.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/include/uapi/asm/ipcbuf.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/sparc/include/uapi/asm/ipcbuf.h b/arch/sparc/include/uapi/asm/ipcbuf.h
index 9d0d125500e2..084b8949ddff 100644
--- a/arch/sparc/include/uapi/asm/ipcbuf.h
+++ b/arch/sparc/include/uapi/asm/ipcbuf.h
@@ -15,19 +15,19 @@
 
 struct ipc64_perm
 {
-	__kernel_key_t	key;
-	__kernel_uid_t	uid;
-	__kernel_gid_t	gid;
-	__kernel_uid_t	cuid;
-	__kernel_gid_t	cgid;
+	__kernel_key_t		key;
+	__kernel_uid32_t	uid;
+	__kernel_gid32_t	gid;
+	__kernel_uid32_t	cuid;
+	__kernel_gid32_t	cgid;
 #ifndef __arch64__
-	unsigned short	__pad0;
+	unsigned short		__pad0;
 #endif
-	__kernel_mode_t	mode;
-	unsigned short	__pad1;
-	unsigned short	seq;
-	unsigned long long __unused1;
-	unsigned long long __unused2;
+	__kernel_mode_t		mode;
+	unsigned short		__pad1;
+	unsigned short		seq;
+	unsigned long long	__unused1;
+	unsigned long long	__unused2;
 };
 
 #endif /* __SPARC_IPCBUF_H */
-- 
2.21.1


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

* Re: [PATCH] Sparc
  2019-06-03 20:38 David Miller
@ 2019-06-04  7:48 ` Greg KH
  0 siblings, 0 replies; 21+ messages in thread
From: Greg KH @ 2019-06-04  7:48 UTC (permalink / raw)
  To: David Miller; +Cc: stable

On Mon, Jun 03, 2019 at 01:38:26PM -0700, David Miller wrote:
> 
> Please queue up the attached sparc64 bug fix to all active -stable
> branches.

Now queued up, thanks.

greg k-h

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

* [PATCH] Sparc
@ 2019-06-03 20:38 David Miller
  2019-06-04  7:48 ` Greg KH
  0 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2019-06-03 20:38 UTC (permalink / raw)
  To: stable

[-- Attachment #1: Type: Text/Plain, Size: 90 bytes --]


Please queue up the attached sparc64 bug fix to all active -stable
branches.

Thank you.

[-- Attachment #2: 0001-sparc64-Fix-regression-in-non-hypervisor-TLB-flush-x.patch --]
[-- Type: Text/X-Patch, Size: 1752 bytes --]

From d3c976c14ad8af421134c428b0a89ff8dd3bd8f8 Mon Sep 17 00:00:00 2001
From: James Clarke <jrtc27@jrtc27.com>
Date: Wed, 29 May 2019 22:31:31 +0100
Subject: [PATCH] sparc64: Fix regression in non-hypervisor TLB flush xcall

[ Upstream commit d3c976c14ad8af421134c428b0a89ff8dd3bd8f8 ]

Previously, %g2 would end up with the value PAGE_SIZE, but after the
commit mentioned below it ends up with the value 1 due to being reused
for a different purpose. We need it to be PAGE_SIZE as we use it to step
through pages in our demap loop, otherwise we set different flags in the
low 12 bits of the address written to, thereby doing things other than a
nucleus page flush.

Fixes: a74ad5e660a9 ("sparc64: Handle extremely large kernel TLB range flushes more gracefully.")
Reported-by: Meelis Roos <mroos@linux.ee>
Tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: James Clarke <jrtc27@jrtc27.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/mm/ultra.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S
index d245f89d1395..d220b6848746 100644
--- a/arch/sparc/mm/ultra.S
+++ b/arch/sparc/mm/ultra.S
@@ -587,7 +587,7 @@ xcall_flush_tlb_kernel_range:	/* 44 insns */
 	sub		%g7, %g1, %g3
 	srlx		%g3, 18, %g2
 	brnz,pn		%g2, 2f
-	 add		%g2, 1, %g2
+	 sethi		%hi(PAGE_SIZE), %g2
 	sub		%g3, %g2, %g3
 	or		%g1, 0x20, %g1		! Nucleus
 1:	stxa		%g0, [%g1 + %g3] ASI_DMMU_DEMAP
@@ -751,7 +751,7 @@ __cheetah_xcall_flush_tlb_kernel_range:	/* 44 insns */
 	sub		%g7, %g1, %g3
 	srlx		%g3, 18, %g2
 	brnz,pn		%g2, 2f
-	 add		%g2, 1, %g2
+	 sethi		%hi(PAGE_SIZE), %g2
 	sub		%g3, %g2, %g3
 	or		%g1, 0x20, %g1		! Nucleus
 1:	stxa		%g0, [%g1 + %g3] ASI_DMMU_DEMAP
-- 
2.20.1


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

* Re: [PATCH] Sparc
  2018-05-22 17:51 David Miller
@ 2018-05-22 18:13 ` Greg KH
  0 siblings, 0 replies; 21+ messages in thread
From: Greg KH @ 2018-05-22 18:13 UTC (permalink / raw)
  To: David Miller; +Cc: stable

On Tue, May 22, 2018 at 01:51:37PM -0400, David Miller wrote:
> 
> Please queue up this Sparc bug fix for v4.14 and v4.16 -stable.

Now queued up, thanks.

greg k-h

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

* [PATCH] Sparc
@ 2018-05-22 17:51 David Miller
  2018-05-22 18:13 ` Greg KH
  0 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2018-05-22 17:51 UTC (permalink / raw)
  To: stable

[-- Attachment #1: Type: Text/Plain, Size: 77 bytes --]


Please queue up this Sparc bug fix for v4.14 and v4.16 -stable.

Thank you.

[-- Attachment #2: 0001-sparc-vio-use-put_device-instead-of-kfree.patch --]
[-- Type: Text/X-Patch, Size: 1091 bytes --]

>From 00ad691ab140b54ab9f5de5e74cb994f552e8124 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Date: Wed, 25 Apr 2018 20:26:14 +0530
Subject: [PATCH] sparc: vio: use put_device() instead of kfree()

[ Upstream commit 00ad691ab140b54ab9f5de5e74cb994f552e8124 ]

Never directly free @dev after calling device_register(), even
if it returned an error. Always use put_device() to give up the
reference initialized.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/kernel/vio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
index 1a0fa10cb6b7..32bae68e34c1 100644
--- a/arch/sparc/kernel/vio.c
+++ b/arch/sparc/kernel/vio.c
@@ -403,7 +403,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
 	if (err) {
 		printk(KERN_ERR "VIO: Could not register device %s, err=%d\n",
 		       dev_name(&vdev->dev), err);
-		kfree(vdev);
+		put_device(&vdev->dev);
 		return NULL;
 	}
 	if (vdev->dp)
-- 
2.14.3


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

* Re: [PATCH] Sparc
  2018-01-01  3:36 David Miller
@ 2018-01-01 10:06 ` Greg KH
  0 siblings, 0 replies; 21+ messages in thread
From: Greg KH @ 2018-01-01 10:06 UTC (permalink / raw)
  To: David Miller; +Cc: stable

On Sun, Dec 31, 2017 at 10:36:26PM -0500, David Miller wrote:
> 
> Please queue up the following sparc64 bug fix for 4.14.x -stable.

Now applied, thanks.

greg k-h

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

* [PATCH] Sparc
@ 2018-01-01  3:36 David Miller
  2018-01-01 10:06 ` Greg KH
  0 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2018-01-01  3:36 UTC (permalink / raw)
  To: stable

[-- Attachment #1: Type: Text/Plain, Size: 79 bytes --]


Please queue up the following sparc64 bug fix for 4.14.x -stable.

Thank you.

[-- Attachment #2: 0001-sparc64-repair-calling-incorrect-hweight-function-fr.patch --]
[-- Type: Text/X-Patch, Size: 1146 bytes --]

>From 59585b4be9ae4dc6506551709bdcd6f5210b8a01 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Mon, 25 Dec 2017 03:43:53 +0100
Subject: [PATCH] sparc64: repair calling incorrect hweight function from stubs

[ Upstream commit 59585b4be9ae4dc6506551709bdcd6f5210b8a01 ]

Commit v4.12-rc4-1-g9289ea7f952b introduced a mistake that made the
64-bit hweight stub call the 16-bit hweight function.

Fixes: 9289ea7f952b ("sparc64: Use indirect calls in hamming weight stubs")
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/lib/hweight.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/lib/hweight.S b/arch/sparc/lib/hweight.S
index e5547b2..0ddbbb0 100644
--- a/arch/sparc/lib/hweight.S
+++ b/arch/sparc/lib/hweight.S
@@ -44,8 +44,8 @@ EXPORT_SYMBOL(__arch_hweight32)
 	.previous
 
 ENTRY(__arch_hweight64)
-	sethi	%hi(__sw_hweight16), %g1
-	jmpl	%g1 + %lo(__sw_hweight16), %g0
+	sethi	%hi(__sw_hweight64), %g1
+	jmpl	%g1 + %lo(__sw_hweight64), %g0
 	 nop
 ENDPROC(__arch_hweight64)
 EXPORT_SYMBOL(__arch_hweight64)
-- 
2.9.5


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

* Re: [PATCH] Sparc
  2017-11-20 11:53 David Miller
@ 2017-11-20 20:08 ` Greg KH
  0 siblings, 0 replies; 21+ messages in thread
From: Greg KH @ 2017-11-20 20:08 UTC (permalink / raw)
  To: David Miller; +Cc: stable

On Mon, Nov 20, 2017 at 08:53:31PM +0900, David Miller wrote:
> 
> Please queue up the following bug fix for 4.14.x -stable.

Now queued up, thanks.

greg k-h

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

* [PATCH] Sparc
@ 2017-11-20 11:53 David Miller
  2017-11-20 20:08 ` Greg KH
  0 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2017-11-20 11:53 UTC (permalink / raw)
  To: stable

[-- Attachment #1: Type: Text/Plain, Size: 71 bytes --]


Please queue up the following bug fix for 4.14.x -stable.

Thank you.

[-- Attachment #2: 0001-sparc64-Fix-page-table-walk-for-PUD-hugepages.patch --]
[-- Type: Text/X-Patch, Size: 1361 bytes --]

>From fac33aa62841b69cd0e19a29b0e2ac96e4e8cf32 Mon Sep 17 00:00:00 2001
From: Nitin Gupta <nitin.m.gupta@oracle.com>
Date: Fri, 3 Nov 2017 12:26:06 -0700
Subject: [PATCH] sparc64: Fix page table walk for PUD hugepages

[ Upstream commit 70f3c8b7c2e7ebcdde8354da004872e7c9184e97 ]

For a PUD hugepage entry, we need to propagate bits [32:22]
from virtual address to resolve at 4M granularity. However,
the current code was incorrectly propagating bits [29:19].
This bug can cause incorrect data to be returned for pages
backed with 16G hugepages.

Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/include/asm/tsb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/include/asm/tsb.h b/arch/sparc/include/asm/tsb.h
index 25b6abdb3908..522a677e050d 100644
--- a/arch/sparc/include/asm/tsb.h
+++ b/arch/sparc/include/asm/tsb.h
@@ -217,7 +217,7 @@ extern struct tsb_phys_patch_entry __tsb_phys_patch, __tsb_phys_patch_end;
 	sllx		REG2, 32, REG2;			\
 	andcc		REG1, REG2, %g0;		\
 	be,pt		%xcc, 700f;			\
-	 sethi		%hi(0x1ffc0000), REG2;		\
+	 sethi		%hi(0xffe00000), REG2;		\
 	sllx		REG2, 1, REG2;			\
 	brgez,pn	REG1, FAIL_LABEL;		\
 	 andn		REG1, REG2, REG1;		\
-- 
2.13.6


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

* Re: [PATCH] Sparc
  2017-08-24  3:25 David Miller
@ 2017-08-25  0:41 ` Greg KH
  0 siblings, 0 replies; 21+ messages in thread
From: Greg KH @ 2017-08-25  0:41 UTC (permalink / raw)
  To: David Miller; +Cc: stable

On Wed, Aug 23, 2017 at 08:25:43PM -0700, David Miller wrote:
> 
> Please queue up the attached sparc fix for v4.9 and v4.12,
> thank you!


Now applied, thanks.

greg k-h

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

* [PATCH] Sparc
@ 2017-08-24  3:25 David Miller
  2017-08-25  0:41 ` Greg KH
  0 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2017-08-24  3:25 UTC (permalink / raw)
  To: stable

[-- Attachment #1: Type: Text/Plain, Size: 71 bytes --]


Please queue up the attached sparc fix for v4.9 and v4.12,
thank you!

[-- Attachment #2: 0001-sparc64-remove-unnecessary-log-message.patch --]
[-- Type: Text/X-Patch, Size: 1303 bytes --]

>From 6170a506899aee3dd4934c928426505e47b1b466 Mon Sep 17 00:00:00 2001
From: Tushar Dave <tushar.n.dave@oracle.com>
Date: Wed, 16 Aug 2017 11:09:10 -0700
Subject: [PATCH] sparc64: remove unnecessary log message

[ Upstream commit 6170a506899aee3dd4934c928426505e47b1b466 ]

There is no need to log message if ATU hvapi couldn't get register.
Unlike PCI hvapi, ATU hvapi registration failure is not hard error.
Even if ATU hvapi registration fails (on system with ATU or without
ATU) system continues with legacy IOMMU. So only log message when
ATU hvapi successfully get registered.

Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/kernel/pci_sun4v.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
index f10e2f712394..9ebebf1fd93d 100644
--- a/arch/sparc/kernel/pci_sun4v.c
+++ b/arch/sparc/kernel/pci_sun4v.c
@@ -1266,8 +1266,6 @@ static int pci_sun4v_probe(struct platform_device *op)
 			 * ATU group, but ATU hcalls won't be available.
 			 */
 			hv_atu = false;
-			pr_err(PFX "Could not register hvapi ATU err=%d\n",
-			       err);
 		} else {
 			pr_info(PFX "Registered hvapi ATU major[%lu] minor[%lu]\n",
 				vatu_major, vatu_minor);
-- 
2.13.5


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

* Re: [PATCH] Sparc
  2017-05-11  2:42 David Miller
@ 2017-05-11  8:36 ` Greg KH
  0 siblings, 0 replies; 21+ messages in thread
From: Greg KH @ 2017-05-11  8:36 UTC (permalink / raw)
  To: David Miller; +Cc: stable

On Wed, May 10, 2017 at 10:42:08PM -0400, David Miller wrote:
> 
> Please add the following Sparc bug fix to v4.10 and v4.11 -stable.
> 
> Thank you.

Now queued up, thanks.

greg k-h

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

* [PATCH] Sparc
@ 2017-05-11  2:42 David Miller
  2017-05-11  8:36 ` Greg KH
  0 siblings, 1 reply; 21+ messages in thread
From: David Miller @ 2017-05-11  2:42 UTC (permalink / raw)
  To: stable

[-- Attachment #1: Type: Text/Plain, Size: 80 bytes --]


Please add the following Sparc bug fix to v4.10 and v4.11 -stable.

Thank you.

[-- Attachment #2: 0023-sparc64-fix-fault-handling-in-NGbzero.S-and-GENbzero.patch --]
[-- Type: Text/X-Patch, Size: 2091 bytes --]

>From 3c7f62212018b904ae17f5636ead18a4dca3a88f Mon Sep 17 00:00:00 2001
From: Dave Aldridge <david.j.aldridge@oracle.com>
Date: Tue, 9 May 2017 02:57:35 -0600
Subject: [PATCH] sparc64: fix fault handling in NGbzero.S and GENbzero.S

[ Upstream commit 3c7f62212018b904ae17f5636ead18a4dca3a88f ]

When any of the functions contained in NGbzero.S and GENbzero.S
vector through *bzero_from_clear_user, we may end up taking a
fault when executing one of the store alternate address space
instructions. If this happens, the exception handler does not
restore the %asi register.

This commit fixes the issue by introducing a new exception
handler that ensures the %asi register is restored when
a fault is handled.

Orabug: 25577560

Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: Babu Moger <babu.moger@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/kernel/head_64.S | 6 ++++++
 arch/sparc/lib/GENbzero.S   | 2 +-
 arch/sparc/lib/NGbzero.S    | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
index 4410119..41a4073 100644
--- a/arch/sparc/kernel/head_64.S
+++ b/arch/sparc/kernel/head_64.S
@@ -939,3 +939,9 @@ ENTRY(__retl_o1)
 	retl
 	 mov	%o1, %o0
 ENDPROC(__retl_o1)
+
+ENTRY(__retl_o1_asi)
+	wr      %o5, 0x0, %asi
+	retl
+	 mov    %o1, %o0
+ENDPROC(__retl_o1_asi)
diff --git a/arch/sparc/lib/GENbzero.S b/arch/sparc/lib/GENbzero.S
index 8e7a843..2fbf629 100644
--- a/arch/sparc/lib/GENbzero.S
+++ b/arch/sparc/lib/GENbzero.S
@@ -8,7 +8,7 @@
 98:	x,y;			\
 	.section __ex_table,"a";\
 	.align 4;		\
-	.word 98b, __retl_o1;	\
+	.word 98b, __retl_o1_asi;\
 	.text;			\
 	.align 4;
 
diff --git a/arch/sparc/lib/NGbzero.S b/arch/sparc/lib/NGbzero.S
index beab29b..33053bd 100644
--- a/arch/sparc/lib/NGbzero.S
+++ b/arch/sparc/lib/NGbzero.S
@@ -8,7 +8,7 @@
 98:	x,y;			\
 	.section __ex_table,"a";\
 	.align 4;		\
-	.word 98b, __retl_o1;	\
+	.word 98b, __retl_o1_asi;\
 	.text;			\
 	.align 4;
 
-- 
2.7.4


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

* Re: [PATCH] SPARC
  2015-07-03 22:32 [PATCH] SPARC David Miller
  2015-07-04  2:57 ` Greg KH
@ 2015-07-09 13:40 ` Luis Henriques
  1 sibling, 0 replies; 21+ messages in thread
From: Luis Henriques @ 2015-07-09 13:40 UTC (permalink / raw)
  To: David Miller; +Cc: stable

On Fri, Jul 03, 2015 at 03:32:14PM -0700, David Miller wrote:
> 
> Please queue up the following Sparc bug fix for 3.14, 3.18, and
> 4.0 -stable, respectively.
> 
> Thanks!

> From patchwork Tue Apr 21 14:30:41 2015
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in
>  softirq context
> From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> X-Patchwork-Id: 463148
> Message-Id: <1429626641-199974-1-git-send-email-sowmini.varadhan@oracle.com>
> To: sowmini.varadhan@oracle.com, sparclinux@vger.kernel.org
> Cc: david.stevens@oracle.com, davem@davemloft.net
> Date: Tue, 21 Apr 2015 10:30:41 -0400
> 
> [ Upstream commit 671d773297969bebb1732e1cdc1ec03aa53c6be2 ]

Actually, this is commit 0edfad5959df7379c9e554fbe8ba264ae232d321.

Cheers,
--
Lu�s

> 
> 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>
> ---
>  arch/sparc/kernel/ldc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
> index d2ae0f7..7d3ca30 100644
> --- a/arch/sparc/kernel/ldc.c
> +++ b/arch/sparc/kernel/ldc.c
> @@ -2290,7 +2290,7 @@ void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len,
>  	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] 21+ messages in thread

* Re: [PATCH] SPARC
  2015-07-03 22:32 [PATCH] SPARC David Miller
@ 2015-07-04  2:57 ` Greg KH
  2015-07-09 13:40 ` Luis Henriques
  1 sibling, 0 replies; 21+ messages in thread
From: Greg KH @ 2015-07-04  2:57 UTC (permalink / raw)
  To: David Miller; +Cc: stable

On Fri, Jul 03, 2015 at 03:32:14PM -0700, David Miller wrote:
> 
> Please queue up the following Sparc bug fix for 3.14, 3.18, and
> 4.0 -stable, respectively.
> 

Now applied to 3.10, 3.14, and 4.0-stable, thanks.

greg k-h

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

* [PATCH] SPARC
@ 2015-07-03 22:32 David Miller
  2015-07-04  2:57 ` Greg KH
  2015-07-09 13:40 ` Luis Henriques
  0 siblings, 2 replies; 21+ messages in thread
From: David Miller @ 2015-07-03 22:32 UTC (permalink / raw)
  To: stable

[-- Attachment #1: Type: Text/Plain, Size: 101 bytes --]


Please queue up the following Sparc bug fix for 3.14, 3.18, and
4.0 -stable, respectively.

Thanks!

[-- Attachment #2: sparc-Use-GFP_ATOMIC-in-ldc_alloc_exp_dring-as-it-can-be-called-in-softirq-context.patch --]
[-- Type: Text/X-Patch, Size: 1418 bytes --]

>From patchwork Tue Apr 21 14:30:41 2015
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in
 softirq context
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
X-Patchwork-Id: 463148
Message-Id: <1429626641-199974-1-git-send-email-sowmini.varadhan@oracle.com>
To: sowmini.varadhan@oracle.com, sparclinux@vger.kernel.org
Cc: david.stevens@oracle.com, davem@davemloft.net
Date: Tue, 21 Apr 2015 10:30:41 -0400

[ 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>
---
 arch/sparc/kernel/ldc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index d2ae0f7..7d3ca30 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -2290,7 +2290,7 @@ void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len,
 	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 related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-02-06  6:49 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-13 17:23 [PATCH] Sparc David Miller
2018-04-13 17:38 ` David Miller
2018-04-14 14:05   ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2020-02-05 14:11 David Miller
2020-02-06  4:54 ` Sasha Levin
2020-02-06  6:49   ` Greg KH
2019-06-03 20:38 David Miller
2019-06-04  7:48 ` Greg KH
2018-05-22 17:51 David Miller
2018-05-22 18:13 ` Greg KH
2018-01-01  3:36 David Miller
2018-01-01 10:06 ` Greg KH
2017-11-20 11:53 David Miller
2017-11-20 20:08 ` Greg KH
2017-08-24  3:25 David Miller
2017-08-25  0:41 ` Greg KH
2017-05-11  2:42 David Miller
2017-05-11  8:36 ` Greg KH
2015-07-03 22:32 [PATCH] SPARC David Miller
2015-07-04  2:57 ` Greg KH
2015-07-09 13:40 ` Luis Henriques

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.