aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/range.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/range.c')
0 files changed, 0 insertions, 0 deletions
c' href='/cgit/cgit.cgi/litmus-rt-ext-res.git/commit/fs/exec.c?id=6341c393fcc37d58727865f1ee2f65e632e9d4f0'>6341c393fcc3
5f4123be3cdb
6110e3abbff8
5ad4e53bd540
61be228a06dc
3d5992d2ac7d
0e028465d18b
1da177e4c3f4


b6a2fea39318
43d2b113241d

a6f76f23d297
1da177e4c3f4
4ff16c25e2cc

d6e711448137

e4dc1b14d8dc
1da177e4c3f4

8fc3dc5a3a17
1da177e4c3f4
8fc3dc5a3a17
92eaa565add6

1da177e4c3f4
74641f584da8

1da177e4c3f4
1da177e4c3f4

74641f584da8
1da177e4c3f4
f6b450d489f2
1da177e4c3f4
1da177e4c3f4
e4dc1b14d8dc
1da177e4c3f4
1da177e4c3f4








69369a700373
1da177e4c3f4





1e7bfb2134df
1da177e4c3f4
72c2d5319200
964bd183624c
91a27b2a7567
964bd183624c
47c805dc2d2d


f9652e10c12b

47c805dc2d2d
964bd183624c
6e8341a11eb2


f9652e10c12b
6e8341a11eb2


1da177e4c3f4


496ad9aa8ef4
1da177e4c3f4

30524472c2f7
6e8341a11eb2
6146f0d5e47c
1da177e4c3f4
2a12a9d78146
6110e3abbff8
1da177e4c3f4
1da177e4c3f4
72c2d5319200





1da177e4c3f4
72c2d5319200




1da177e4c3f4
72c2d5319200
6e8341a11eb2
1da177e4c3f4


1da177e4c3f4
69369a700373
1da177e4c3f4
b6a2fea39318
ae6b585eeb74





0e028465d18b
3c77f8457221







3c77f8457221
3c77f8457221

0e028465d18b
b6a2fea39318






d05f3169c0fb
b6a2fea39318









b6a2fea39318
a64e715fc74b

3c77f8457221

a64e715fc74b





b6a2fea39318







a64e715fc74b
d554ed895dc8
b6a2fea39318




























eaccbfa564e4
b6a2fea39318




eaccbfa564e4
b6a2fea39318









aacb3d17a73f
b6a2fea39318

d9104d1ca966
3ed75eb8f1cd
5beb49305251
462e635e5b73
b6a2fea39318
eaccbfa564e4
b6a2fea39318
b6a2fea39318


b6a2fea39318
b6a2fea39318
b6a2fea39318
eaccbfa564e4


b6a2fea39318









0e028465d18b
3c77f8457221


0e028465d18b
b6a2fea39318


























































9cc64ceaa8b8
b6a2fea39318



























ba2d01629d0d
0e028465d18b





38b983b3461e
0e028465d18b

ba2d01629d0d


1d1dbf8135ab
0e028465d18b







1d1dbf8135ab
0e028465d18b




1d1dbf8135ab

0e028465d18b
1d1dbf8135ab

1da177e4c3f4


ba2d01629d0d
1da177e4c3f4


0e028465d18b
1da177e4c3f4
1d1dbf8135ab
1da177e4c3f4
1da177e4c3f4

1d1dbf8135ab



6d92d4f6a747
1da177e4c3f4
6d92d4f6a747
9aea5a65aa7a


1da177e4c3f4






b6a2fea39318


1da177e4c3f4
ba2d01629d0d
75c96f85845a
1da177e4c3f4


b6a2fea39318
1da177e4c3f4


d7627467b7a8
1da177e4c3f4


1d1dbf8135ab


1da177e4c3f4
1da177e4c3f4
1d1dbf8135ab





1da177e4c3f4
1da177e4c3f4
b6a2fea39318
1da177e4c3f4
b6a2fea39318

1da177e4c3f4

1da177e4c3f4
1da177e4c3f4
9aea5a65aa7a



7993bc1f4663

1da177e4c3f4
b6a2fea39318















1da177e4c3f4
b6a2fea39318
1da177e4c3f4

1da177e4c3f4
b6a2fea39318

1da177e4c3f4
b6a2fea39318

1da177e4c3f4

b6a2fea39318

1da177e4c3f4
b6a2fea39318
1da177e4c3f4


1da177e4c3f4



b6a2fea39318

1da177e4c3f4
b6a2fea39318

1da177e4c3f4





ba2d01629d0d
d7627467b7a8
1da177e4c3f4


ba2d01629d0d
0e028465d18b
ba2d01629d0d

1da177e4c3f4
ba2d01629d0d
1da177e4c3f4
ba2d01629d0d
1da177e4c3f4

1da177e4c3f4


b6a2fea39318
1da177e4c3f4
b6a2fea39318


1da177e4c3f4
b6a2fea39318





1da177e4c3f4
b6a2fea39318
1da177e4c3f4

b6a2fea39318




d16dfc550f53
1da177e4c3f4
b6a2fea39318
1da177e4c3f4
b6a2fea39318









5beb49305251

b6a2fea39318





38a76013ad80
b6a2fea39318


2b047252d087
b6a2fea39318



d16dfc550f53
6ee8630e02be
b6a2fea39318






d16dfc550f53
6ee8630e02be
1da177e4c3f4
2b047252d087
b6a2fea39318

5beb49305251
b6a2fea39318



1da177e4c3f4

b6a2fea39318



1da177e4c3f4



b6a2fea39318

1da177e4c3f4
b6a2fea39318



803bf5ec2599


1da177e4c3f4

d71f290b4e98
d554ed895dc8
d71f290b4e98

1da177e4c3f4
b6a2fea39318


1da177e4c3f4
b6a2fea39318
1da177e4c3f4
b6a2fea39318


1da177e4c3f4
b6a2fea39318

1b528181b2ff




b6a2fea39318


1da177e4c3f4
1da177e4c3f4

1da177e4c3f4
b6a2fea39318

1da177e4c3f4
1da177e4c3f4
96a8e13ed44e
b6a2fea39318










a8bef8ff6ea1
b6a2fea39318









fc63cf237078

1da177e4c3f4

a8bef8ff6ea1


5ef097dd7ba4
803bf5ec2599





b6a2fea39318
803bf5ec2599



b6a2fea39318
803bf5ec2599



b6a2fea39318
3af9e859281b
b6a2fea39318




1da177e4c3f4
fc63cf237078
1da177e4c3f4
1da177e4c3f4

1da177e4c3f4

c4ad8f98bef7
1da177e4c3f4
1da177e4c3f4
e56b6a5dda1a
47c805dc2d2d


f9652e10c12b

47c805dc2d2d
1da177e4c3f4
c4ad8f98bef7
6e8341a11eb2
e56b6a5dda1a


496ad9aa8ef4
6e8341a11eb2
e56b6a5dda1a
6e8341a11eb2

e56b6a5dda1a
2a12a9d78146
6110e3abbff8
e56b6a5dda1a
6e8341a11eb2

1da177e4c3f4
6e8341a11eb2
e56b6a5dda1a

6e8341a11eb2

e56b6a5dda1a

c4ad8f98bef7





1da177e4c3f4

6777d773a463

1da177e4c3f4














3dc20cb282ec

ec6955798256
3dc20cb282ec





1da177e4c3f4


615d6e8756c8
1da177e4c3f4






4fe7efdbdfb1
1da177e4c3f4



999d9fc1670b
1da177e4c3f4

999d9fc1670b
1da177e4c3f4








615d6e8756c8

1da177e4c3f4
1da177e4c3f4

7dddb12c6355
701085b21901
31a78f23bac0
1da177e4c3f4












858119e15938
1da177e4c3f4

b2c903b87904
1da177e4c3f4
1da177e4c3f4
aafe6c2a2b6b
1da177e4c3f4



1da177e4c3f4
1da177e4c3f4
ed5d2cac1142
1da177e4c3f4




1da177e4c3f4

d344193a05da
ed5d2cac1142
d344193a05da


1da177e4c3f4
d344193a05da
d5bbd43d5f45
1da177e4c3f4

d5bbd43d5f45

1da177e4c3f4

1da177e4c3f4






aafe6c2a2b6b
8187926bdae9
6db840fa7887
2800d8d19e51
6db840fa7887
e56fb2874015
6db840fa7887


d5bbd43d5f45
6db840fa7887
e56fb2874015
6db840fa7887
d5bbd43d5f45

6db840fa7887
1da177e4c3f4
f5e902817fee









aafe6c2a2b6b
266b7a021f7d
f5e902817fee
bac0abd6174e

1da177e4c3f4





d73d65293e3e

c18258c6f084

d73d65293e3e

aafe6c2a2b6b
3f4185483832
aafe6c2a2b6b

9cd80bbb07fc
aafe6c2a2b6b
9cd80bbb07fc
1da177e4c3f4
aafe6c2a2b6b

de12a7878c11
aafe6c2a2b6b
087806b12815
962b564cf1ec


eac1b5e57d7a







1da177e4c3f4
e56fb2874015
8187926bdae9

ed5d2cac1142
1da177e4c3f4
6db840fa7887

1da177e4c3f4

e636825346b3


1da177e4c3f4
cbaffba12ce0
329f7dba5f7d
b2c903b87904

1da177e4c3f4
b2c903b87904

1da177e4c3f4
b2c903b87904



1da177e4c3f4





aafe6c2a2b6b
1da177e4c3f4


fba2afaaec79
1da177e4c3f4

aafe6c2a2b6b
1da177e4c3f4
d5bbd43d5f45







1da177e4c3f4
0840a90d943b
59714d65dfbc
1da177e4c3f4




59714d65dfbc
1da177e4c3f4
7d74f492e4dd
1da177e4c3f4
6a6d27de340c




82b897782d10
1da177e4c3f4

43d2b113241d
1da177e4c3f4

82b897782d10
1da177e4c3f4



221af7f87b97
1da177e4c3f4








925d1c401fa6
1da177e4c3f4
1da177e4c3f4

3c77f8457221
1da177e4c3f4

fd8328be874f
1da177e4c3f4

7ab02af428c2
dac853ae8904
b88fae644e5e

7ab02af428c2


221af7f87b97






1b5d783c94c3

496ad9aa8ef4
1b5d783c94c3



221af7f87b97

221af7f87b97
1da177e4c3f4

1da177e4c3f4

8e96e3b7b840
e579d2c259be
d6e711448137
6c5d523826dc
d6e711448137
e041e328c4b4
82b897782d10
1da177e4c3f4
0551fbd29e16





a6f76f23d297
8e96e3b7b840

d2d56c5f5102
1b5d783c94c3



1da177e4c3f4



1da177e4c3f4
1da177e4c3f4
6a6d27de340c
1da177e4c3f4
221af7f87b97
1da177e4c3f4
a6f76f23d297
a2a8474c3fff






9b1bf12d5d51
a2a8474c3fff





9b1bf12d5d51
a2a8474c3fff


c4ad8f98bef7
a2a8474c3fff


9b1bf12d5d51
a2a8474c3fff

63e46b95e9ea



b66c59840175


a2a8474c3fff


b66c59840175











a2a8474c3fff
a6f76f23d297







2976b10f05bd








a2a8474c3fff

a6f76f23d297
a2a8474c3fff

a6f76f23d297
9b1bf12d5d51
a6f76f23d297




9b1bf12d5d51
a6f76f23d297

9e00cdb091b0
a6f76f23d297
0bf2f3aec547
f1191b50ec11
a6f76f23d297
4b9d33e6d83c





a6f76f23d297
259e5e6c75a9






83f62a2eacb1
0bf2f3aec547
2a4419b5b2a7
437f7fdb607f
83f62a2eacb1
0bf2f3aec547

0bf2f3aec547
437f7fdb607f
0bf2f3aec547
9e00cdb091b0
a6f76f23d297
9e00cdb091b0

2a4419b5b2a7
a6f76f23d297

9e00cdb091b0

1da177e4c3f4
a6f76f23d297

1da177e4c3f4


72c2d5319200

1da177e4c3f4

1da177e4c3f4
a6f76f23d297


1da177e4c3f4
259e5e6c75a9
3cdf5b45ffba


1da177e4c3f4

a6f76f23d297

1da177e4c3f4








a6f76f23d297

1da177e4c3f4



a6f76f23d297
1da177e4c3f4

a6f76f23d297
1da177e4c3f4
a6f76f23d297

1da177e4c3f4



4fc75ff4816c




b6a2fea39318
1da177e4c3f4
b6a2fea39318



4fc75ff4816c
b6a2fea39318

1da177e4c3f4
b6a2fea39318






e8e3c3d66fd9
4fc75ff4816c
b6a2fea39318


4fc75ff4816c
e8e3c3d66fd9
b6a2fea39318
4fc75ff4816c
b6a2fea39318


4fc75ff4816c
b6a2fea39318


4fc75ff4816c
b6a2fea39318

1da177e4c3f4
1da177e4c3f4

cb7b6b1cbc20
1da177e4c3f4


3c456bfc4ba6
1da177e4c3f4
cb7b6b1cbc20
1da177e4c3f4
cb7b6b1cbc20
1da177e4c3f4
d74026986702
131b2f9f1214
d74026986702

1da177e4c3f4



1da177e4c3f4
cb7b6b1cbc20








6b3c538f5b2c

1da177e4c3f4
cb7b6b1cbc20
1da177e4c3f4
cb7b6b1cbc20

1da177e4c3f4
cb7b6b1cbc20

6b3c538f5b2c
cb7b6b1cbc20


4e0621a07ea5

cb7b6b1cbc20



1da177e4c3f4

1da177e4c3f4

5d1baf3b63bf












3eaded86ac3e
5d1baf3b63bf

9beb266f2d7e
5d1baf3b63bf




1da177e4c3f4


c4ad8f98bef7
ba2d01629d0d
835ab32dff6b
1da177e4c3f4


3b1253880b7a
1da177e4c3f4
72fa59970f86
c4ad8f98bef7


72fa59970f86






bd9d43f47d69
72fa59970f86






1da177e4c3f4
3b1253880b7a
fd8328be874f


1da177e4c3f4
11b0b5abb209
1da177e4c3f4
fd8328be874f
1da177e4c3f4
a2a8474c3fff

a6f76f23d297
498052bba55e
9e00cdb091b0
a2a8474c3fff
a6f76f23d297
c4ad8f98bef7
1da177e4c3f4

498052bba55e
1da177e4c3f4


1da177e4c3f4
c4ad8f98bef7
1da177e4c3f4
b6a2fea39318

63e46b95e9ea
1da177e4c3f4
b6a2fea39318
1da177e4c3f4
a6f76f23d297
1da177e4c3f4
b6a2fea39318
1da177e4c3f4
1da177e4c3f4


















5d1baf3b63bf
a6f76f23d297

1da177e4c3f4
a6f76f23d297
498052bba55e
f9ce1f1cda8b
a6f76f23d297
82727018b0d3
a6f76f23d297
c4ad8f98bef7
a6f76f23d297


1da177e4c3f4
a6f76f23d297
3c77f8457221



1da177e4c3f4
498052bba55e
9e00cdb091b0
f9ce1f1cda8b
a6f76f23d297

08a6fac1c632
1da177e4c3f4
fd8328be874f
3b1253880b7a

1da177e4c3f4
c4ad8f98bef7
1da177e4c3f4


c4ad8f98bef7
ba2d01629d0d
da3d4c5fa562
ba2d01629d0d
0e028465d18b

835ab32dff6b
0e028465d18b


c4ad8f98bef7
38b983b3461e
d03d26e58fde
0e028465d18b








835ab32dff6b
ba2d01629d0d
0e028465d18b
ba2d01629d0d
964ee7df90d7
1da177e4c3f4
801460d0cf5c



1da177e4c3f4
801460d0cf5c
964ee7df90d7

1da177e4c3f4
1da177e4c3f4

6c5d523826dc
7288e1187ba9
6c5d523826dc


abacd2fe3ca1

7288e1187ba9


abacd2fe3ca1

7288e1187ba9
abacd2fe3ca1
6c5d523826dc
6c5d523826dc
38b983b3461e




c4ad8f98bef7
38b983b3461e

625b1d7e812d


38b983b3461e
c4ad8f98bef7
38b983b3461e

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617























                                                                           

                       
                          
                     
                           

                        
                       
                         
                       
                          
                             




                              
                          
                                

                         


                           
                              
                          
                        
                            
                       
                           
                            
                            
                      
                         


                            
                    

                              
                     
 

                               

                      
                          

                                  
                                                             
 
                     

                                       
                                 

                                                   
                                   

 
                                 
 
                                                 
 
                                 
                           
                                   








                                                        
                    





                                                                         
                                                     
 
                                 
                          
                                                
                                 


                                                                   

                                              
          
 


                         
                                                          


                              


                         
                                               

                          
                        
                                                     
                          
 
                            
 
                         
 





                                                 
                                          




                                              
         
                                  
     


                     
 
                                 
 
                 





                                                                    
                                                                         







                                                    
                                               

 
                                                                              






                           
                                                       









                                                    
                                                                             

                                    

                                                      





                                                                        







                                                                                
                                             
                                                                          




























                                                                        
                




                                                                        
                               









                                                                             
                                                                 

                                                
                                                                                  
                                                            
                                             
 
                                        
                
                         


                                        
                                               
                 
    


                                             









                                                              
                                                                                


 
                                                                              


























































                                                                               
                                                  



























                                            
                     





                                                        
                                                   

              


                                                                            
 







                                                           
 




                                                   

                                        
                      

 


                                                      
                                                   


                  
                                      
                          
                                                                         
 

                                      



                                               
                                     
                                              
                            


                                                          






                                       


                                                                               
   
                                                           
                                                  


                                         
                               


                            
                                       


                                  


                                                   
                                 
 





                                                        
                                 
 
                                                            
                              

                               

                                 
                                                  
 



                                                            

                                       
                                                 















                                                                         
                                            
                                                     

                                                 
 

                                                                               
                                                             

                                                                   

                                                           

                                                                         
                         
                                                                               


                                              



                 

                                                       
                                     

                                           





                                                                     
                                                            
                                                  


                                      
                                    
                                                                         

          
                          
                                           
                      
 

                 


                                   
 
  


                                                                               
  





                                                                        
   
                                                                           

                                          




                                                    
                              
 
                                    
 









                                                               

                                                                     





                                                                
                                                                      


                               
                                                     



                                                                           
                                                               
                                                                                       






                                                                               
                                                                 
                                                                                       
         
                                                 

          
                                                                  



                                                                 

 



                                                                             



                                              

                                  
                                           



                                               


                                   

                           
                              
                                              

                                            
 


                                                                        
 
                                                        
 


                                                 
     

                                                




                                                                               


                                              
                                

      
                         

                                            
 
                                  
                                  










                                                                          
                                              









                                                                    

                                        

         


                                                                            
                                                                      





                                                             
                           



                                                        
     



                                                          
      
                                           




                                            
                                
                   
 

                               

                       
                                                       
 
                          
                


                                                                   

                                              
          
 
                                                              
                         


                         
                                               
                          
 

                                                     
 
                            
 
                                      

                          
 
    

                    

                   

                            





                                               

                         

                                                 














                                                                     

                                                                                
                                                                     





                                                     


                                          
                                             






                                                                         
                                    



                                                                       
                                                            

                                             
                                                   








                                                   

                                     
                         

                                           
                                            
                                                                    
                                             












                                                                         
                                             

                                                
                                                         
                                                
 
                                    



                                                      
           
                            
                                     




                                                          

                               
 
                                   


                                                   
 
                                   
                                                   

                                      

                                                          

                                    






                                                                        
                                        
                                                               
 
                                                               
                          
                                                      


                                                       
                                                           
                                                         
                                                    
                                   

                                                                  
                 
 









                                                                           
                                                     
                                                               
 

                                                        





                                                                

                                                                           

                                                                             

                                                                
                                       
                                                               

                                                        
 
                                                              
                                                                   
 

                                           
 
                                           
                                         


                                                          







                                                                            
                                                 
                                            

                                     
         
 

                                    

                


                                              
                          
                               
 

                                                   
                  

                                                                    
                   



                                                                          





                                                              
                                                             


                                                  
                                              

         
                                          
                 







                                                                
 
 
                                                       




                                                            
                   
 
                                 
 




                                                                             
                                                                         

                       
                                    

                                                   
                                   



                                              
                   








                                                              
                                              
          

                                            
                               

                                     
                         

                                                                
 
                        

                                                                         


                                                 






                              

                                                             
                                                             



                                                                   

                                               
                                           

                                            

                                                      
                                                                                           
                                                          
            
                                                         
 
                          
                                                                  
 





                                                                           
                                         

                                                       
                                           



                                                                      



                                                                          
                                
                                          
                                         
 
                              
 
  






                                                                  
                                                                         





                                          
                                                         


                       
                                                


                             
                                                                 

                                        



                                               


                                                      


                    











                                                               
  







                                                  








                                                        

                                                                          
                                                                        

                                                               
                                            
                                                         




                                                           
                                                               

                  
                                                        
 
                                            
                      
 





                                                              
 






                                                                            
              
                 
                                
                        
                                 

                                   
         
                          
 
                                
                                                 

                                   
                                  

 

                                            
                                                                     

                                                                             


                                             

                                                     

                   
 


                                                                      
 
                                                                


                                                                  

                                     

                                                              








                                                                          

                                                              



                                          
                                               

                              
                                
 

                                                                      



                              




                                                                     
                                              
 



                             
 

                         
 






                                                      
                                          
 


                                                           
 
                                     
                                   
 


                                                                         
 


                     
 

                   
 

                               
                                                                             


                                                                           
                                                    
 
                                                     
                                 
                   
 
                                                                          
                                      

                              



                                           
                         








                                                 

                                                             
                                        
                                      
                 

                                        
         

                                  
                                               


                                                                         

                                                                                  



                                   

                      

                                     












                                                                                
                                 

                                                                 
                                             




                   


                                       
                                                      
                                                         
                                                         


                                  
                                       
                   
 


                                         






                                                                          
                                                                             






                                                                           
 
                                           


                             
                         
                                                  
                  
                               
 

                                          
                              
 
                                
                               
 
                                      

                               
                                


                     
                          
                                                       
 

                                    
                                
 
                                                  
                                      
                         
 
                                                  
                                      


















                                                               
                                   

                         
 
                              
                                 
                               
                                       
                                
                        
                          


                                            
 
    



                                       
 
           
                                 
                               

         
                        
 
          

                                              
        
                          


                      
                                        
                                                
                                                
 

                                                            
                                                      


                    
                                                      
                                           
                                           








                                     
                                                      
 
      
 
                                         
 



                                               
 
                         

                                          
 

                          
  
                                                              


                                                  

                               


                                                      

                                             
                                                         
                                                       
 
 




                                                        
                                                        

                    


                                                             
 
                                                               

      
/*
 *  linux/fs/exec.c
 *
 *  Copyright (C) 1991, 1992  Linus Torvalds
 */

/*
 * #!-checking implemented by tytso.
 */
/*
 * Demand-loading implemented 01.12.91 - no need to read anything but
 * the header into memory. The inode of the executable is put into
 * "current->executable", and page faults do the actual loading. Clean.
 *
 * Once more I can proudly say that linux stood up to being changed: it
 * was less than 2 hours work to get demand-loading completely implemented.
 *
 * Demand loading changed July 1993 by Eric Youngdale.   Use mmap instead,
 * current->executable is only used by the procfs.  This allows a dispatch
 * table to check for several different types  of binary formats.  We keep
 * trying until we recognize the file or we run out of supported binary
 * formats. 
 */

#include <linux/slab.h>
#include <linux/file.h>
#include <linux/fdtable.h>
#include <linux/mm.h>
#include <linux/vmacache.h>
#include <linux/stat.h>
#include <linux/fcntl.h>
#include <linux/swap.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/pagemap.h>
#include <linux/perf_event.h>
#include <linux/highmem.h>
#include <linux/spinlock.h>
#include <linux/key.h>
#include <linux/personality.h>
#include <linux/binfmts.h>
#include <linux/utsname.h>
#include <linux/pid_namespace.h>
#include <linux/module.h>
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/tsacct_kern.h>
#include <linux/cn_proc.h>
#include <linux/audit.h>
#include <linux/tracehook.h>
#include <linux/kmod.h>
#include <linux/fsnotify.h>
#include <linux/fs_struct.h>
#include <linux/pipe_fs_i.h>
#include <linux/oom.h>
#include <linux/compat.h>

#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/tlb.h>

#include <trace/events/task.h>
#include "internal.h"

#include <trace/events/sched.h>

int suid_dumpable = 0;

static LIST_HEAD(formats);
static DEFINE_RWLOCK(binfmt_lock);

void __register_binfmt(struct linux_binfmt * fmt, int insert)
{
	BUG_ON(!fmt);
	if (WARN_ON(!fmt->load_binary))
		return;
	write_lock(&binfmt_lock);
	insert ? list_add(&fmt->lh, &formats) :
		 list_add_tail(&fmt->lh, &formats);
	write_unlock(&binfmt_lock);
}

EXPORT_SYMBOL(__register_binfmt);

void unregister_binfmt(struct linux_binfmt * fmt)
{
	write_lock(&binfmt_lock);
	list_del(&fmt->lh);
	write_unlock(&binfmt_lock);
}

EXPORT_SYMBOL(unregister_binfmt);

static inline void put_binfmt(struct linux_binfmt * fmt)
{
	module_put(fmt->module);
}

#ifdef CONFIG_USELIB
/*
 * Note that a shared library must be both readable and executable due to
 * security reasons.
 *
 * Also note that we take the address to load from from the file itself.
 */
SYSCALL_DEFINE1(uselib, const char __user *, library)
{
	struct linux_binfmt *fmt;
	struct file *file;
	struct filename *tmp = getname(library);
	int error = PTR_ERR(tmp);
	static const struct open_flags uselib_flags = {
		.open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC,
		.acc_mode = MAY_READ | MAY_EXEC | MAY_OPEN,
		.intent = LOOKUP_OPEN,
		.lookup_flags = LOOKUP_FOLLOW,
	};

	if (IS_ERR(tmp))
		goto out;

	file = do_filp_open(AT_FDCWD, tmp, &uselib_flags);
	putname(tmp);
	error = PTR_ERR(file);
	if (IS_ERR(file))
		goto out;

	error = -EINVAL;
	if (!S_ISREG(file_inode(file)->i_mode))
		goto exit;

	error = -EACCES;
	if (file->f_path.mnt->mnt_flags & MNT_NOEXEC)
		goto exit;

	fsnotify_open(file);

	error = -ENOEXEC;

	read_lock(&binfmt_lock);
	list_for_each_entry(fmt, &formats, lh) {
		if (!fmt->load_shlib)
			continue;
		if (!try_module_get(fmt->module))
			continue;
		read_unlock(&binfmt_lock);
		error = fmt->load_shlib(file);
		read_lock(&binfmt_lock);
		put_binfmt(fmt);
		if (error != -ENOEXEC)
			break;
	}
	read_unlock(&binfmt_lock);
exit:
	fput(file);
out:
  	return error;
}
#endif /* #ifdef CONFIG_USELIB */

#ifdef CONFIG_MMU
/*
 * The nascent bprm->mm is not visible until exec_mmap() but it can
 * use a lot of memory, account these pages in current->mm temporary
 * for oom_badness()->get_mm_rss(). Once exec succeeds or fails, we
 * change the counter back via acct_arg_size(0).
 */
static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages)
{
	struct mm_struct *mm = current->mm;
	long diff = (long)(pages - bprm->vma_pages);

	if (!mm || !diff)
		return;

	bprm->vma_pages = pages;
	add_mm_counter(mm, MM_ANONPAGES, diff);
}

static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
		int write)
{
	struct page *page;
	int ret;

#ifdef CONFIG_STACK_GROWSUP
	if (write) {
		ret = expand_downwards(bprm->vma, pos);
		if (ret < 0)
			return NULL;
	}
#endif
	ret = get_user_pages(current, bprm->mm, pos,
			1, write, 1, &page, NULL);
	if (ret <= 0)
		return NULL;

	if (write) {
		unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start;
		struct rlimit *rlim;

		acct_arg_size(bprm, size / PAGE_SIZE);

		/*
		 * We've historically supported up to 32 pages (ARG_MAX)
		 * of argument strings even with small stacks
		 */
		if (size <= ARG_MAX)
			return page;

		/*
		 * Limit to 1/4-th the stack size for the argv+env strings.
		 * This ensures that:
		 *  - the remaining binfmt code will not run out of stack space,
		 *  - the program will have a reasonable amount of stack left
		 *    to work from.
		 */
		rlim = current->signal->rlim;
		if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur) / 4) {
			put_page(page);
			return NULL;
		}
	}

	return page;
}

static void put_arg_page(struct page *page)
{
	put_page(page);
}

static void free_arg_page(struct linux_binprm *bprm, int i)
{
}

static void free_arg_pages(struct linux_binprm *bprm)
{
}

static void flush_arg_page(struct linux_binprm *bprm, unsigned long pos,
		struct page *page)
{
	flush_cache_page(bprm->vma, pos, page_to_pfn(page));
}

static int __bprm_mm_init(struct linux_binprm *bprm)
{
	int err;
	struct vm_area_struct *vma = NULL;
	struct mm_struct *mm = bprm->mm;

	bprm->vma = vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
	if (!vma)
		return -ENOMEM;

	down_write(&mm->mmap_sem);
	vma->vm_mm = mm;

	/*
	 * Place the stack at the largest stack address the architecture
	 * supports. Later, we'll move this to an appropriate place. We don't
	 * use STACK_TOP because that can depend on attributes which aren't
	 * configured yet.
	 */
	BUILD_BUG_ON(VM_STACK_FLAGS & VM_STACK_INCOMPLETE_SETUP);
	vma->vm_end = STACK_TOP_MAX;
	vma->vm_start = vma->vm_end - PAGE_SIZE;
	vma->vm_flags = VM_SOFTDIRTY | VM_STACK_FLAGS | VM_STACK_INCOMPLETE_SETUP;
	vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
	INIT_LIST_HEAD(&vma->anon_vma_chain);

	err = insert_vm_struct(mm, vma);
	if (err)
		goto err;

	mm->stack_vm = mm->total_vm = 1;
	up_write(&mm->mmap_sem);
	bprm->p = vma->vm_end - sizeof(void *);
	return 0;
err:
	up_write(&mm->mmap_sem);
	bprm->vma = NULL;
	kmem_cache_free(vm_area_cachep, vma);
	return err;
}

static bool valid_arg_len(struct linux_binprm *bprm, long len)
{
	return len <= MAX_ARG_STRLEN;
}

#else

static inline void acct_arg_size(struct linux_binprm *bprm, unsigned long pages)
{
}

static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
		int write)
{
	struct page *page;

	page = bprm->page[pos / PAGE_SIZE];
	if (!page && write) {
		page = alloc_page(GFP_HIGHUSER|__GFP_ZERO);
		if (!page)
			return NULL;
		bprm->page[pos / PAGE_SIZE] = page;
	}

	return page;
}

static void put_arg_page(struct page *page)
{
}

static void free_arg_page(struct linux_binprm *bprm, int i)
{
	if (bprm->page[i]) {
		__free_page(bprm->page[i]);
		bprm->page[i] = NULL;
	}
}

static void free_arg_pages(struct linux_binprm *bprm)
{
	int i;

	for (i = 0; i < MAX_ARG_PAGES; i++)
		free_arg_page(bprm, i);
}

static void flush_arg_page(struct linux_binprm *bprm, unsigned long pos,
		struct page *page)
{
}

static int __bprm_mm_init(struct linux_binprm *bprm)
{
	bprm->p = PAGE_SIZE * MAX_ARG_PAGES - sizeof(void *);
	return 0;
}

static bool valid_arg_len(struct linux_binprm *bprm, long len)
{
	return len <= bprm->p;
}

#endif /* CONFIG_MMU */

/*
 * Create a new mm_struct and populate it with a temporary stack
 * vm_area_struct.  We don't have enough context at this point to set the stack
 * flags, permissions, and offset, so we use temporary values.  We'll update
 * them later in setup_arg_pages().
 */
static int bprm_mm_init(struct linux_binprm *bprm)
{
	int err;
	struct mm_struct *mm = NULL;

	bprm->mm = mm = mm_alloc();
	err = -ENOMEM;
	if (!mm)
		goto err;

	err = init_new_context(current, mm);
	if (err)
		goto err;

	err = __bprm_mm_init(bprm);
	if (err)
		goto err;

	return 0;

err:
	if (mm) {
		bprm->mm = NULL;
		mmdrop(mm);
	}

	return err;
}

struct user_arg_ptr {
#ifdef CONFIG_COMPAT
	bool is_compat;
#endif
	union {
		const char __user *const __user *native;
#ifdef CONFIG_COMPAT
		const compat_uptr_t __user *compat;
#endif
	} ptr;
};

static const char __user *get_user_arg_ptr(struct user_arg_ptr argv, int nr)
{
	const char __user *native;

#ifdef CONFIG_COMPAT
	if (unlikely(argv.is_compat)) {
		compat_uptr_t compat;

		if (get_user(compat, argv.ptr.compat + nr))
			return ERR_PTR(-EFAULT);

		return compat_ptr(compat);
	}
#endif

	if (get_user(native, argv.ptr.native + nr))
		return ERR_PTR(-EFAULT);

	return native;
}

/*
 * count() counts the number of strings in array ARGV.
 */
static int count(struct user_arg_ptr argv, int max)
{
	int i = 0;

	if (argv.ptr.native != NULL) {
		for (;;) {
			const char __user *p = get_user_arg_ptr(argv, i);

			if (!p)
				break;

			if (IS_ERR(p))
				return -EFAULT;

			if (i >= max)
				return -E2BIG;
			++i;

			if (fatal_signal_pending(current))
				return -ERESTARTNOHAND;
			cond_resched();
		}
	}
	return i;
}

/*
 * 'copy_strings()' copies argument/environment strings from the old
 * processes's memory to the new process's stack.  The call to get_user_pages()
 * ensures the destination page is created and not swapped out.
 */
static int copy_strings(int argc, struct user_arg_ptr argv,
			struct linux_binprm *bprm)
{
	struct page *kmapped_page = NULL;
	char *kaddr = NULL;
	unsigned long kpos = 0;
	int ret;

	while (argc-- > 0) {
		const char __user *str;
		int len;
		unsigned long pos;

		ret = -EFAULT;
		str = get_user_arg_ptr(argv, argc);
		if (IS_ERR(str))
			goto out;

		len = strnlen_user(str, MAX_ARG_STRLEN);
		if (!len)
			goto out;

		ret = -E2BIG;
		if (!valid_arg_len(bprm, len))
			goto out;

		/* We're going to work our way backwords. */
		pos = bprm->p;
		str += len;
		bprm->p -= len;

		while (len > 0) {
			int offset, bytes_to_copy;

			if (fatal_signal_pending(current)) {
				ret = -ERESTARTNOHAND;
				goto out;
			}
			cond_resched();

			offset = pos % PAGE_SIZE;
			if (offset == 0)
				offset = PAGE_SIZE;

			bytes_to_copy = offset;
			if (bytes_to_copy > len)
				bytes_to_copy = len;

			offset -= bytes_to_copy;
			pos -= bytes_to_copy;
			str -= bytes_to_copy;
			len -= bytes_to_copy;

			if (!kmapped_page || kpos != (pos & PAGE_MASK)) {
				struct page *page;

				page = get_arg_page(bprm, pos, 1);
				if (!page) {