Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1586459
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/9] tools: convert comm_str.refcnt from atomic_t to refcount_t |
| Date | 2017-02-22 21:40 +0100 |
| Message-ID | <tdLRE-7eL-15@gated-at.bofh.it> (permalink) |
| References | <tdkHL-4r9-13@gated-at.bofh.it> <tdkHN-4r9-51@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Em Tue, Feb 21, 2017 at 05:34:57PM +0200, Elena Reshetova escreveu:
> refcount_t type and corresponding API should be
> used instead of atomic_t when the variable is used as
> a reference counter. This allows to avoid accidental
> refcounter overflows that might lead to use-after-free
> situations.
>
> Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
> Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: David Windsor <dwindsor@gmail.com>
You are doing two things (well three) things here:
1. converting to refcnt.h
2. Initiationg the refcount to 1, which makes this take place:
[acme@jouet linux]$ m
make: Entering directory '/home/acme/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
Warning: arch/x86/include/asm/cpufeatures.h differs from kernel
CC /tmp/build/perf/util/comm.o
INSTALL trace_plugins
util/comm.c:16:25: error: ‘comm_str__get’ defined but not used [-Werror=unused-function]
static struct comm_str *comm_str__get(struct comm_str *cs)
^~~~~~~~~~~~~
cc1: all warnings being treated as errors
mv: cannot stat '/tmp/build/perf/util/.comm.o.tmp': No such file or directory
/home/acme/git/linux/tools/build/Makefile.build:101: recipe for target '/tmp/build/perf/util/comm.o' failed
make[4]: *** [/tmp/build/perf/util/comm.o] Error 1
/home/acme/git/linux/tools/build/Makefile.build:144: recipe for target 'util' failed
make[3]: *** [util] Error 2
Makefile.perf:523: recipe for target '/tmp/build/perf/libperf-in.o' failed
make[2]: *** [/tmp/build/perf/libperf-in.o] Error 2
Makefile.perf:204: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
Makefile:108: recipe for target 'install-bin' failed
make: *** [install-bin] Error 2
make: Leaving directory '/home/acme/git/linux/tools/perf'
[acme@jouet linux]$
3) not test building your patches :-\
I'll let this pass this time, minor, I am removing the now unused
comm_str__get() function.
- Arnaldo
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] tools subsystem refcounter conversions Elena Reshetova <elena.reshetova@intel.com> - 2017-02-21 16:40 +0100
[PATCH 9/9] tools: convert thread_map.refcnt from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-02-21 16:40 +0100
[PATCH 2/9] tools: convert cpu_map.refcnt from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-02-21 16:40 +0100
Re: [PATCH 2/9] tools: convert cpu_map.refcnt from atomic_t to refcount_t Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-22 21:40 +0100
[PATCH 1/9] tools: convert cgroup_sel.refcnt from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-02-21 16:40 +0100
Re: [PATCH 1/9] tools: convert cgroup_sel.refcnt from atomic_t to refcount_t Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-21 16:50 +0100
RE: [PATCH 1/9] tools: convert cgroup_sel.refcnt from atomic_t to refcount_t "Reshetova, Elena" <elena.reshetova@intel.com> - 2017-02-22 15:30 +0100
Re: [PATCH 1/9] tools: convert cgroup_sel.refcnt from atomic_t to refcount_t Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-22 16:50 +0100
RE: [PATCH 1/9] tools: convert cgroup_sel.refcnt from atomic_t to refcount_t "Reshetova, Elena" <elena.reshetova@intel.com> - 2017-02-22 17:20 +0100
Re: [PATCH 1/9] tools: convert cgroup_sel.refcnt from atomic_t to refcount_t Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-22 21:40 +0100
RE: [PATCH 1/9] tools: convert cgroup_sel.refcnt from atomic_t to refcount_t "Reshetova, Elena" <elena.reshetova@intel.com> - 2017-02-23 14:20 +0100
[PATCH 3/9] tools: convert comm_str.refcnt from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-02-21 16:40 +0100
Re: [PATCH 3/9] tools: convert comm_str.refcnt from atomic_t to refcount_t Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-22 21:40 +0100
Re: [PATCH 3/9] tools: convert comm_str.refcnt from atomic_t to refcount_t Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-22 23:30 +0100
Re: [PATCH 3/9] tools: convert comm_str.refcnt from atomic_t to refcount_t Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-22 23:40 +0100
RE: [PATCH 3/9] tools: convert comm_str.refcnt from atomic_t to refcount_t "Reshetova, Elena" <elena.reshetova@intel.com> - 2017-02-23 10:20 +0100
Re: [PATCH 3/9] tools: convert comm_str.refcnt from atomic_t to refcount_t Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-23 14:20 +0100
Re: [PATCH 0/9] tools subsystem refcounter conversions Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-21 16:50 +0100
Re: [PATCH 0/9] tools subsystem refcounter conversions Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-23 00:30 +0100
Re: [PATCH 0/9] tools subsystem refcounter conversions Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-23 00:30 +0100
RE: [PATCH 0/9] tools subsystem refcounter conversions "Reshetova, Elena" <elena.reshetova@intel.com> - 2017-02-23 12:40 +0100
Re: [PATCH 0/9] tools subsystem refcounter conversions Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-23 14:00 +0100
Re: [PATCH 0/9] tools subsystem refcounter conversions Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-23 17:30 +0100
RE: [PATCH 0/9] tools subsystem refcounter conversions "Reshetova, Elena" <elena.reshetova@intel.com> - 2017-02-24 08:40 +0100
Re: [PATCH 0/9] tools subsystem refcounter conversions Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-24 14:40 +0100
Re: [PATCH 0/9] tools subsystem refcounter conversions Peter Zijlstra <peterz@infradead.org> - 2017-02-21 16:50 +0100
RE: [PATCH 0/9] tools subsystem refcounter conversions "Reshetova, Elena" <elena.reshetova@intel.com> - 2017-02-21 17:10 +0100
csiph-web