diff options
Diffstat (limited to 'arch/sparc/lib')
-rw-r--r-- | arch/sparc/lib/Makefile | 1 | ||||
-rw-r--r-- | arch/sparc/lib/bzero.S | 5 | ||||
-rw-r--r-- | arch/sparc/lib/checksum_32.S | 2 | ||||
-rw-r--r-- | arch/sparc/lib/ksyms.c | 2 | ||||
-rw-r--r-- | arch/sparc/lib/mcount.S | 5 | ||||
-rw-r--r-- | arch/sparc/lib/memcpy.S | 3 | ||||
-rw-r--r-- | arch/sparc/lib/memset.S | 3 | ||||
-rw-r--r-- | arch/sparc/lib/usercopy.c | 8 |
8 files changed, 14 insertions, 15 deletions
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile index e75faf0e59ae..c4b5e03af115 100644 --- a/arch/sparc/lib/Makefile +++ b/arch/sparc/lib/Makefile | |||
@@ -44,3 +44,4 @@ obj-y += iomap.o | |||
44 | obj-$(CONFIG_SPARC32) += atomic32.o | 44 | obj-$(CONFIG_SPARC32) += atomic32.o |
45 | obj-y += ksyms.o | 45 | obj-y += ksyms.o |
46 | obj-$(CONFIG_SPARC64) += PeeCeeI.o | 46 | obj-$(CONFIG_SPARC64) += PeeCeeI.o |
47 | obj-y += usercopy.o | ||
diff --git a/arch/sparc/lib/bzero.S b/arch/sparc/lib/bzero.S index b6557297440f..615f401edf69 100644 --- a/arch/sparc/lib/bzero.S +++ b/arch/sparc/lib/bzero.S | |||
@@ -6,10 +6,6 @@ | |||
6 | 6 | ||
7 | .text | 7 | .text |
8 | 8 | ||
9 | .globl __memset | ||
10 | .type __memset, #function | ||
11 | __memset: /* %o0=buf, %o1=pat, %o2=len */ | ||
12 | |||
13 | .globl memset | 9 | .globl memset |
14 | .type memset, #function | 10 | .type memset, #function |
15 | memset: /* %o0=buf, %o1=pat, %o2=len */ | 11 | memset: /* %o0=buf, %o1=pat, %o2=len */ |
@@ -83,7 +79,6 @@ __bzero_done: | |||
83 | retl | 79 | retl |
84 | mov %o3, %o0 | 80 | mov %o3, %o0 |
85 | .size __bzero, .-__bzero | 81 | .size __bzero, .-__bzero |
86 | .size __memset, .-__memset | ||
87 | .size memset, .-memset | 82 | .size memset, .-memset |
88 | 83 | ||
89 | #define EX_ST(x,y) \ | 84 | #define EX_ST(x,y) \ |
diff --git a/arch/sparc/lib/checksum_32.S b/arch/sparc/lib/checksum_32.S index 77f228533d47..3632cb34e914 100644 --- a/arch/sparc/lib/checksum_32.S +++ b/arch/sparc/lib/checksum_32.S | |||
@@ -560,7 +560,7 @@ __csum_partial_copy_end: | |||
560 | mov %i0, %o1 | 560 | mov %i0, %o1 |
561 | mov %i1, %o0 | 561 | mov %i1, %o0 |
562 | 5: | 562 | 5: |
563 | call __memcpy | 563 | call memcpy |
564 | mov %i2, %o2 | 564 | mov %i2, %o2 |
565 | tst %o0 | 565 | tst %o0 |
566 | bne,a 2f | 566 | bne,a 2f |
diff --git a/arch/sparc/lib/ksyms.c b/arch/sparc/lib/ksyms.c index 704b12668388..1b30bb3bfdb1 100644 --- a/arch/sparc/lib/ksyms.c +++ b/arch/sparc/lib/ksyms.c | |||
@@ -30,7 +30,6 @@ EXPORT_SYMBOL(__memscan_generic); | |||
30 | EXPORT_SYMBOL(memcmp); | 30 | EXPORT_SYMBOL(memcmp); |
31 | EXPORT_SYMBOL(memcpy); | 31 | EXPORT_SYMBOL(memcpy); |
32 | EXPORT_SYMBOL(memset); | 32 | EXPORT_SYMBOL(memset); |
33 | EXPORT_SYMBOL(__memset); | ||
34 | EXPORT_SYMBOL(memmove); | 33 | EXPORT_SYMBOL(memmove); |
35 | EXPORT_SYMBOL(__bzero); | 34 | EXPORT_SYMBOL(__bzero); |
36 | 35 | ||
@@ -81,7 +80,6 @@ EXPORT_SYMBOL(__csum_partial_copy_sparc_generic); | |||
81 | 80 | ||
82 | /* Special internal versions of library functions. */ | 81 | /* Special internal versions of library functions. */ |
83 | EXPORT_SYMBOL(__copy_1page); | 82 | EXPORT_SYMBOL(__copy_1page); |
84 | EXPORT_SYMBOL(__memcpy); | ||
85 | EXPORT_SYMBOL(__memmove); | 83 | EXPORT_SYMBOL(__memmove); |
86 | EXPORT_SYMBOL(bzero_1page); | 84 | EXPORT_SYMBOL(bzero_1page); |
87 | 85 | ||
diff --git a/arch/sparc/lib/mcount.S b/arch/sparc/lib/mcount.S index 7ce9c65f3592..24b8b12deed2 100644 --- a/arch/sparc/lib/mcount.S +++ b/arch/sparc/lib/mcount.S | |||
@@ -64,8 +64,9 @@ mcount: | |||
64 | 2: sethi %hi(softirq_stack), %g3 | 64 | 2: sethi %hi(softirq_stack), %g3 |
65 | or %g3, %lo(softirq_stack), %g3 | 65 | or %g3, %lo(softirq_stack), %g3 |
66 | ldx [%g3 + %g1], %g7 | 66 | ldx [%g3 + %g1], %g7 |
67 | sub %g7, STACK_BIAS, %g7 | ||
67 | cmp %sp, %g7 | 68 | cmp %sp, %g7 |
68 | bleu,pt %xcc, 2f | 69 | bleu,pt %xcc, 3f |
69 | sethi %hi(THREAD_SIZE), %g3 | 70 | sethi %hi(THREAD_SIZE), %g3 |
70 | add %g7, %g3, %g7 | 71 | add %g7, %g3, %g7 |
71 | cmp %sp, %g7 | 72 | cmp %sp, %g7 |
@@ -75,7 +76,7 @@ mcount: | |||
75 | * again, we are already trying to output the stack overflow | 76 | * again, we are already trying to output the stack overflow |
76 | * message. | 77 | * message. |
77 | */ | 78 | */ |
78 | sethi %hi(ovstack), %g7 ! cant move to panic stack fast enough | 79 | 3: sethi %hi(ovstack), %g7 ! cant move to panic stack fast enough |
79 | or %g7, %lo(ovstack), %g7 | 80 | or %g7, %lo(ovstack), %g7 |
80 | add %g7, OVSTACKSIZE, %g3 | 81 | add %g7, OVSTACKSIZE, %g3 |
81 | sub %g3, STACK_BIAS + 192, %g3 | 82 | sub %g3, STACK_BIAS + 192, %g3 |
diff --git a/arch/sparc/lib/memcpy.S b/arch/sparc/lib/memcpy.S index ce10bc869af9..34fe65751737 100644 --- a/arch/sparc/lib/memcpy.S +++ b/arch/sparc/lib/memcpy.S | |||
@@ -543,9 +543,6 @@ FUNC(memmove) | |||
543 | b 3f | 543 | b 3f |
544 | add %o0, 2, %o0 | 544 | add %o0, 2, %o0 |
545 | 545 | ||
546 | #ifdef __KERNEL__ | ||
547 | FUNC(__memcpy) | ||
548 | #endif | ||
549 | FUNC(memcpy) /* %o0=dst %o1=src %o2=len */ | 546 | FUNC(memcpy) /* %o0=dst %o1=src %o2=len */ |
550 | 547 | ||
551 | sub %o0, %o1, %o4 | 548 | sub %o0, %o1, %o4 |
diff --git a/arch/sparc/lib/memset.S b/arch/sparc/lib/memset.S index 1c37ea892deb..99c017be8719 100644 --- a/arch/sparc/lib/memset.S +++ b/arch/sparc/lib/memset.S | |||
@@ -60,11 +60,10 @@ | |||
60 | .globl __bzero_begin | 60 | .globl __bzero_begin |
61 | __bzero_begin: | 61 | __bzero_begin: |
62 | 62 | ||
63 | .globl __bzero, __memset, | 63 | .globl __bzero |
64 | .globl memset | 64 | .globl memset |
65 | .globl __memset_start, __memset_end | 65 | .globl __memset_start, __memset_end |
66 | __memset_start: | 66 | __memset_start: |
67 | __memset: | ||
68 | memset: | 67 | memset: |
69 | and %o1, 0xff, %g3 | 68 | and %o1, 0xff, %g3 |
70 | sll %g3, 8, %g2 | 69 | sll %g3, 8, %g2 |
diff --git a/arch/sparc/lib/usercopy.c b/arch/sparc/lib/usercopy.c new file mode 100644 index 000000000000..14b363fec8a2 --- /dev/null +++ b/arch/sparc/lib/usercopy.c | |||
@@ -0,0 +1,8 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include <linux/bug.h> | ||
3 | |||
4 | void copy_from_user_overflow(void) | ||
5 | { | ||
6 | WARN(1, "Buffer overflow detected!\n"); | ||
7 | } | ||
8 | EXPORT_SYMBOL(copy_from_user_overflow); | ||