forked from ibm-power-utilities/librtas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangelog
1012 lines (727 loc) · 40.2 KB
/
Changelog
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
Changelog for librtas-2.0.4
=======================================
commit 33aa9aee37cfc4bdc93ba4aff25afb962b6a7606
Author: Tyrel Datwyler <[email protected]>
Date: Mon Jan 23 11:48:23 2023 -0800
ci: rev Ubuntu action runner from 20.04 -> 22.04
Move from previous LTS release to the latest LTS release. This has the
benefit of also moving gcc-toolchain from gcc-10 -> gcc-11.
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 44d189b070eb04af6d237d52084e703327ea6243
Author: Nathan Lynch <[email protected]>
Date: Tue Aug 2 15:39:02 2022 -0500
rtas_platform_dump: fix uninitialized use of local variable
The Clang Static Analyzer correctly identifies an uninitialized use:
librtas_src/syscall_calls.c:930:6: warning: Branch condition evaluates to a
garbage value [core.uninitialized.Branch]
if (kernbuf)
^~~~~~~
When rtas_platform_dump() is called with a NULL buffer argument,
rtas_free_rmo_buffer() is called with a stack garbage value for the buffer
address, which is ultimately passed to munmap().
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 1116a74b8ed01722957098eb934c0a8c186e2b27
Author: Nathan Lynch <[email protected]>
Date: Mon Aug 1 09:52:51 2022 -0500
configure.ac: discard LOCAL_CHECK_FLAGS
As pointed out by Thomas Petazzoni, unconditionally setting build flags in
this manner is problematic for downstreams, potentially conflicting with
distribution policies.
Drop LOCAL_CHECK_FLAGS and associated m4 code, preserving -Wall in
AM_CFLAGS. This leaves m4/ empty, but removing altogether provokes a
warning from autoreconf, so leave an empty file in the directory.
Fixes #25.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 7e2216265ce2621e48036f4dcd2ea23b032d7eb5
Author: Nathan Lynch <[email protected]>
Date: Wed Jul 13 15:01:33 2022 -0500
update .gitignore
'git status' in a built tree gives:
Untracked files:
(use "git add <file>..." to include in what will be committed)
config.h
config.h.in
librtas.la
librtas_src/ofdt.lo
librtas_src/syscall_calls.lo
librtas_src/syscall_rmo.lo
librtasevent.la
librtasevent_src/get_rtas_event.lo
librtasevent_src/print_rtas_event.lo
librtasevent_src/rtas_cpu.lo
librtasevent_src/rtas_dump.lo
librtasevent_src/rtas_epow.lo
librtasevent_src/rtas_hotplug.lo
librtasevent_src/rtas_io.lo
librtasevent_src/rtas_lri.lo
librtasevent_src/rtas_mem.lo
librtasevent_src/rtas_post.lo
librtasevent_src/rtas_sp.lo
librtasevent_src/rtas_srcfru.lo
librtasevent_src/rtas_v6_misc.lo
librtasevent_src/rtas_vend.lo
libtool
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
stamp-h1
Ideally 'git status' should not report any untracked files after a build.
This reduces the likelihood of accidentally checking in build outputs when
making changes.
Update .gitignore. Add things that aren't ignored but should be,
remove irrelevant patterns, remove comments which don't match current
practice (the git ls-files.. command just gives an error).
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit b51c540e15d00ec0e079d55d83e97ebc9c08fece
Author: Nathan Lynch <[email protected]>
Date: Thu Feb 17 08:27:35 2022 -0600
librtas: drop inline function attributes
There's no real need to specify inline on file-static functions in this
code. The compiler will inline these as it sees fit.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 29ad6be0b4a595441c3093457aaa7432d38ba4be
Author: Nathan Lynch <[email protected]>
Date: Fri Feb 18 08:09:47 2022 -0600
use AC_CONFIG_SRCDIR
This allows configure to verify that the specified source directory
actually contains the project source code.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit ad5868616777037350c2abd720dc547c6141bb52
Author: Nathan Lynch <[email protected]>
Date: Wed Feb 16 16:45:12 2022 -0600
drop AM_PROG_AR
$(AR) isn't used in our build system, so this isn't needed.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 755943eb5d8fabb11977b1d690187f51342328d9
Author: Nathan Lynch <[email protected]>
Date: Wed Feb 16 16:28:47 2022 -0600
drop AC_CANONICAL_TARGET
In autoconf parlance, "target" refers to the type of system for which any
compiler tools in the package produce code. No compiler-like tools here,
drop it.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit e473e2991f4a69438f618aa1c8e55d2f65229a4f
Author: Nathan Lynch <[email protected]>
Date: Wed Feb 16 10:21:26 2022 -0600
remove position-independent executable flags
Seems odd to specify -fPIE, -pie at the top level for a library project.
Libtool takes care of adding -fPIC where it's appropriate.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit a0d932bbbdf23999c6e2d13a5a3b9e796b470263
Author: Nathan Lynch <[email protected]>
Date: Wed Feb 16 09:53:11 2022 -0600
drop redundant ssp-buffer-size specification
It appears that setting ssp-buffer-size to the minimum changes the code
emitted with -fstack-protector but not -fstack-protector-strong or
-fstack-protector-all. We're using -fstack-protector-all so our use of
--param=ssp-buffer-size=1 is redundant.
Examples/background:
https://bugzilla.redhat.com/show_bug.cgi?id=1105456
https://lore.kernel.org/all/[email protected]
https://lwn.net/Articles/584225/
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit f30ebfe896de3712b922fe8a26444bfd29497da4
Author: Nathan Lynch <[email protected]>
Date: Thu Feb 10 13:19:20 2022 -0600
use AM_CPPFLAGS for include directives
Preprocessor search paths are more appropriately set in AM_CPPFLAGS than
AM_CFLAGS.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 05c043f59d2cae5378a705c1d674c9bad432643b
Author: Nathan Lynch <[email protected]>
Date: Thu Feb 17 08:36:31 2022 -0600
require Autoconf 2.69
Autoscan suggests requiring a minimum version of 2.69, which is a decade
old as of this writing. All Linux distributions we care about supporting
satisfy this.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit ee8ed1384b15f24df83f3c9de6eabcac03a2d698
Author: Nathan Lynch <[email protected]>
Date: Fri Feb 18 08:50:32 2022 -0600
drop useless librtas.pc
It's impossible that anyone actually uses the librtas.pc generated by the
build since all the flags are completely wrong and don't match the library
name(s) or the installed header paths.
We don't use pkg-config to configure dependencies during our build so we
can drop PKG_PROG_PKG_CONFIG from configure.ac as well.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
Changelog for librtas-2.0.3
=======================================
commit c8a4104ac76ceb0eb61d36c6a1b6043ec92e2eb3
Author: Than Ngo <[email protected]>
Date: Thu Mar 25 16:13:20 2021 +0100
librtasevent: Fix coverity issues found by Covscan
Error: RESOURCE_LEAK (CWE-772): [#def1]
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.]
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:242: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to.
240|
241| if (!src_subscns_included(src))
242|-> return 0;
243|
244| rtas_copy( (char *) src_raw + RE_SRC_SCN_SZ + 4, re, RE_SRC_SUBSCN_SZ);
Error: RESOURCE_LEAK (CWE-772): [#def2]
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.]
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:244: noescape: Resource "(char *)src_raw + 80 + 4" is not freed or pointed-to in "rtas_copy".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:263: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to.
261| cleanup_rtas_event(re);
262| errno = ENOMEM;
263|-> return 1;
264| }
265|
Error: RESOURCE_LEAK (CWE-772): [#def3]
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:259: alloc_fn: Storage is returned from allocation function "malloc".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:259: var_assign: Assigning: "fru" = storage returned from "malloc(120UL)".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:266: noescape: Resource "fru" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.]
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:269: noescape: Resource "fru" is not freed or pointed-to in "parse_fru_scn".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:291: leaked_storage: Variable "fru" going out of scope leaks the storage it points to.
289| if (cur_fruhdr == NULL) {
290| cleanup_rtas_event(re);
291|-> return -1;
292| }
293|
Error: RESOURCE_LEAK (CWE-772): [#def4]
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.]
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:244: noescape: Resource "(char *)src_raw + 80 + 4" is not freed or pointed-to in "rtas_copy".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:291: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to.
289| if (cur_fruhdr == NULL) {
290| cleanup_rtas_event(re);
291|-> return -1;
292| }
293|
Error: RESOURCE_LEAK (CWE-772): [#def5]
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.]
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:244: noescape: Resource "(char *)src_raw + 80 + 4" is not freed or pointed-to in "rtas_copy".
librtas-2.0.2/librtasevent_src/rtas_srcfru.c:312: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to.
310| } while (total_len < srcsub_len);
311|
312|-> return 0;
313| }
314|
Error: RESOURCE_LEAK (CWE-772): [#def6]
librtas-2.0.2/librtasevent_src/rtas_vend.c:104: alloc_fn: Storage is returned from allocation function "malloc".
librtas-2.0.2/librtasevent_src/rtas_vend.c:104: var_assign: Assigning: "ve" = storage returned from "malloc(40UL)".
librtas-2.0.2/librtasevent_src/rtas_vend.c:111: noescape: Resource "(char *)ve + 24UL" is not freed or pointed-to in "rtas_copy".
librtas-2.0.2/librtasevent_src/rtas_vend.c:119: leaked_storage: Variable "ve" going out of scope leaks the storage it points to.
117| if (ve->vendor_data == NULL) {
118| errno = ENOMEM;
119|-> return -1;
120| }
121|
Signed-off-by: Than Ngo <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 2d2ac80a3b413e0e7ad3ebb47426923a9bf39b33
Author: Nathan Lynch <[email protected]>
Date: Fri Feb 18 09:17:19 2022 -0600
ci: override CFLAGS in configure
Set CFLAGS to something fairly conventional and include -Werror so jobs
will fail on compiler warnings. For CI purposes this should be an
acceptable way to start enforcing a no new warnings policy.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 92d3fb040b25d931357a46f3d161e27d653caeb4
Author: Nathan Lynch <[email protected]>
Date: Fri Feb 18 09:25:25 2022 -0600
ci: make builds more verbose
While we're experimenting with the CI configuration (compiler flags etc)
we'll need the ability to inspect the exact commands used even in
successful builds. So, for now at least, use V=1 with our make invocations.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 4fc1d726c5db4412a43a01a0cc0e21069c05271f
Author: Nathan Lynch <[email protected]>
Date: Wed Feb 9 22:01:46 2022 -0600
librtas: fix printf format mismatches for 32-bit build
Several issues of this form:
Warning: librtas_src/syscall.h:68:11: warning: format ‘%lx’ expects
argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t’
{aka ‘long long unsigned int’} [-Wformat=]
68 | printf("librtas %s(): " _fmt, __func__, ##_args); \
| ^~~~~~~~~~~~~~~~
librtas_src/syscall_calls.c:516:2: note: in expansion of macro ‘dbg’
516 | dbg("(0x%x, 0x%lx, %d) = %d, 0x%x\n", config_addr, phb_id, func,
| ^~~
librtas_src/syscall_calls.c:516:18: note: format string is defined here
516 | dbg("(0x%x, 0x%lx, %d) = %d, 0x%x\n", config_addr, phb_id, func,
| ~~^
| |
| long unsigned int
| %llx
Convert this and others to PRIx64 to accommodate uint64_t.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 6e4535968b1667eca0569621d3c9f0fd234429de
Author: Nathan Lynch <[email protected]>
Date: Wed Feb 9 21:30:54 2022 -0600
librtasevent: fix 'taking address of packed member' warnings
Address the following warnings:
Warning: librtasevent_src/get_rtas_event.c:282:37: warning: taking address
of packed member of ‘struct rtas_event_exthdr_raw’ may result in an
unaligned pointer value [-Waddress-of-packed-member]
282 | parse_rtas_time(&rex_hdr->time, &rawhdr->time);
| ^~~~~~~~~~~~~
Warning: librtasevent_src/get_rtas_event.c:283:37: warning: taking address
of packed member of ‘struct rtas_event_exthdr_raw’ may result in an
unaligned pointer value [-Waddress-of-packed-member]
283 | parse_rtas_date(&rex_hdr->date, &rawhdr->date);
| ^~~~~~~~~~~~~
librtasevent_src/rtas_v6_misc.c: In function ‘parse_priv_hdr_scn’:
Warning: librtasevent_src/rtas_v6_misc.c:119:37: warning: taking address of
packed member of ‘struct rtas_priv_hdr_scn_raw’ may result in an unaligned
pointer value [-Waddress-of-packed-member]
119 | parse_rtas_date(&privhdr->date, &rawhdr->date);
| ^~~~~~~~~~~~~
Warning: librtasevent_src/rtas_v6_misc.c:120:37: warning: taking address of
packed member of ‘struct rtas_priv_hdr_scn_raw’ may result in an unaligned
pointer value [-Waddress-of-packed-member]
120 | parse_rtas_time(&privhdr->time, &rawhdr->time);
| ^~~~~~~~~~~~~
by passing the small "raw" date/time objects by value instead of taking their
addresses.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 5c207ca281b93e47a3f751fa1b6f1f610357a71d
Author: Nathan Lynch <[email protected]>
Date: Mon Jan 31 13:45:22 2022 -0600
ci: add GitHub Actions build tests
GitHub's hosted x86 Ubuntu runners have cross toolchains suitable for
building librtas for its targeted architectures. Add a matrix build
including these (32- and 64-bit big-endian, 64-bit little-endian) which
performs a basic build and distcheck.
Also perform a native x86 build since it "works": it produces nothing you
would want to run, but the build succeeds. If we are to add tests in the
future, running them as native code on the build host may be the best
option. So it's in our interest to keep the x86 build working.
Signed-off-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 6447b24d9f8d892e750b9517f7c136855967ea61
Author: Fabian Groffen <[email protected]>
Date: Mon May 24 10:06:54 2021 +0200
librtasevent: include endian.h for beXXtoh macros
In particular using musl libc, without this include, the calls to
be16toh/be32toh result in a compiler warning about an undefined symbol.
Since in musl these are actually implemented by macros, the symbols
remain undefined in the final shared library, making the library
unusable.
Issue: https://github.com/ibm-power-utilities/librtas/issues/10
Signed-off-by: Fabian Groffen <[email protected]>
Reviewed-by: Vasant Hegde <[email protected]>
Reviewed-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit 0bb5704e6452886f8d93ed905efe058f13e26a6a
Author: Andrew Donnellan <[email protected]>
Date: Sat Apr 25 00:32:57 2020 +1000
syscall_calls: fix typo in comment
Signed-off-by: Andrew Donnellan <[email protected]>
Reviewed-by: Nathan Lynch <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
commit f8a1f6df25263afc75cabb9c40ddb8e54cf086e3
Author: Tyrel Datwyler <[email protected]>
Date: Thu Dec 16 13:37:15 2021 -0800
librtasevent: Fix memory page address print issue
The logical resource address lo and hi fields are currently printed by rtas_dump
infering that their naming refers to significance when in fact they refer to the
bit numbering.
lri_mem_addr_lo == Memory Logical Address (bit 0-31)
lri_mem_addr_hi == Memory Logical Address (bit 32-64))
Hence rtas_dump command is printing the logical address output with those two
fields swapped.
This patch fixes rtas_lri_scn fields so that we get legitimate addresses.
Current output:
--------------
Logical Address: 2ab0a0000000014f
Correct output:
-------------
Logical Address: 0x0000014F2AB0A000
Signed-off-by: Vasant Hegde <[email protected]>
Reviewed-by: Nathan Lynch <[email protected]>
[tyreld: reworded commit message]
Signed-off-by: Tyrel Datwyler <[email protected]>
Changelog for librtas-2.0.2
=======================================
commit 26970c42bc017ad68b864e7134cf941c07443aa8
Author: Chris Engel <[email protected]>
Date: Tue Aug 22 14:59:06 2017 -0500
Interface for ibm,physical-attestation rtas call
The physical attestation interfaces are provided to allow a
trusted 3rd party client to retrieve information about the
trusted boot state of the target PowerVM system. This makes
use of the systems physical TPM(s). These TPM(s) are used
by system firmware to extend measurements during the
boot process.
Signed-off-by: Chris Engel <[email protected]>
Reviewed-by: Vasant Hegde <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
Changelog for librtas-2.0.1
=======================================
commit 7f841902eb50ca77c3aa884e3fd924c2bbd817ca
Author: Vasant Hegde <[email protected]>
Date: Mon Jun 13 09:33:57 2016 -0400
librtas: Fix endianess issue in errinjct rtas call
Unlike other RTAS calls, first output parameter of "ibm,open-errinjct"
is "open token", not status value.
With commit ee457b1c, we endedup calling be32toh twice for otoken and
didn't convert status from BE to host format.
This patch fixes above issue.
Fixes: ee457b1c (librtas: consolidate common actions in making a rtas call)
Signed-off-by: Vasant Hegde <[email protected]>
Signed-off-by: Nathan Fontenot <[email protected]>
Reviewed-by: Tyrel Datwyler <[email protected]>
commit e6f35aaee6ad1d674a1b0498e7144340f4abe926
Author: Michael Bringmann <[email protected]>
Date: Mon Jun 13 09:29:59 2016 -0400
librtas/configure.ac: Fix for builds on older distros
Fix problem generating configure script / Makefile on platforms/distros
that have versions of 'automake' older than 1.11.1.
Signed-off-by: Michael Bringmann <[email protected]/configure.ac: Fix for
Fix problem generating configure script / Makefile on platforms/distros
that have versions of 'automake' older than 1.11.1.
Signed-off-by: Michael Bringmann <[email protected]>
Acked-by: Stewart Smith <[email protected]>
commit ac6330c17bcbc955b9cb13d7073d89d3d87a3a50
Author: Nathan Fontenot <[email protected]>
Date: Wed May 18 16:43:14 2016 -0400
Correcting to add files that should have been added as part of
commit e0582a6af7c33e867edca.
Signed-off-by: Nathan Fontenot <[email protected]>
commit e0582a6af7c33e867edca882b28a1544d2ef08b4
Author: Stewart Smith <[email protected]>
Date: Wed May 11 13:26:51 2016 -0400
From: Signed-off-by: Stewart Smith <[email protected]>
Switch to modern autotools based build system
The patch removes the custom Makefiles and replaces them with a modern
autotools based build system.
In the process, several bugs are fixed and enhancements made:
- build dependencies are sorted out okay
- the makefiles are now much smaller
- make dist works
- make distcheck works
- out of source builds work
- autogenerating of version in spec file is much simpler
- configure script checks for needed functions, header files and types
- we now build with hardening gcc flags (if available)
- libraries are now properly .so versioned
- build+install is good for multiarch
- some rpmlint warnings fixed
- split rpm into librtas and librtas-devel
- provide pkg-config foo
Signed-off-by: Stewart Smith <[email protected]>
Signed-off-by: Nathan Fontenot <[email protected]>
Changelog for librtas-2.0.0
=======================================
commit da9f484ab2429525101432d57176f376576c3dac
Author: Adam Conrad <[email protected]>
Date: Tue Apr 5 04:11:23 2016 -0600
Modernize and parameterize the RPM specfile slightly.
Signed-off-by: Adam Conrad <[email protected]>
commit 9c1591cd262116290b5a651bc09192b6c34da9ce
Author: Adam Conrad <[email protected]>
Date: Tue Apr 5 01:38:33 2016 -0600
librtasevent: Fix build failure with -Wformat -Werror=format-security
Signed-off-by: Adam Conrad <[email protected]>
commit 2644f9d269be8b852aa024f1364a5199aac268db
Author: Adam Conrad <[email protected]>
Date: Tue Apr 5 01:35:51 2016 -0600
librtas*/Makefile: install/uninstall static libs
Signed-off-by: Adam Conrad <[email protected]>
commit f9bb81502e5fa3894caa1761292ec69580dc087e
Author: Adam Conrad <[email protected]>
Date: Tue Apr 5 01:30:41 2016 -0600
librtasevent: Generate static library.
Signed-off-by: Adam Conrad <[email protected]>
commit 2b43240db6fe721288bf09a6f2c75743ae4f8855
Author: Adam Conrad <[email protected]>
Date: Fri Apr 1 08:34:16 2016 -0600
Use MAJOR_NO to define the SONAME symlinks, instead of hardcoding "1"
Signed-off-by: Adam Conrad <[email protected]>
Changelog for librtas-1.4.1
=======================================
commit af07fde662985cb574fe56497847c4c6cdf1d1a8
Author: Vasant Hegde <[email protected]>
Date: Thu Mar 17 18:53:48 2016 -0400
librtas: Do not enable debug message by default
Commit eae18de3 removed dbg1 macro. But accidently enabled logging debug
message by default. This is confusing end users. Hence remove logging
debug message by default.
Fixes: eae18de3 (librtas: Update the dbg() macro)
Signed-off-by: Vasant Hegde <[email protected]>
CC: Nathan Fontenot <[email protected]>
commit c5e9dcf993e9e20bbe14bc06fb0ec6dd5031f935
Author: Vasant Hegde <[email protected]>
Date: Mon Feb 15 07:33:14 2016 -0500
librtas: Release lock in error path
Release RMO buffer lock in error path. Otherwise we will continue to hold
the lock and subsequent RMO buffer allocation request fails.
Reported-by: Bharata B Rao <[email protected]>
Signed-off-by: Vasant Hegde <[email protected]>
commit 9683c7b393d48922a14b09a898fbe3cf698cd71a
Author: Vasant Hegde <[email protected]>
Date: Wed Feb 10 16:15:19 2016 -0500
librtas: Fix Makefile
Commit 90f24679 switched package license from CPL to LGPL. But we forgot
to update Makefile. So creating tarball from source fails. This patch
replaces COPYRIGHT with COPYING.LESSER in Makefile.
Also updated Makefile header with proper license text.
Signed-off-by: Vasant Hegde <[email protected]>
Changelog for librtas-1.4.0
=======================================
commit 2a279559111e4f68ed270f28e21a042a97ad41cd
Author: Nathan Fontenot <[email protected]>
Date: Thu Jan 7 11:55:47 2016 -0500
Update README for correct contact information.
Signed-off-by: Nathan Fontenot <[email protected]>
commit 90f24679c795ea8224ba836994366dec31529663
Author: Nathan Fontenot <[email protected]>
Date: Thu Jan 7 11:19:33 2016 -0500
Switch librtas package to LGPL License.
Signed-off-by: Nathan Fontenot <[email protected]>
commit 5bbe4e9382b2e298227af13d1b600c59a5f1768b
Author: Rafael Fonseca <[email protected]>
Date: Tue Dec 15 15:06:10 2015 -0500
From: Rafael Fonseca <[email protected]>
Fix print formats for width-based types.
Signed-off-by: NAthan Fontenot <[email protected]>
commit 9d930daa58c3c6f2fc2fb6e82c005726d22ef8b5
Author: Rafael Fonseca <[email protected]>
Date: Tue Dec 15 14:58:20 2015 -0500
From: Rafael Fonseca <[email protected]>
Fix potential memory leaks
Signed-off-by: Nathan Fontenot <[email protected]>
commit 1d0ec08104077bcc4dd8f76524cb2493aaf04a60
Author: Sam Bobroff <[email protected]>
Date: Tue Dec 15 14:53:55 2015 -0500
librtasevent: correct files left after uninstall
Signed-off-by: Sam Bobroff <[email protected]>
Reviewed-by: Vasant Hegde <[email protected]>
commit 22b418b8758c60c9e250f495e2d58db2394ee3c4
Author: Sam Bobroff <[email protected]>
Date: Tue Dec 15 14:52:49 2015 -0500
librtas: correct files left after uninstall
Signed-off-by: Sam Bobroff <[email protected]>
Reviewed-by: Vasant Hegde <[email protected]>
commit 9c1403ab4da25db47fcdfa7cfa26c0b465e0a5ed
Author: Sam Bobroff <[email protected]>
Date: Tue Dec 15 14:50:02 2015 -0500
librtas: install librtas.so.1 symlink
Add a line to the librtas Makefile to create librtas.so.1 when
performing "make install". This matches the librtasevent.so.1 that is
already created.
This allows systems that rely on the existance of that link to
successfully build programs using librtas when it is installed
directly from the source.
Signed-off-by: Sam Bobroff <[email protected]>
commit 0afce7b27cc5e1581f7ec6c0acf3d7b3b6419b5b
Author: Nathan Fontenot <[email protected]>
Date: Tue Dec 15 14:46:54 2015 -0500
librtas: Correct multiple build warnings
Correct the warnings produced during the build of librtas.
Signed-off-by: Nathan Fontenot <[email protected]>
commit bb77762b4f3310854bdf07ef3fcebc01ddd0d798
Author: Nathan Fontenot <[email protected]>
Date: Tue Dec 15 14:37:17 2015 -0500
librtas: deprecate libofdt
The libofdt library is a project that was started a long time ago in
the hopes of providing a common infrastructure for accessing the device
tree. The code is mostly complete andd I really don't think there are
any users of it so I am proposing to deprecate the library.
Signed-off-by: Nathan Fontenot <[email protected]>
commit 015c0f95fc10e595cd1a90634ac831d93d9ba4e2
Author: Nathan Fontenot <[email protected]>
Date: Tue Dec 15 14:30:13 2015 -0500
librtas: coding style updates
Correct a few style issues to give the code a more consistant look.
No functional changes.
Signed-off-by: Nathan Fontenot <[email protected]>
commit 21de2c69433e23450d4fad4f9c48fbf8d2f5d04a
Author: Nathan Fontenot <[email protected]>
Date: Tue Dec 15 14:27:56 2015 -0500
librtas: Make SANITY_CHECKS() a real function
Make the SANITY_CHECKS() macro a regular function.
Signed-off-by: Nathan Fontenot <[email protected]>
commit e5451d028d6981728840e1960f2d1de90e994f60
Author: Nathan Fontenot <[email protected]>
Date: Tue Dec 15 14:24:53 2015 -0500
librtas: Move rtas_token() declaration to internal header
Move rtas_token decalration to internal header file.
Signed-off-by: Nathan Fontenot <[email protected]>
commit f06f03493a3f4c8e8cc5a96db857f0ba01a66e6c
Author: Nathan Fontenot <[email protected]>
Date: Tue Dec 15 14:23:41 2015 -0500
librtas: Remove declaration of open_proc_rtas_file()
Make the open_proc_rtas_file() routine static and remove its
declaration from librtas.h.
Signed-off-by: Nathan Fotnenot <[email protected]>
commit c01583d8bde5dd4c3e1ce7d0b4d5ced4008bffd4
Author: Nathan Fontenot <[email protected]>
Date: Tue Dec 15 14:21:45 2015 -0500
librtas: Move declaration of read_entire_file()
Move declaration of read_entire_file() to an internal header.
Signed-off-by: Nathan Fontenot <[email protected]>
commit 52222bf6c8fb1d3ce6fdf5ba7e97653771ea9843
Author: Nathan Fontenot <[email protected]>
Date: Tue Dec 15 14:19:14 2015 -0500
librtas: Break up the librtas_config struct
Break up the librtas_config struct into its two pieces and remove
the definitions from the public header.
Signed-off-by: Nathan Fontenot <[email protected]>
commit eae18de31155d109a0160485ee7d93bbdb32d2e0
Author: Thomas Falcon <[email protected]>
Date: Tue Dec 15 14:14:26 2015 -0500
librtas: Update the dbg() macro
Remove the useless indirect of dbg1() macro and move the definition
to an internal .h file.
Signed-off-by: Nathan Fontenot <[email protected]>
commit ee457b1c21bd913913243e54c5a7dca63d3545a4
Author: Nathan Fontenot <[email protected]>
Date: Tue Dec 15 14:11:16 2015 -0500
librtas: consolidate common actions in making a rtas call
Consolidate common actions, such as getting the rtas token and
handling extended delays, when making a rtas call into a routine.
This change presents to new ways to make a rtas call;
rtas_call() - Which handles any delays
rtas_call_no_delay() - Which does not handle any delays
The no delay variant was needed for the few instances where some work
needs to be done in between rtas calls when a delay occurs.
Signed-off-by: Nathan Fontenot <[email protected]>
commit 4b18e100dcf1672590aee49b2c1bbc15debee4a7
Author: Thomas Falcon <[email protected]>
Date: Tue Dec 15 13:54:45 2015 -0500
librtas: rtas calls fully implemented in syscalls
Since the procfs and common interfaces are being removed,
all rtas calls will be fully implemented in the syscall_calls.c
and syscall_rmo.c files.
Signed-off-by: Thomas Falcon <[email protected]>
commit 94efe8cb14637820af35bba555997d5bd5f92704
Author: Thomas Falcon <[email protected]>
Date: Tue Dec 15 13:25:40 2015 -0500
librtas: common.h merged into librtas.h
Code in common.h was added to librtas.h
Signed-off-by: Thomas Falcon <[email protected]>
commit 3bc2d9277c6ac6679f7ee308127f90255453d76e
Author: Thomas Falcon <[email protected]>
Date: Tue Dec 15 13:23:51 2015 -0500
librtas: removal of common code
The common files are being removed with the removal of procfs
in order to simplify librtas.
Signed-off-by: Thomas Falcon <[email protected]>
commit b8ad1ec918230379f612a4e976e74600660cebdc
Author: Thomas Falcon <[email protected]>
Date: Tue Dec 15 13:20:06 2015 -0500
librtas: removing procfs interface
The procfs interface is no longer used. As a result, it is being
removed to simplify librtas.
Signed-off-by: Thomas Falcon <[email protected]>
Changelog for librtas-1.3.14
=======================================
commit 4e46c718f42bf05e797c7fcfdd6cfc2a21fb4c91
Author: Tyrel Datwyler <[email protected]>
Date: Wed Jan 7 14:26:15 2015 -0500
PAPR requires that the status word is the first parameter in the return
buffer for rtas calls. Due to this requirement the librtas sc_rtas_call
function always performs a be32toh operation on the first parameter in the
return buffer. However, the ibm,open-errinjct rtas is special in that its
return buffer is switched. The "Open Token" is the first return parameter
while the "Status" word is second.
This patch fixes this special case in the sc_errinjct_open function such
that the byteswapping of "status" and "otoken" are handled correctly.
Signed-off-by: Tyrel Datwyler <[email protected]>
Changelog for librtas-1.3.13
=======================================
commit 1d54a4a346f9111e1326dfdec756fd78360add42
Author: Nathan Fontenot <[email protected]>
Date: Fri Oct 17 10:18:40 2014 -0400
When we pass _hi and _lo 32bits of a 64bit value, we
should convert the host endian value carefully.
i.e,
X_hi = htobe32(BITS32_HI(X))
X_lo = htobe32(BITS32_LO(X))
and not :
X_hi = BITS32_HI(htobe64(X))
NOTE: This patch is untested, but I believe this patch
is good to have than the current faulty conversion.
This patch fixes all such occurrences in librtas.
Signed-off-by: Suzuki K. Poulose <[email protected]>
commit e5541e1a5c83ce47cc492abcd7343d65763dcefe
Author: Nathan Fontenot <[email protected]>
Date: Fri Oct 17 10:17:28 2014 -0400
Use rpm macros for standard paths
Signed-off-by: Suzuki K. Poulose <[email protected]>
commit 8ef7f827e28e3cd284f6be5686a987786be7502d
Author: Nathan Fontenot <[email protected]>
Date: Fri Oct 17 10:16:16 2014 -0400
This patch fixes the conversion of args for paltform-dump call.
platform dump passes 64bit values as, a pair of 32bit values.
val_hi and val_lo. So when we convert a value 'X' to 32bit hi and lo
values in BE, we should follow the below approach :
X_hi = htobe32(BITS32_HI(X))
X_lo = htobe32(BITS32_LO(X))
and NOT
X_tmp = htobe64(X);
X_hi = BITS32_HI(X_tmp), X_lo = BITS32_LO(X_tmp)
This patch has been tested with rtas_errd/extract_platdump to retrieve a
dump from FSP.
Signed-off-by: Suzuki K. Poulose <[email protected]>
commit 52263814c46210b51e564748050299620726dfd1
Author: Nathan Fontenot <[email protected]>
Date: Fri Oct 17 10:12:54 2014 -0400
Fix LE parsing of SRC/FRU events
Signed-off-by: Thomas L Falcon <[email protected]>
Signed-off-by: Suzuki K. Poulose <[email protected]>
commit ac0a91d2730740cd279d80ccd4c83b0a04827d1d
Author: Nathan Fontenot <[email protected]>
Date: Fri Oct 17 10:10:29 2014 -0400
LE Support for SRC/FRU events
Signed-off-by: Nathan Fontenot <[email protected]>
Changelog for librtas-1.3.12
=======================================
commit 1f045d8df135cfdc232a49f0992ab60913c0b043
Author: Anshuman Khandual <[email protected]>
Date: Wed Aug 13 13:04:29 2014 -0500
get_sensor, set_sensor: Handle big endian data in little endian
This patch handles big endian location code length data in little endian
platform. This enables the tools to work on little endian platform after
having passed big endian buffer data.
Signed-off-by: Anshuman Khandual <[email protected]>
Reviewed-by: Vasant Hegde <[email protected]>