Magnus Lindholm | 25 May 19:35
Picon

some testing sparc.git

Hi,

I've pulled todays git from
git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc.git master

I'v build an smp kernel with some spin-lock and driver-dma debugging
stuff enabled. I've booted the kernel on my sparcstation-10 with dual
supersparc-II (sm71) cpu
The kernel boots and I can ssh into the system and it seems to run
fine with "normal" use. I do see frequent debug messages about "BUG:
scheduling while atomic: swapper/2/0/0x00000000".
Under more heavy load, like building a kernel with "make -j4" the
system will lock up after about 10 minutes, no error messages.

root:~# uname -a
Linux ss10 3.4.0-07645-g456d3d4-dirty #5 SMP Fri May 25 18:51:24 CEST
2012 sparc sun4m Texas Instruments, Inc. - SuperSparc-(II) GNU/Linux

regards

Magnus Lindholm
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Miller | 25 May 09:37
Favicon

[PATCH] sparc64: Fix several bugs in quad floating point emulation.


UltraSPARC-T2 and later do not use the fp_exception_other trap and do
not set the floating point trap type field in the %fsr at all when you
try to execute an unimplemented FPU operation.

Instead, it uses the illegal_instruction trap and it leaves the
floating point trap type field clear.

So we should not validate the %fsr trap type field when do_mathemu()
is invoked from the illegal instruction handler.

Also, the floating point trap type field is 3 bits, not 4 bits.

Signed-off-by: David S. Miller <davem <at> davemloft.net>
---
 arch/sparc/kernel/traps_64.c  |   12 +++++++-----
 arch/sparc/math-emu/math_64.c |   20 ++++++++++++++------
 2 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index c72fdf5..3b05e66 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -2054,7 +2054,7 @@ void do_fpieee(struct pt_regs *regs)
 	do_fpe_common(regs);
 }

-extern int do_mathemu(struct pt_regs *, struct fpustate *);
+extern int do_mathemu(struct pt_regs *, struct fpustate *, bool);

(Continue reading)

David Miller | 24 May 23:32
Favicon

[GIT] Sparc


This has the generic strncpy_from_user() implementation architectures
can now use, which we've been developing on linux-arch over the past
few days.

For good measure I ran both a 32-bit and a 64-bit glibc testsuite
run, and the latter of which pointed out an adjustment I needed to
make to sparc's user_addr_max() definition.  Linus, you were right,
STACK_TOP was not the right thing to use, even on sparc itself :-)

From Sam Ravnborg, we have a conversion of sparc32 over to the common
alloc_thread_info_node(), since the aspect which originally blocked
our doing so (sun4c) has been removed.

Please pull, thanks a lot.

The following changes since commit 72c04af9a2d57b7945cf3de8e71461bd80695d50:

  fbdev: sh_mobile_lcdc: Don't confuse line size with pitch (2012-05-21 20:59:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc.git master

for you to fetch changes up to c5389831cda3b38a56606a348a537a1332f2d729:

  sparc: Fix user_addr_max() definition. (2012-05-24 13:41:58 -0700)

----------------------------------------------------------------
David S. Miller (6):
(Continue reading)

From Hang Seng Bank | 24 May 22:47

Date: 24/05/2012.

Dear friend                                 24/05/2012.
I am Dr Raymond Chien Independent Non-executive Director of Hang Seng
Bank Hong Kong I have a business transaction of $44.5 million USD
to share with you,If interested contact me for more details via my
personal email:  draymndch8 <at> yahoo.co.jp
Full names:Address:Age:Occupation:Phone/Fax
Regards: Date: 24/05/2012.
Dr Raymond Chien Kuo Fung 
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Miller | 24 May 22:57
Favicon

[PATCH] sparc: Fix user_addr_max() definition.


We need to use TASK_SIZE because for 64-bit tasks the value
of STACK_TOP actually sits in the middle of the address space
so we'll get false-negatives.

Adjust the TASK_SIZE definition on sparc64 to accomodate this,
in the context in which user_addr_max() is used we have the
test_thread_flag() definition available but not the one for
test_tsk_thread_flag().

Signed-off-by: David S. Miller <davem <at> davemloft.net>
---

Some glibc testsuite failures for 64-bit showed me that
STACK_TOP isn't the right thing to use here because of
how we place the 64-bit process stack in the middle
of the address space.

Committed to master.

 arch/sparc/include/asm/processor_64.h |    4 +++-
 arch/sparc/include/asm/uaccess.h      |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/include/asm/processor_64.h b/arch/sparc/include/asm/processor_64.h
index e713db2..6ca7709 100644
--- a/arch/sparc/include/asm/processor_64.h
+++ b/arch/sparc/include/asm/processor_64.h
@@ -42,7 +42,9 @@
 #define TASK_SIZE_OF(tsk) \
(Continue reading)

David Miller | 24 May 22:26
Favicon

[PATCH 3/3 v2] lib: Sparc's strncpy_from_user is generic enough, move under lib/


To use this, an architecture simply needs to:

1) Provide a user_addr_max() implementation via asm/uaccess.h

2) Add "select GENERIC_STRNCPY_FROM_USER" to their arch Kcnfig

3) Remove the existing strncpy_from_user() implementation and symbol
   exports their architecture had.

Signed-off-by: David S. Miller <davem <at> davemloft.net>
Acked-by: David Howells <dhowells <at> redhat.com>
---
 arch/sparc/Kconfig        |    1 +
 arch/sparc/lib/usercopy.c |  144 --------------------------------------------
 lib/Kconfig               |    3 +
 lib/Makefile              |    2 +
 lib/strncpy_from_user.c   |  146 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 152 insertions(+), 144 deletions(-)
 create mode 100644 lib/strncpy_from_user.c

diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 051af37..2247423 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -32,6 +32,7 @@ config SPARC
 	select HAVE_NMI_WATCHDOG if SPARC64
 	select HAVE_BPF_JIT
 	select GENERIC_SMP_IDLE_THREAD
+	select GENERIC_STRNCPY_FROM_USER
(Continue reading)

David Miller | 24 May 22:26
Favicon

[PATCH 1/3 v2] sparc: Increase portability of strncpy_from_user() implementation.


Hide details of maximum user address calculation in a new
asm/uaccess.h interface named user_addr_max().

Provide little-endian implementation in find_zero(), which should work
but can probably be improved.

Abstrace alignment check behind IS_UNALIGNED() macro.

Kill double-semicolon, noticed by David Howells.

Signed-off-by: David S. Miller <davem <at> davemloft.net>
---
 arch/sparc/include/asm/uaccess.h |    3 +++
 arch/sparc/lib/usercopy.c        |   32 +++++++++++++++++++++++++++-----
 2 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/arch/sparc/include/asm/uaccess.h b/arch/sparc/include/asm/uaccess.h
index 42a28cf..20c2acb 100644
--- a/arch/sparc/include/asm/uaccess.h
+++ b/arch/sparc/include/asm/uaccess.h
@@ -6,6 +6,9 @@
 #include <asm/uaccess_32.h>
 #endif

+#define user_addr_max() \
+	(segment_eq(get_fs(), USER_DS) ? STACK_TOP : ~0UL)
+
 extern long strncpy_from_user(char *dest, const char __user *src, long count);

(Continue reading)

David Miller | 24 May 22:26
Favicon

[PATCH 0/3 v2] Make sparc's strncpy_from_user() generic.


Ok, this integrates all the feedback I received and I pushed it
out to my Sparc GIT tree.

I'll ask Linus to pull this stuff in shortly.

Thanks everyone.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Marcel van Nies | 24 May 21:27
Picon

sparc32: some testing

Hi,

I gave today's sparc.git a try on a SS20 with SuperSparc-II and
another one with HyperSparc CPUs.
Starting with an UP kernel, I got some bugs on the SuperSparc and a
segfault on the HyperSparc, see below for bootlogs.
I can test patches etc. If more info is required, please let me know.

Thanks,
M

=== HyperSparc ===

SPARCstation 20 MP (4 X RT625), No Keyboard
ROM Rev. 2.25R hyperSPARC, 448 MB memory installed, Serial #8491359.
Ethernet address 8:0:20:81:91:5f, Host ID: 7281915f.

Timeout waiting for ARP/RARP packet
349c00
PROMLIB: obio_ranges 5
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 3.4.0-02583-g4efcac3 (builder <at> jalapeno) (gcc version
4.5.3 (Gentoo 4.5.3-r1 p1.0, pie-0.4.5) ) #2 Thu May 24 18:44:32 CEST
2012
bootconsole [earlyprom0] enabled
ARCH: SUN4M
TYPE: Sun4m SparcStation10/20
Ethernet address: 08:00:20:81:91:5f
SRMMU: Using VAC size of 262144 bytes, line size 64 bytes.
255MB HIGHMEM available.
(Continue reading)

David Miller | 24 May 04:29
Favicon

[PATCH] sparc: Optimize strncpy_from_user() zero byte search.


Compute a mask that will only have 0x80 in the bytes which
had a zero in them.  The formula is:

	~(((x & 0x7f7f7f7f) + 0x7f7f7f7f) | x | 0x7f7f7f7f)

In the inner word iteration, we have to compute the "x | 0x7f7f7f7f"
part, so we can reuse that in the above calculation.

Once we have this mask, we perform divide and conquer to find the
highest 0x80 location.

Signed-off-by: David S. Miller <davem <at> davemloft.net>
---

On linux-arch we're talking about making this code I wrote
for sparc suitable for other platforms to use since it's
reasonably portable already.

As part of that Linus wanted me to make an effort to improve
the code GCC generates for the final zero byte discovery code
and this is what I came up with.

 arch/sparc/lib/usercopy.c |   50 +++++++++++++++++++--------------------------
 1 file changed, 21 insertions(+), 29 deletions(-)

diff --git a/arch/sparc/lib/usercopy.c b/arch/sparc/lib/usercopy.c
index 851cb75..87f9645 100644
--- a/arch/sparc/lib/usercopy.c
+++ b/arch/sparc/lib/usercopy.c
(Continue reading)

David Miller | 23 May 09:35
Favicon

[PATCH] sparc: Add full proper error handling to strncpy_from_user().


Linus removed the end-of-address-space hackery from
fs/namei.c:do_getname() so we really have to validate these edge
conditions and cannot cheat any more (as x86 used to as well).

Move to a common C implementation like x86 did.  And if both
src and dst are sufficiently aligned we'll do word at a time
copies and checks as well.

Signed-off-by: David S. Miller <davem <at> davemloft.net>
---

This addresses:

http://marc.info/?l=linux-arch&m=133761921425977&w=2

 arch/sparc/include/asm/uaccess.h      |    3 +
 arch/sparc/include/asm/uaccess_32.h   |   10 ---
 arch/sparc/include/asm/uaccess_64.h   |    4 -
 arch/sparc/lib/Makefile               |    2 +-
 arch/sparc/lib/ksyms.c                |    3 -
 arch/sparc/lib/strncpy_from_user_32.S |   47 ------------
 arch/sparc/lib/strncpy_from_user_64.S |  133 ---------------------------------
 arch/sparc/lib/usercopy.c             |  132 ++++++++++++++++++++++++++++++++
 8 files changed, 136 insertions(+), 198 deletions(-)
 delete mode 100644 arch/sparc/lib/strncpy_from_user_32.S
 delete mode 100644 arch/sparc/lib/strncpy_from_user_64.S

diff --git a/arch/sparc/include/asm/uaccess.h b/arch/sparc/include/asm/uaccess.h
index e88fbe5..42a28cf 100644
(Continue reading)


Gmane