[packages/mono] - updated to 3.12.1 (fixes SKIP TLS and FREAK vulnerabilities) - some fixes and minor updates in x32
qboosh
qboosh at pld-linux.org
Sat Mar 14 15:18:29 CET 2015
commit fee77e603fc22250af18655a20fe5390adcc0933
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Mar 14 15:19:47 2015 +0100
- updated to 3.12.1 (fixes SKIP TLS and FREAK vulnerabilities)
- some fixes and minor updates in x32 patch, but requires further changes
mono-x32.patch | 132 ++++++++++++++++++++++++++++++++++-----------------------
mono.spec | 4 +-
2 files changed, 82 insertions(+), 54 deletions(-)
---
diff --git a/mono.spec b/mono.spec
index c970db1..b23e7bc 100644
--- a/mono.spec
+++ b/mono.spec
@@ -12,12 +12,12 @@
Summary: Common Language Infrastructure implementation
Summary(pl.UTF-8): Implementacja Common Language Infrastructure
Name: mono
-Version: 3.12.0
+Version: 3.12.1
Release: 1
License: LGPL v2 (VM), MIT X11/GPL v2 (C# compilers), MIT X11 (classes, tools), GPL v2 (tools)
Group: Development/Languages
Source0: http://download.mono-project.com/sources/mono/%{name}-%{version}.tar.bz2
-# Source0-md5: 0fbca17e5bfce5124d4bc915faa697d7
+# Source0-md5: ccab015f0c54ffeccd2924b44885809c
Patch2: %{name}-sonames.patch
Patch4: %{name}-console-no-utf8-bom.patch
Patch5: %{name}-pc.patch
diff --git a/mono-x32.patch b/mono-x32.patch
index d8e44b2..f765398 100644
--- a/mono-x32.patch
+++ b/mono-x32.patch
@@ -10,45 +10,47 @@ diff -ur mono-3.12.0/libgc/include/private/gc_locks.h mono-3.12.0-x32/libgc/incl
: "+m"(*(addr)), "=r"(result)
: "r" (new_val), "a"(old) : "memory");
return (GC_bool) result;
-diff -ur mono-3.12.0/mono/metadata/decimal.c mono-3.12.0-x32-2/mono/metadata/decimal.c
---- mono-3.12.0/mono/metadata/decimal.c 2014-12-03 12:25:48.000000000 +0100
-+++ mono-3.12.0-x32-2/mono/metadata/decimal.c 2015-03-13 20:27:27.291292654 +0100
-@@ -566,7 +566,7 @@
- __asm__("bsrl %1,%0\n\t"
- : "=r" (r) : "rm" (mask));
- return r;
--#elif defined(__x86_64) && defined(__GNUC__)
-+#elif defined(__x86_64) && defined(__GNUC__) && !defined(__ILP32__)
- guint64 r;
+--- mono-3.12.1/mono/metadata/decimal.c.orig 2015-03-06 18:26:50.000000000 +0100
++++ mono-3.12.1/mono/metadata/decimal.c 2015-03-14 07:46:21.958919177 +0100
+@@ -555,12 +555,15 @@
+ #if defined(__native_client__) && (defined(__i386__) || defined(__x86_64))
+ #define USE_X86_32BIT_INSTRUCTIONS 1
+ #endif
++#if defined(__x86_64) && defined(__ILP32__)
++#define ARCH_x32
++#endif
+
+ static inline gint
+ my_g_bit_nth_msf (gsize mask)
+ {
+ /* Mask is expected to be != 0 */
+-#if (defined(__i386__) && defined(__GNUC__)) || defined(USE_X86_32BIT_INSTRUCTIONS)
++#if (defined(__i386__) && defined(__GNUC__)) || defined(USE_X86_32BIT_INSTRUCTIONS) || defined(ARCH_x32)
+ int r;
- __asm__("bsrq %1,%0\n\t"
-Only in mono-3.12.0-x32-2/mono/metadata: decimal.c~
-diff -ur mono-3.12.0/mono/metadata/sgen-cardtable.c mono-3.12.0-x32-2/mono/metadata/sgen-cardtable.c
---- mono-3.12.0/mono/metadata/sgen-cardtable.c 2015-01-12 18:15:08.000000000 +0100
-+++ mono-3.12.0-x32-2/mono/metadata/sgen-cardtable.c 2015-03-13 20:28:38.011295116 +0100
-@@ -506,7 +506,7 @@
+ __asm__("bsrl %1,%0\n\t"
+--- mono-3.12.1/mono/metadata/sgen-cardtable.c.orig 2015-03-06 18:26:50.000000000 +0100
++++ mono-3.12.1/mono/metadata/sgen-cardtable.c 2015-03-14 08:06:01.178869685 +0100
+@@ -504,7 +504,7 @@ static inline int
+ find_card_offset (mword card)
+ {
/*XXX Use assembly as this generates some pretty bad code */
- #if defined(__i386__) && defined(__GNUC__)
+-#if defined(__i386__) && defined(__GNUC__)
++#if (defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__))) && defined(__GNUC__)
return (__builtin_ffs (card) - 1) / 8;
--#elif defined(__x86_64__) && defined(__GNUC__)
-+#elif defined(__x86_64__) && defined(__GNUC__) && !defined(__ILP32__)
+ #elif defined(__x86_64__) && defined(__GNUC__)
return (__builtin_ffsll (card) - 1) / 8;
- #elif defined(__s390x__)
- return (__builtin_ffsll (GUINT64_TO_LE(card)) - 1) / 8;
-Only in mono-3.12.0-x32-2/mono/metadata: sgen-cardtable.c~
-diff -ur mono-3.12.0/mono/metadata/sgen-marksweep.c mono-3.12.0-x32-2/mono/metadata/sgen-marksweep.c
---- mono-3.12.0/mono/metadata/sgen-marksweep.c 2015-01-12 18:15:08.000000000 +0100
-+++ mono-3.12.0-x32-2/mono/metadata/sgen-marksweep.c 2015-03-13 20:26:38.467957621 +0100
-@@ -1750,7 +1750,7 @@
+--- mono-3.12.1/mono/metadata/sgen-marksweep.c.orig 2015-03-06 18:26:50.000000000 +0100
++++ mono-3.12.1/mono/metadata/sgen-marksweep.c 2015-03-14 08:14:18.488848812 +0100
+@@ -1748,7 +1748,7 @@ initial_skip_card (guint8 *card_data)
+ if (i == CARD_WORDS_PER_BLOCK)
+ return card_data + CARDS_PER_BLOCK;
- #if defined(__i386__) && defined(__GNUC__)
+-#if defined(__i386__) && defined(__GNUC__)
++#if (defined(__i386__) || (defined(__x86_64__) && (defined(__ILP32__))) && defined(__GNUC__)
return card_data + i * 4 + (__builtin_ffs (card) - 1) / 8;
--#elif defined(__x86_64__) && defined(__GNUC__)
-+#elif defined(__x86_64__) && defined(__GNUC__) && !defined(__ILP32__)
+ #elif defined(__x86_64__) && defined(__GNUC__)
return card_data + i * 8 + (__builtin_ffsll (card) - 1) / 8;
- #elif defined(__s390x__) && defined(__GNUC__)
- return card_data + i * 8 + (__builtin_ffsll (GUINT64_TO_LE(card)) - 1) / 8;
-Only in mono-3.12.0-x32-2/mono/metadata: sgen-marksweep.c~
diff -ur mono-3.12.0/mono/mini/mini-codegen.c mono-3.12.0-x32-2/mono/mini/mini-codegen.c
--- mono-3.12.0/mono/mini/mini-codegen.c 2015-01-12 18:15:08.000000000 +0100
+++ mono-3.12.0-x32-2/mono/mini/mini-codegen.c 2015-03-13 20:24:21.044619503 +0100
@@ -61,7 +63,6 @@ diff -ur mono-3.12.0/mono/mini/mini-codegen.c mono-3.12.0-x32-2/mono/mini/mini-c
{
guint64 i;
-Only in mono-3.12.0-x32-2/mono/mini: mini-codegen.c~
diff -ur mono-3.12.0/mono/mini/regalloc.h mono-3.12.0-x32-2/mono/mini/regalloc.h
--- mono-3.12.0/mono/mini/regalloc.h 2014-10-30 23:11:02.000000000 +0100
+++ mono-3.12.0-x32-2/mono/mini/regalloc.h 2015-03-13 20:23:14.031283837 +0100
@@ -71,25 +72,52 @@ diff -ur mono-3.12.0/mono/mini/regalloc.h mono-3.12.0-x32-2/mono/mini/regalloc.h
typedef guint64 regmask_t;
#else
typedef size_t regmask_t;
-Only in mono-3.12.0-x32-2/mono/mini: regalloc.h~
-diff -ur mono-3.12.0/mono/utils/monobitset.c mono-3.12.0-x32-2/mono/utils/monobitset.c
---- mono-3.12.0/mono/utils/monobitset.c 2014-12-03 12:25:48.000000000 +0100
-+++ mono-3.12.0-x32-2/mono/utils/monobitset.c 2015-03-13 20:31:41.054634822 +0100
-@@ -289,7 +289,7 @@
- : "=r" (r) : "g" (mask));
- return nth_bit + r;
- }
--#elif defined(__x86_64) && defined(__GNUC__)
-+#elif defined(__x86_64) && defined(__GNUC__) && !defined(__ILP32__)
+--- mono-3.12.1/mono/utils/monobitset.c.orig 2015-03-14 08:21:15.042164662 +0100
++++ mono-3.12.1/mono/utils/monobitset.c 2015-03-14 08:21:19.602164473 +0100
+@@ -280,8 +280,11 @@ my_g_bit_nth_lsf (gsize mask, gint nth_b
+ #if defined(__native_client__) && (defined(__i386__) || defined(__x86_64))
+ #define USE_X86_32BIT_INSTRUCTIONS 1
+ #endif
++#if defined(__x86_64) && defined(__ILP32__)
++#define ARCH_x32
++#endif
+
+-#if (defined(__i386__) && defined(__GNUC__)) || defined(USE_X86_32BIT_INSTRUCTIONS)
++#if (defined(__i386__) && defined(__GNUC__)) || defined(USE_X86_32BIT_INSTRUCTIONS) || defined(ARCH_x32)
{
- guint64 r;
+ int r;
+ /* This depends on mask != 0 */
+@@ -311,7 +314,7 @@ static inline gint
+ my_g_bit_nth_lsf_nomask (gsize mask)
+ {
+ /* Mask is expected to be != 0 */
+-#if (defined(__i386__) && defined(__GNUC__)) || defined(USE_X86_32BIT_INSTRUCTIONS)
++#if (defined(__i386__) && defined(__GNUC__)) || defined(USE_X86_32BIT_INSTRUCTIONS) || defined(ARCH_x32)
+ int r;
-@@ -317,7 +317,7 @@
__asm__("bsfl %1,%0\n\t"
- : "=r" (r) : "rm" (mask));
- return r;
--#elif defined(__x86_64) && defined(__GNUC__)
-+#elif defined(__x86_64) && defined(__GNUC__) && !defined(__ILP32__)
- guint64 r;
-
- __asm__("bsfq %1,%0\n\t"
+--- mono-3.12.1/mono/profiler/proflog.c.orig 2015-03-06 18:26:50.000000000 +0100
++++ mono-3.12.1/mono/profiler/proflog.c 2015-03-14 08:45:51.238769378 +0100
+@@ -1783,8 +1783,14 @@ perf_event_syscall (struct perf_event_at
+ {
+ attr->size = PERF_ATTR_SIZE_VER0;
+ //printf ("perf attr size: %d\n", attr->size);
++#if defined(__NR_perf_event_open)
++ return syscall(__NR_perf_event_open, attr, pid, cpu, group_fd, flags);
+ #if defined(__x86_64__)
++# if defined(__ILP32__)
++ return syscall(/*__NR_perf_event_open*/ 0x40000000+298, attr, pid, cpu, group_fd, flags);
++# else
+ return syscall(/*__NR_perf_event_open*/ 298, attr, pid, cpu, group_fd, flags);
++# endif
+ #elif defined(__i386__)
+ return syscall(/*__NR_perf_event_open*/ 336, attr, pid, cpu, group_fd, flags);
+ #elif defined(__arm__)
+========
+TODO:
+mono/metadata/mono-config.c (CPU config)
+mono/utils/mono-compiler.h (MONO_THREAD_VAR_OFFSET - needs x32 ABI knowledge)
+mono/utils/mono-context.g (MONO_CONTEXT_*)
+mono/utils/valgrind.h
+mono/mini/*-x86.* vs mono/mini/*-amd64.* ???
+mono/arch/x86 vs mono/arch/amd64 ???
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mono.git/commitdiff/fee77e603fc22250af18655a20fe5390adcc0933
More information about the pld-cvs-commit
mailing list