1*4882a593SmuzhiyunFrom 7120e38a3d1b3a3fb0d687a0f811f54beaf90d09 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Florian Weimer <fweimer@redhat.com>
3*4882a593SmuzhiyunDate: Sat, 2 Nov 2019 21:55:35 +0100
4*4882a593SmuzhiyunSubject: [PATCH 12/20] Properly initialize audit cookie for the dynamic loader
5*4882a593Smuzhiyun [BZ #25157]
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunThe l_audit array is indexed by audit module, not audit function.
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunChange-Id: I180eb3573dc1c57433750f5d8cb18271460ba5f2
10*4882a593Smuzhiyun(cherry picked from commit c7bf5ceab6ec776ac7350d3b0190776bf532ac54)
11*4882a593SmuzhiyunSigned-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
12*4882a593Smuzhiyun---
13*4882a593Smuzhiyun elf/rtld.c              | 14 ++++-----
14*4882a593Smuzhiyun elf/tst-auditmany.c     | 26 +++++++++++++++++
15*4882a593Smuzhiyun elf/tst-auditmanymod.h  | 64 +++++++++++++++++++++++++++++++++++++++++
16*4882a593Smuzhiyun elf/tst-auditmanymod1.c | 20 +++++++++++++
17*4882a593Smuzhiyun elf/tst-auditmanymod2.c | 20 +++++++++++++
18*4882a593Smuzhiyun elf/tst-auditmanymod3.c | 20 +++++++++++++
19*4882a593Smuzhiyun elf/tst-auditmanymod4.c | 20 +++++++++++++
20*4882a593Smuzhiyun elf/tst-auditmanymod5.c | 20 +++++++++++++
21*4882a593Smuzhiyun elf/tst-auditmanymod6.c | 20 +++++++++++++
22*4882a593Smuzhiyun elf/tst-auditmanymod7.c | 20 +++++++++++++
23*4882a593Smuzhiyun elf/tst-auditmanymod8.c | 20 +++++++++++++
24*4882a593Smuzhiyun elf/tst-auditmanymod9.c | 20 +++++++++++++
25*4882a593Smuzhiyun 12 files changed, 277 insertions(+), 7 deletions(-)
26*4882a593Smuzhiyun create mode 100644 elf/tst-auditmany.c
27*4882a593Smuzhiyun create mode 100644 elf/tst-auditmanymod.h
28*4882a593Smuzhiyun create mode 100644 elf/tst-auditmanymod1.c
29*4882a593Smuzhiyun create mode 100644 elf/tst-auditmanymod2.c
30*4882a593Smuzhiyun create mode 100644 elf/tst-auditmanymod3.c
31*4882a593Smuzhiyun create mode 100644 elf/tst-auditmanymod4.c
32*4882a593Smuzhiyun create mode 100644 elf/tst-auditmanymod5.c
33*4882a593Smuzhiyun create mode 100644 elf/tst-auditmanymod6.c
34*4882a593Smuzhiyun create mode 100644 elf/tst-auditmanymod7.c
35*4882a593Smuzhiyun create mode 100644 elf/tst-auditmanymod8.c
36*4882a593Smuzhiyun create mode 100644 elf/tst-auditmanymod9.c
37*4882a593Smuzhiyun
38*4882a593Smuzhiyundiff --git a/elf/rtld.c b/elf/rtld.c
39*4882a593Smuzhiyunindex 10a08ec5..63525ad5 100644
40*4882a593Smuzhiyun--- a/elf/rtld.c
41*4882a593Smuzhiyun+++ b/elf/rtld.c
42*4882a593Smuzhiyun@@ -990,13 +990,7 @@ ERROR: audit interface '%s' requires version %d (maximum supported version %d);
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun       /* Store the pointer.  */
45*4882a593Smuzhiyun       if (err_str == NULL && largs.result != NULL)
46*4882a593Smuzhiyun-	{
47*4882a593Smuzhiyun-	  newp->fptr[cnt] = largs.result;
48*4882a593Smuzhiyun-
49*4882a593Smuzhiyun-	  /* The dynamic linker link map is statically allocated,
50*4882a593Smuzhiyun-	     initialize the data now.  */
51*4882a593Smuzhiyun-	  GL(dl_rtld_map).l_audit[cnt].cookie = (intptr_t) &GL(dl_rtld_map);
52*4882a593Smuzhiyun-	}
53*4882a593Smuzhiyun+	newp->fptr[cnt] = largs.result;
54*4882a593Smuzhiyun       else
55*4882a593Smuzhiyun 	newp->fptr[cnt] = NULL;
56*4882a593Smuzhiyun       ++cnt;
57*4882a593Smuzhiyun@@ -1012,6 +1006,12 @@ ERROR: audit interface '%s' requires version %d (maximum supported version %d);
58*4882a593Smuzhiyun     *last_audit = GLRO(dl_audit) = &newp->ifaces;
59*4882a593Smuzhiyun   else
60*4882a593Smuzhiyun     *last_audit = (*last_audit)->next = &newp->ifaces;
61*4882a593Smuzhiyun+
62*4882a593Smuzhiyun+  /* The dynamic linker link map is statically allocated, initialize
63*4882a593Smuzhiyun+     the data now.  */
64*4882a593Smuzhiyun+  GL (dl_rtld_map).l_audit[GLRO (dl_naudit)].cookie
65*4882a593Smuzhiyun+    = (intptr_t) &GL (dl_rtld_map);
66*4882a593Smuzhiyun+
67*4882a593Smuzhiyun   ++GLRO(dl_naudit);
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun   /* Mark the DSO as being used for auditing.  */
70*4882a593Smuzhiyundiff --git a/elf/tst-auditmany.c b/elf/tst-auditmany.c
71*4882a593Smuzhiyunnew file mode 100644
72*4882a593Smuzhiyunindex 00000000..9d68105b
73*4882a593Smuzhiyun--- /dev/null
74*4882a593Smuzhiyun+++ b/elf/tst-auditmany.c
75*4882a593Smuzhiyun@@ -0,0 +1,26 @@
76*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Main program.
77*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
78*4882a593Smuzhiyun+   This file is part of the GNU C Library.
79*4882a593Smuzhiyun+
80*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
81*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
82*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
83*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
84*4882a593Smuzhiyun+
85*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
86*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
87*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
88*4882a593Smuzhiyun+   Lesser General Public License for more details.
89*4882a593Smuzhiyun+
90*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
91*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
92*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
93*4882a593Smuzhiyun+
94*4882a593Smuzhiyun+/* It does not make sense to use the test harness for this test
95*4882a593Smuzhiyun+   because the testing happens in auditors.  */
96*4882a593Smuzhiyun+
97*4882a593Smuzhiyun+int
98*4882a593Smuzhiyun+main (void)
99*4882a593Smuzhiyun+{
100*4882a593Smuzhiyun+  return 0;
101*4882a593Smuzhiyun+}
102*4882a593Smuzhiyundiff --git a/elf/tst-auditmanymod.h b/elf/tst-auditmanymod.h
103*4882a593Smuzhiyunnew file mode 100644
104*4882a593Smuzhiyunindex 00000000..d1d89e08
105*4882a593Smuzhiyun--- /dev/null
106*4882a593Smuzhiyun+++ b/elf/tst-auditmanymod.h
107*4882a593Smuzhiyun@@ -0,0 +1,64 @@
108*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Auditor template.
109*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
110*4882a593Smuzhiyun+   This file is part of the GNU C Library.
111*4882a593Smuzhiyun+
112*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
113*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
114*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
115*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
116*4882a593Smuzhiyun+
117*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
118*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
119*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
120*4882a593Smuzhiyun+   Lesser General Public License for more details.
121*4882a593Smuzhiyun+
122*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
123*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
124*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
125*4882a593Smuzhiyun+
126*4882a593Smuzhiyun+/* The macro MOD must be defined to the number of this auditor (an
127*4882a593Smuzhiyun+   integer) before including this file.  */
128*4882a593Smuzhiyun+
129*4882a593Smuzhiyun+#include <link.h>
130*4882a593Smuzhiyun+#include <stdio.h>
131*4882a593Smuzhiyun+#include <unistd.h>
132*4882a593Smuzhiyun+
133*4882a593Smuzhiyun+/* Error counter for delayed error reporting.  */
134*4882a593Smuzhiyun+static int errors;
135*4882a593Smuzhiyun+
136*4882a593Smuzhiyun+unsigned int
137*4882a593Smuzhiyun+la_version (unsigned int version)
138*4882a593Smuzhiyun+{
139*4882a593Smuzhiyun+  return version;
140*4882a593Smuzhiyun+}
141*4882a593Smuzhiyun+
142*4882a593Smuzhiyun+unsigned int
143*4882a593Smuzhiyun+la_objopen (struct link_map *map, Lmid_t lmid,
144*4882a593Smuzhiyun+            uintptr_t *cookie)
145*4882a593Smuzhiyun+{
146*4882a593Smuzhiyun+  struct link_map *cookie_map = (struct link_map *) *cookie;
147*4882a593Smuzhiyun+  printf ("info: %d, la_objopen: map=%p name=%s cookie=%p:%p diff=%td\n",
148*4882a593Smuzhiyun+          MOD, map, map->l_name, cookie, cookie_map,
149*4882a593Smuzhiyun+          (char *) cookie - (char *) map);
150*4882a593Smuzhiyun+  fflush (stdout);
151*4882a593Smuzhiyun+  if (map != cookie_map)
152*4882a593Smuzhiyun+    {
153*4882a593Smuzhiyun+      printf ("error: %d, la_objopen:"
154*4882a593Smuzhiyun+              " map address does not match cookie value\n",
155*4882a593Smuzhiyun+              MOD);
156*4882a593Smuzhiyun+      fflush (stdout);
157*4882a593Smuzhiyun+      ++errors;
158*4882a593Smuzhiyun+    }
159*4882a593Smuzhiyun+  return 0;
160*4882a593Smuzhiyun+}
161*4882a593Smuzhiyun+
162*4882a593Smuzhiyun+extern unsigned int
163*4882a593Smuzhiyun+la_objclose (uintptr_t *__cookie)
164*4882a593Smuzhiyun+{
165*4882a593Smuzhiyun+  if (errors != 0)
166*4882a593Smuzhiyun+    {
167*4882a593Smuzhiyun+      printf ("error: exiting due to previous errors");
168*4882a593Smuzhiyun+      _exit (1);
169*4882a593Smuzhiyun+    }
170*4882a593Smuzhiyun+  return 0;
171*4882a593Smuzhiyun+}
172*4882a593Smuzhiyundiff --git a/elf/tst-auditmanymod1.c b/elf/tst-auditmanymod1.c
173*4882a593Smuzhiyunnew file mode 100644
174*4882a593Smuzhiyunindex 00000000..c7de49d4
175*4882a593Smuzhiyun--- /dev/null
176*4882a593Smuzhiyun+++ b/elf/tst-auditmanymod1.c
177*4882a593Smuzhiyun@@ -0,0 +1,20 @@
178*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Auditor 1.
179*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
180*4882a593Smuzhiyun+   This file is part of the GNU C Library.
181*4882a593Smuzhiyun+
182*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
183*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
184*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
185*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
186*4882a593Smuzhiyun+
187*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
188*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
189*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
190*4882a593Smuzhiyun+   Lesser General Public License for more details.
191*4882a593Smuzhiyun+
192*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
193*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
194*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
195*4882a593Smuzhiyun+
196*4882a593Smuzhiyun+#define MOD 1
197*4882a593Smuzhiyun+#include "tst-auditmanymod.h"
198*4882a593Smuzhiyundiff --git a/elf/tst-auditmanymod2.c b/elf/tst-auditmanymod2.c
199*4882a593Smuzhiyunnew file mode 100644
200*4882a593Smuzhiyunindex 00000000..4254f022
201*4882a593Smuzhiyun--- /dev/null
202*4882a593Smuzhiyun+++ b/elf/tst-auditmanymod2.c
203*4882a593Smuzhiyun@@ -0,0 +1,20 @@
204*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Auditor 2.
205*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
206*4882a593Smuzhiyun+   This file is part of the GNU C Library.
207*4882a593Smuzhiyun+
208*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
209*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
210*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
211*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
212*4882a593Smuzhiyun+
213*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
214*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
215*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
216*4882a593Smuzhiyun+   Lesser General Public License for more details.
217*4882a593Smuzhiyun+
218*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
219*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
220*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
221*4882a593Smuzhiyun+
222*4882a593Smuzhiyun+#define MOD 2
223*4882a593Smuzhiyun+#include "tst-auditmanymod.h"
224*4882a593Smuzhiyundiff --git a/elf/tst-auditmanymod3.c b/elf/tst-auditmanymod3.c
225*4882a593Smuzhiyunnew file mode 100644
226*4882a593Smuzhiyunindex 00000000..ee90f4eb
227*4882a593Smuzhiyun--- /dev/null
228*4882a593Smuzhiyun+++ b/elf/tst-auditmanymod3.c
229*4882a593Smuzhiyun@@ -0,0 +1,20 @@
230*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Auditor 3.
231*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
232*4882a593Smuzhiyun+   This file is part of the GNU C Library.
233*4882a593Smuzhiyun+
234*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
235*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
236*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
237*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
238*4882a593Smuzhiyun+
239*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
240*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
241*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
242*4882a593Smuzhiyun+   Lesser General Public License for more details.
243*4882a593Smuzhiyun+
244*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
245*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
246*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
247*4882a593Smuzhiyun+
248*4882a593Smuzhiyun+#define MOD 3
249*4882a593Smuzhiyun+#include "tst-auditmanymod.h"
250*4882a593Smuzhiyundiff --git a/elf/tst-auditmanymod4.c b/elf/tst-auditmanymod4.c
251*4882a593Smuzhiyunnew file mode 100644
252*4882a593Smuzhiyunindex 00000000..6379fa1d
253*4882a593Smuzhiyun--- /dev/null
254*4882a593Smuzhiyun+++ b/elf/tst-auditmanymod4.c
255*4882a593Smuzhiyun@@ -0,0 +1,20 @@
256*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Auditor 4.
257*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
258*4882a593Smuzhiyun+   This file is part of the GNU C Library.
259*4882a593Smuzhiyun+
260*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
261*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
262*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
263*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
264*4882a593Smuzhiyun+
265*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
266*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
267*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
268*4882a593Smuzhiyun+   Lesser General Public License for more details.
269*4882a593Smuzhiyun+
270*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
271*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
272*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
273*4882a593Smuzhiyun+
274*4882a593Smuzhiyun+#define MOD 4
275*4882a593Smuzhiyun+#include "tst-auditmanymod.h"
276*4882a593Smuzhiyundiff --git a/elf/tst-auditmanymod5.c b/elf/tst-auditmanymod5.c
277*4882a593Smuzhiyunnew file mode 100644
278*4882a593Smuzhiyunindex 00000000..17c0f617
279*4882a593Smuzhiyun--- /dev/null
280*4882a593Smuzhiyun+++ b/elf/tst-auditmanymod5.c
281*4882a593Smuzhiyun@@ -0,0 +1,20 @@
282*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Auditor 5.
283*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
284*4882a593Smuzhiyun+   This file is part of the GNU C Library.
285*4882a593Smuzhiyun+
286*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
287*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
288*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
289*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
290*4882a593Smuzhiyun+
291*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
292*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
293*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
294*4882a593Smuzhiyun+   Lesser General Public License for more details.
295*4882a593Smuzhiyun+
296*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
297*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
298*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
299*4882a593Smuzhiyun+
300*4882a593Smuzhiyun+#define MOD 5
301*4882a593Smuzhiyun+#include "tst-auditmanymod.h"
302*4882a593Smuzhiyundiff --git a/elf/tst-auditmanymod6.c b/elf/tst-auditmanymod6.c
303*4882a593Smuzhiyunnew file mode 100644
304*4882a593Smuzhiyunindex 00000000..86bc6801
305*4882a593Smuzhiyun--- /dev/null
306*4882a593Smuzhiyun+++ b/elf/tst-auditmanymod6.c
307*4882a593Smuzhiyun@@ -0,0 +1,20 @@
308*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Auditor 6.
309*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
310*4882a593Smuzhiyun+   This file is part of the GNU C Library.
311*4882a593Smuzhiyun+
312*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
313*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
314*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
315*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
316*4882a593Smuzhiyun+
317*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
318*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
319*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
320*4882a593Smuzhiyun+   Lesser General Public License for more details.
321*4882a593Smuzhiyun+
322*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
323*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
324*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
325*4882a593Smuzhiyun+
326*4882a593Smuzhiyun+#define MOD 6
327*4882a593Smuzhiyun+#include "tst-auditmanymod.h"
328*4882a593Smuzhiyundiff --git a/elf/tst-auditmanymod7.c b/elf/tst-auditmanymod7.c
329*4882a593Smuzhiyunnew file mode 100644
330*4882a593Smuzhiyunindex 00000000..92b0bf60
331*4882a593Smuzhiyun--- /dev/null
332*4882a593Smuzhiyun+++ b/elf/tst-auditmanymod7.c
333*4882a593Smuzhiyun@@ -0,0 +1,20 @@
334*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Auditor 7.
335*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
336*4882a593Smuzhiyun+   This file is part of the GNU C Library.
337*4882a593Smuzhiyun+
338*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
339*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
340*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
341*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
342*4882a593Smuzhiyun+
343*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
344*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
345*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
346*4882a593Smuzhiyun+   Lesser General Public License for more details.
347*4882a593Smuzhiyun+
348*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
349*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
350*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
351*4882a593Smuzhiyun+
352*4882a593Smuzhiyun+#define MOD 7
353*4882a593Smuzhiyun+#include "tst-auditmanymod.h"
354*4882a593Smuzhiyundiff --git a/elf/tst-auditmanymod8.c b/elf/tst-auditmanymod8.c
355*4882a593Smuzhiyunnew file mode 100644
356*4882a593Smuzhiyunindex 00000000..d42f884d
357*4882a593Smuzhiyun--- /dev/null
358*4882a593Smuzhiyun+++ b/elf/tst-auditmanymod8.c
359*4882a593Smuzhiyun@@ -0,0 +1,20 @@
360*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Auditor 8.
361*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
362*4882a593Smuzhiyun+   This file is part of the GNU C Library.
363*4882a593Smuzhiyun+
364*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
365*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
366*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
367*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
368*4882a593Smuzhiyun+
369*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
370*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
371*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
372*4882a593Smuzhiyun+   Lesser General Public License for more details.
373*4882a593Smuzhiyun+
374*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
375*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
376*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
377*4882a593Smuzhiyun+
378*4882a593Smuzhiyun+#define MOD 8
379*4882a593Smuzhiyun+#include "tst-auditmanymod.h"
380*4882a593Smuzhiyundiff --git a/elf/tst-auditmanymod9.c b/elf/tst-auditmanymod9.c
381*4882a593Smuzhiyunnew file mode 100644
382*4882a593Smuzhiyunindex 00000000..6bee81d6
383*4882a593Smuzhiyun--- /dev/null
384*4882a593Smuzhiyun+++ b/elf/tst-auditmanymod9.c
385*4882a593Smuzhiyun@@ -0,0 +1,20 @@
386*4882a593Smuzhiyun+/* Check cookie initialization for many auditors.  Auditor 9.
387*4882a593Smuzhiyun+   Copyright (C) 2019 Free Software Foundation, Inc.
388*4882a593Smuzhiyun+   This file is part of the GNU C Library.
389*4882a593Smuzhiyun+
390*4882a593Smuzhiyun+   The GNU C Library is free software; you can redistribute it and/or
391*4882a593Smuzhiyun+   modify it under the terms of the GNU Lesser General Public
392*4882a593Smuzhiyun+   License as published by the Free Software Foundation; either
393*4882a593Smuzhiyun+   version 2.1 of the License, or (at your option) any later version.
394*4882a593Smuzhiyun+
395*4882a593Smuzhiyun+   The GNU C Library is distributed in the hope that it will be useful,
396*4882a593Smuzhiyun+   but WITHOUT ANY WARRANTY; without even the implied warranty of
397*4882a593Smuzhiyun+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
398*4882a593Smuzhiyun+   Lesser General Public License for more details.
399*4882a593Smuzhiyun+
400*4882a593Smuzhiyun+   You should have received a copy of the GNU Lesser General Public
401*4882a593Smuzhiyun+   License along with the GNU C Library; if not, see
402*4882a593Smuzhiyun+   <https://www.gnu.org/licenses/>.  */
403*4882a593Smuzhiyun+
404*4882a593Smuzhiyun+#define MOD 9
405*4882a593Smuzhiyun+#include "tst-auditmanymod.h"
406*4882a593Smuzhiyun--
407*4882a593Smuzhiyun2.20.1
408*4882a593Smuzhiyun
409