Compare commits

...

2 Commits
master ... f26

Author SHA1 Message Date
Richard W.M. Jones 94f98cd258 Drop non-free documentation (RHBZ#1530647).
(cherry picked from commit e65cf15d35)
2018-01-10 14:37:04 +00:00
Richard W.M. Jones 7a76b44f15 Fix: ocaml: Insufficient sanitisation allows privilege escalation for
setuid binaries (CVE-2017-9772) (RHBZ#1464920).
2017-06-26 10:33:03 +01:00
13 changed files with 5288 additions and 78 deletions

View File

@ -1,14 +1,14 @@
From fc5ac0d955afce294fe58a20cab8e9dda572de78 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 24 Jun 2014 10:00:15 +0100
Subject: [PATCH 01/10] Don't add rpaths to libraries.
Subject: [PATCH 01/11] Don't add rpaths to libraries.
---
tools/Makefile.shared | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/Makefile.shared b/tools/Makefile.shared
index 2803d78..d6c42bb 100644
index 2803d7860..d6c42bb4b 100644
--- a/tools/Makefile.shared
+++ b/tools/Makefile.shared
@@ -154,9 +154,9 @@ $(call byte_and_opt,ocamlmklib,ocamlmklibconfig.cmo config.cmo \
@ -25,5 +25,5 @@ index 2803d78..d6c42bb 100644
sed -n -e 's/^#ml //p' ../config/Makefile) \
> ocamlmklibconfig.ml
--
2.9.3
2.13.1

View File

@ -1,7 +1,7 @@
From 61bdb02cedd1be6ecdc37bc4a80ffe3f19aa5521 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:40:36 +0100
Subject: [PATCH 02/10] ocamlbyteinfo, ocamlplugininfo: Useful utilities from
Subject: [PATCH 02/11] ocamlbyteinfo, ocamlplugininfo: Useful utilities from
Debian, sent upstream.
See:
@ -15,7 +15,7 @@ http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml.git;a=tree;f=debian/ocam
diff --git a/ocamlbyteinfo.ml b/ocamlbyteinfo.ml
new file mode 100644
index 0000000..eb9a293
index 000000000..eb9a293e3
--- /dev/null
+++ b/ocamlbyteinfo.ml
@@ -0,0 +1,101 @@
@ -122,7 +122,7 @@ index 0000000..eb9a293
+ perr (Printf.sprintf "Usage: %s filename" Sys.argv.(0))
diff --git a/ocamlplugininfo.ml b/ocamlplugininfo.ml
new file mode 100644
index 0000000..e28800f
index 000000000..e28800f31
--- /dev/null
+++ b/ocamlplugininfo.ml
@@ -0,0 +1,109 @@
@ -236,5 +236,5 @@ index 0000000..e28800f
+ header.units
+ end
--
2.9.3
2.13.1

View File

@ -1,14 +1,14 @@
From 2f93494aea56c9216bb561800a6861b653f409ce Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:44:18 +0100
Subject: [PATCH 03/10] configure: Allow user defined C compiler flags.
Subject: [PATCH 03/11] configure: Allow user defined C compiler flags.
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index f43893a..41c9315 100755
index f43893a4e..41c9315cc 100755
--- a/configure
+++ b/configure
@@ -1901,6 +1901,10 @@ if $with_fpic; then
@ -23,5 +23,5 @@ index f43893a..41c9315 100755
cclibs="$cclibs $mathlib"
--
2.9.3
2.13.1

View File

@ -1,7 +1,7 @@
From cdd42ba82210bfaa97cfa010eaac3d805b80cb49 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 3 Nov 2016 19:50:20 +0000
Subject: [PATCH 04/10] Don't rewrite -Werror.
Subject: [PATCH 04/11] Don't rewrite -Werror.
In Fedora our CFLAGS contains -Wall -Werror=format-security.
@ -12,7 +12,7 @@ which is bogus. Remove this rewriting completely.
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index 85be2db..1764d0e 100644
index 85be2db2a..1764d0ed3 100644
--- a/Makefile
+++ b/Makefile
@@ -409,7 +409,6 @@ utils/config.ml: utils/config.mlp config/Makefile
@ -24,5 +24,5 @@ index 85be2db..1764d0e 100644
-e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \
-e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \
--
2.9.3
2.13.1

View File

@ -1,7 +1,7 @@
From d4a20446fc8d00223b0c23726618407e451472e8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 9 Nov 2016 11:01:15 -0500
Subject: [PATCH 05/10] PR#7405: s390x: Fix address of caml_raise_exn in native
Subject: [PATCH 05/11] PR#7405: s390x: Fix address of caml_raise_exn in native
dynlink modules.
This commit started as Fedora patch e732c39340e86939530a087744caa8d8f1247878.
@ -12,7 +12,7 @@ This commit started as Fedora patch e732c39340e86939530a087744caa8d8f1247878.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/asmcomp/s390x/emit.mlp b/asmcomp/s390x/emit.mlp
index 5d233a3..f99380a 100644
index 5d233a365..f99380aee 100644
--- a/asmcomp/s390x/emit.mlp
+++ b/asmcomp/s390x/emit.mlp
@@ -611,7 +611,7 @@ let emit_instr i =
@ -25,5 +25,5 @@ index 5d233a3..f99380a 100644
`{emit_label lbl}:\n`
| Cmm.Raise_notrace ->
--
2.9.3
2.13.1

View File

@ -1,14 +1,14 @@
From 427232f0f36bfcaafcb1ec2f8da3d1daad0b1121 Mon Sep 17 00:00:00 2001
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Date: Tue, 8 Nov 2016 23:56:50 +0100
Subject: [PATCH 06/10] Adapt config.guess for RISC-V
Subject: [PATCH 06/11] Adapt config.guess for RISC-V
---
config/gnu/config.guess | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/config/gnu/config.guess b/config/gnu/config.guess
index b79252d..8335398 100755
index b79252d6b..8335398b2 100755
--- a/config/gnu/config.guess
+++ b/config/gnu/config.guess
@@ -2,7 +2,7 @@
@ -31,5 +31,5 @@ index b79252d..8335398 100755
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
--
2.9.3
2.13.1

View File

@ -1,7 +1,7 @@
From cc3aa63c6892479851786af89b956004491dc84c Mon Sep 17 00:00:00 2001
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Date: Fri, 4 Nov 2016 20:39:09 +0100
Subject: [PATCH 07/10] Add RISC-V backend & runtime
Subject: [PATCH 07/11] Add RISC-V backend & runtime
---
README.adoc | 1 +
@ -26,7 +26,7 @@ Subject: [PATCH 07/10] Add RISC-V backend & runtime
create mode 100644 asmrun/riscv.S
diff --git a/README.adoc b/README.adoc
index 480b025..cb6eebf 100644
index 480b0250f..cb6eebf1d 100644
--- a/README.adoc
+++ b/README.adoc
@@ -34,6 +34,7 @@ IA32 (Pentium):: NetBSD, OpenBSD, Solaris 9
@ -39,7 +39,7 @@ index 480b025..cb6eebf 100644
the compiler may work under other operating systems with little work.
diff --git a/asmcomp/riscv/CSE.ml b/asmcomp/riscv/CSE.ml
new file mode 100644
index 0000000..302811a
index 000000000..302811a99
--- /dev/null
+++ b/asmcomp/riscv/CSE.ml
@@ -0,0 +1,36 @@
@ -81,7 +81,7 @@ index 0000000..302811a
+ (new cse)#fundecl f
diff --git a/asmcomp/riscv/arch.ml b/asmcomp/riscv/arch.ml
new file mode 100644
index 0000000..61a38b1
index 000000000..61a38b1dd
--- /dev/null
+++ b/asmcomp/riscv/arch.ml
@@ -0,0 +1,84 @@
@ -171,7 +171,7 @@ index 0000000..61a38b1
+ printreg arg.(0) printreg arg.(1) printreg arg.(2)
diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp
new file mode 100644
index 0000000..6d0e3ae
index 000000000..6d0e3aefd
--- /dev/null
+++ b/asmcomp/riscv/emit.mlp
@@ -0,0 +1,616 @@
@ -793,7 +793,7 @@ index 0000000..6d0e3ae
+ }
diff --git a/asmcomp/riscv/proc.ml b/asmcomp/riscv/proc.ml
new file mode 100644
index 0000000..c0b0dcd
index 000000000..c0b0dcdb8
--- /dev/null
+++ b/asmcomp/riscv/proc.ml
@@ -0,0 +1,301 @@
@ -1100,7 +1100,7 @@ index 0000000..c0b0dcd
+let init () = ()
diff --git a/asmcomp/riscv/reload.ml b/asmcomp/riscv/reload.ml
new file mode 100644
index 0000000..85b9703
index 000000000..85b970342
--- /dev/null
+++ b/asmcomp/riscv/reload.ml
@@ -0,0 +1,16 @@
@ -1122,7 +1122,7 @@ index 0000000..85b9703
+ (new Reloadgen.reload_generic)#fundecl f
diff --git a/asmcomp/riscv/scheduling.ml b/asmcomp/riscv/scheduling.ml
new file mode 100644
index 0000000..e436be1
index 000000000..e436be1cc
--- /dev/null
+++ b/asmcomp/riscv/scheduling.ml
@@ -0,0 +1,19 @@
@ -1147,7 +1147,7 @@ index 0000000..e436be1
+let fundecl f = f
diff --git a/asmcomp/riscv/selection.ml b/asmcomp/riscv/selection.ml
new file mode 100644
index 0000000..60ec5cb
index 000000000..60ec5cb4e
--- /dev/null
+++ b/asmcomp/riscv/selection.ml
@@ -0,0 +1,85 @@
@ -1238,7 +1238,7 @@ index 0000000..60ec5cb
+let fundecl f = (new selector)#emit_fundecl f
diff --git a/asmrun/riscv.S b/asmrun/riscv.S
new file mode 100644
index 0000000..a82048e
index 000000000..a82048efc
--- /dev/null
+++ b/asmrun/riscv.S
@@ -0,0 +1,424 @@
@ -1667,7 +1667,7 @@ index 0000000..a82048e
+ .align 3
+ .size caml_system__frametable, .-caml_system__frametable
diff --git a/byterun/caml/stack.h b/byterun/caml/stack.h
index fd9d528..781c251 100644
index fd9d528e9..781c2517b 100644
--- a/byterun/caml/stack.h
+++ b/byterun/caml/stack.h
@@ -75,6 +75,11 @@
@ -1683,7 +1683,7 @@ index fd9d528..781c251 100644
struct caml_context {
diff --git a/configure b/configure
index 41c9315..eb3e1f3 100755
index 41c9315cc..eb3e1f3e7 100755
--- a/configure
+++ b/configure
@@ -819,6 +819,7 @@ if test $with_sharedlibs = "yes"; then
@ -1713,5 +1713,5 @@ index 41c9315..eb3e1f3 100755
aspp="${TOOLPREF}gcc -c";;
esac
--
2.9.3
2.13.1

View File

@ -1,14 +1,14 @@
From f1be77d69e28ad3bd128c6c757d966e90bbf73d3 Mon Sep 17 00:00:00 2001
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Date: Thu, 10 Nov 2016 14:12:53 +0100
Subject: [PATCH 08/10] Try fix for andi/ori/xori immediates (#1)
Subject: [PATCH 08/11] Try fix for andi/ori/xori immediates (#1)
---
asmcomp/riscv/selection.ml | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/asmcomp/riscv/selection.ml b/asmcomp/riscv/selection.ml
index 60ec5cb..ad2b26e 100644
index 60ec5cb4e..ad2b26e9b 100644
--- a/asmcomp/riscv/selection.ml
+++ b/asmcomp/riscv/selection.ml
@@ -36,11 +36,6 @@ method! select_operation op args =
@ -39,5 +39,5 @@ index 60ec5cb..ad2b26e 100644
method! select_condition = function
--
2.9.3
2.13.1

View File

@ -1,7 +1,7 @@
From b81417ea168c3cf9454eeb41f1f723b66b3210aa Mon Sep 17 00:00:00 2001
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Date: Tue, 22 Nov 2016 22:30:35 +0100
Subject: [PATCH 09/10] Fix immediates' range when adjusting/indexing sp
Subject: [PATCH 09/11] Fix immediates' range when adjusting/indexing sp
---
asmcomp/riscv/arch.ml | 3 +++
@ -10,7 +10,7 @@ Subject: [PATCH 09/10] Fix immediates' range when adjusting/indexing sp
3 files changed, 44 insertions(+), 14 deletions(-)
diff --git a/asmcomp/riscv/arch.ml b/asmcomp/riscv/arch.ml
index 61a38b1..22c807c 100644
index 61a38b1dd..22c807c49 100644
--- a/asmcomp/riscv/arch.ml
+++ b/asmcomp/riscv/arch.ml
@@ -32,6 +32,9 @@ let spacetime_node_hole_pointer_is_live_before = function
@ -24,7 +24,7 @@ index 61a38b1..22c807c 100644
let big_endian = false
diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp
index 6d0e3ae..97c49ce 100644
index 6d0e3aefd..97c49ce80 100644
--- a/asmcomp/riscv/emit.mlp
+++ b/asmcomp/riscv/emit.mlp
@@ -93,6 +93,34 @@ let emit_stack r =
@ -139,7 +139,7 @@ index 6d0e3ae..97c49ce 100644
` {emit_string stg} ra, {emit_int(n - size_addr)}(sp)\n`;
`{emit_label !tailrec_entry_point}:\n`;
diff --git a/asmcomp/riscv/selection.ml b/asmcomp/riscv/selection.ml
index ad2b26e..2832336 100644
index ad2b26e9b..283233679 100644
--- a/asmcomp/riscv/selection.ml
+++ b/asmcomp/riscv/selection.ml
@@ -22,7 +22,7 @@ class selector = object (self)
@ -152,5 +152,5 @@ index ad2b26e..2832336 100644
method select_addressing _ = function
| Cop(Cadda, [arg; Cconst_int n]) when self#is_immediate n ->
--
2.9.3
2.13.1

View File

@ -1,14 +1,14 @@
From ab30529b723d451fd0ea8ac64d24fc417af55541 Mon Sep 17 00:00:00 2001
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Date: Wed, 23 Nov 2016 12:38:28 +0100
Subject: [PATCH 10/10] Another immediate range fix
Subject: [PATCH 10/11] Another immediate range fix
---
asmcomp/riscv/emit.mlp | 57 ++++++++++++++++++++++++++++++--------------------
1 file changed, 34 insertions(+), 23 deletions(-)
diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp
index 97c49ce..6cc1908 100644
index 97c49ce80..6cc190864 100644
--- a/asmcomp/riscv/emit.mlp
+++ b/asmcomp/riscv/emit.mlp
@@ -85,14 +85,6 @@ let emit_reg = function
@ -127,5 +127,5 @@ index 97c49ce..6cc1908 100644
emit_all fundecl.fun_body;
List.iter emit_call_gc !call_gc_sites;
--
2.9.3
2.13.1

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@
Name: ocaml
Version: 4.04.0
Release: 9%{?dist}
Release: 11%{?dist}
Summary: OCaml compiler and programming environment
@ -37,10 +37,6 @@ URL: http://www.ocaml.org
Source0: http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-%{version}.tar.gz
Source1: http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-4.04-refman-html.tar.gz
Source2: http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-4.04-refman.pdf
Source3: http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-4.04-refman.info.tar.gz
# IMPORTANT NOTE:
#
# These patches are generated from unpacked sources stored in a
@ -68,6 +64,10 @@ Patch0007: 0007-Add-RISC-V-backend-runtime.patch
Patch0008: 0008-Try-fix-for-andi-ori-xori-immediates-1.patch
Patch0009: 0009-Fix-immediates-range-when-adjusting-indexing-sp.patch
Patch0010: 0010-Another-immediate-range-fix.patch
# ocaml: Insufficient sanitisation allows privilege escalation for
# setuid binaries (CVE-2017-9772)
# https://bugzilla.redhat.com/show_bug.cgi?id=1464920
Patch0011: 0011-cherry-pick-the-fix-for-MPR-7557-from-4.04.patch
BuildRequires: binutils-devel
BuildRequires: ncurses-devel
@ -178,8 +178,7 @@ Requires(preun): /sbin/install-info
OCaml is a high-level, strongly-typed, functional and object-oriented
programming language from the ML family of languages.
This package contains documentation in PDF and HTML format as well as
man pages and info files.
This package contains man pages.
%package compiler-libs
@ -199,9 +198,6 @@ may not be portable between versions.
%prep
%setup -q -T -b 0 -n %{name}-%{version}
%setup -q -T -D -a 1 -n %{name}-%{version}
%setup -q -T -D -a 3 -n %{name}-%{version}
cp %{SOURCE2} refman.pdf
%autopatch -p1
@ -270,12 +266,6 @@ perl -pi -e "s|^$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
)
%endif
(
# install info files
mkdir -p $RPM_BUILD_ROOT%{_infodir};
cd infoman; cp ocaml*.gz $RPM_BUILD_ROOT%{_infodir}
)
echo %{version} > $RPM_BUILD_ROOT%{_libdir}/ocaml/fedora-ocaml-release
# Remove rpaths from stublibs .so files.
@ -291,20 +281,6 @@ find $RPM_BUILD_ROOT -name .ignore -delete
find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete
%post docs
/sbin/install-info \
--entry="* ocaml: (ocaml). The OCaml compiler and programming environment" \
--section="Programming Languages" \
%{_infodir}/%{name}.info \
%{_infodir}/dir 2>/dev/null || :
%preun docs
if [ $1 -eq 0 ]; then
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
fi
%files
%doc LICENSE
%{_bindir}/ocaml
@ -425,8 +401,6 @@ fi
%files docs
%doc refman.pdf htmlman
%{_infodir}/*
%{_mandir}/man1/*
%{_mandir}/man3/*
@ -454,6 +428,13 @@ fi
%changelog
* Wed Jan 10 2018 Richard W.M. Jones <rjones@redhat.com> - 4.04.0-11
- Drop non-free documentation (RHBZ#1530647).
* Mon Jun 26 2017 Richard W.M. Jones <rjones@redhat.com> - 4.04.0-10
- Fix: ocaml: Insufficient sanitisation allows privilege escalation for
setuid binaries (CVE-2017-9772) (RHBZ#1464920).
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.04.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

View File

@ -1,4 +1 @@
496f99822133bb905171bae8f64b7be4 ocaml-4.04.0.tar.gz
5c58a4fce99b20e02c3208ad956bcb9d ocaml-4.04-refman-html.tar.gz
8c9df1da0e36a69817f43115fa87360c ocaml-4.04-refman.info.tar.gz
69342c456bcc7ef1c3a76cca1e9c0ec8 ocaml-4.04-refman.pdf