linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/8] Update to C11, fix signal undefined behavior
@ 2022-10-24 17:35 Ian Rogers
  2022-10-24 17:35 ` [PATCH v1 1/8] perf build: Update to C standard to gnu11 Ian Rogers
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Ian Rogers @ 2022-10-24 17:35 UTC (permalink / raw)
  To: Leo Yan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Alexey Bayduraev, German Gomez, linux-perf-users,
	linux-kernel
  Cc: Stephane Eranian, Ian Rogers

The use of C11 is mainstream in the kernel [1]. There was some
confusion on volatile and signal handlers in [2]. Switch to using
stdatomic.h (requires C11) and sig_atomic_t as per [3]. Thanks to Leo
Yan <leo.yan@linaro.org> for the suggestions.

[1] https://lore.kernel.org/lkml/CAHk-=whWbENRz-vLY6vpESDLj6kGUTKO3khGtVfipHqwewh2HQ@mail.gmail.com/
[2] https://lore.kernel.org/lkml/20221024011024.462518-1-irogers@google.com/
[3] https://wiki.sei.cmu.edu/confluence/display/c/SIG31-C.+Do+not+access+shared+objects+in+signal+handlers


Ian Rogers (8):
  perf build: Update to C standard to gnu11
  perf record: Use sig_atomic_t for signal handlers
  perf daemon: Use sig_atomic_t to avoid UB
  perf ftrace: Use sig_atomic_t to avoid UB
  perf session: Change type to avoid UB
  perf stat: Use sig_atomic_t to avoid UB
  perf top: Use sig_atomic_t to avoid UB
  perf trace: Use sig_atomic_t to avoid UB

 tools/perf/Makefile.config  | 2 +-
 tools/perf/builtin-daemon.c | 3 ++-
 tools/perf/builtin-ftrace.c | 4 ++--
 tools/perf/builtin-record.c | 9 +++++----
 tools/perf/builtin-stat.c   | 9 +++++----
 tools/perf/builtin-top.c    | 4 ++--
 tools/perf/builtin-trace.c  | 4 ++--
 tools/perf/util/session.c   | 3 ++-
 8 files changed, 21 insertions(+), 17 deletions(-)

-- 
2.38.0.135.g90850a2211-goog


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-10-25 11:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 17:35 [PATCH v1 0/8] Update to C11, fix signal undefined behavior Ian Rogers
2022-10-24 17:35 ` [PATCH v1 1/8] perf build: Update to C standard to gnu11 Ian Rogers
2022-10-24 17:35 ` [PATCH v1 2/8] perf record: Use sig_atomic_t for signal handlers Ian Rogers
2022-10-24 17:35 ` [PATCH v1 3/8] perf daemon: Use sig_atomic_t to avoid UB Ian Rogers
2022-10-24 17:35 ` [PATCH v1 4/8] perf ftrace: " Ian Rogers
2022-10-24 17:35 ` [PATCH v1 5/8] perf session: Change type " Ian Rogers
2022-10-24 17:35 ` [PATCH v1 6/8] perf stat: Use sig_atomic_t " Ian Rogers
2022-10-24 17:35 ` [PATCH v1 7/8] perf top: " Ian Rogers
2022-10-24 17:35 ` [PATCH v1 8/8] perf trace: " Ian Rogers
2022-10-24 17:51 ` [PATCH v1 0/8] Update to C11, fix signal undefined behavior Arnaldo Carvalho de Melo
2022-10-24 17:59   ` Ian Rogers
2022-10-24 18:11     ` Ian Rogers
2022-10-25 10:36       ` David Laight
2022-10-25 11:25         ` Leo Yan
2022-10-24 19:36     ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).