Re: [PATCH AUTOSEL 5.4 13/14] gcov: clang: fix clang-11+ build
On Tue, Apr 20, 2021 at 09:01:19AM +0200, Johannes Berg wrote: On Mon, 2021-04-19 at 20:44 +, Sasha Levin wrote: From: Johannes Berg [ Upstream commit 04c53de57cb6435738961dace8b1b71d3ecd3c39 ] With clang-11+, the code is broken due to my kvmalloc() conversion (which predated the clang-11 support code) leaving one vmalloc() in place. Fix that. This patch might *apply* on 5.4 (and the other kernels you selected it for), but then I'm pretty sure it'll be broken, unless you also applied the various patches this was actually fixing (my kvmalloc conversion, and the clang-11 support). Also, Linus has (correctly) reverted this patch from mainline, it shouldn't have gone there in the first place, probably really should be squashed into my kvmalloc conversion patch that's in -mm now. Sorry if I didn't make that clear enough at the time. In any case, please drop this patch from all stable trees. Will do, thanks! -- Thanks, Sasha
Re: [PATCH AUTOSEL 5.4 13/14] gcov: clang: fix clang-11+ build
On Mon, 2021-04-19 at 20:44 +, Sasha Levin wrote: > From: Johannes Berg > > [ Upstream commit 04c53de57cb6435738961dace8b1b71d3ecd3c39 ] > > With clang-11+, the code is broken due to my kvmalloc() conversion > (which predated the clang-11 support code) leaving one vmalloc() in > place. Fix that. This patch might *apply* on 5.4 (and the other kernels you selected it for), but then I'm pretty sure it'll be broken, unless you also applied the various patches this was actually fixing (my kvmalloc conversion, and the clang-11 support). Also, Linus has (correctly) reverted this patch from mainline, it shouldn't have gone there in the first place, probably really should be squashed into my kvmalloc conversion patch that's in -mm now. Sorry if I didn't make that clear enough at the time. In any case, please drop this patch from all stable trees. johannes
[PATCH AUTOSEL 5.4 13/14] gcov: clang: fix clang-11+ build
From: Johannes Berg [ Upstream commit 04c53de57cb6435738961dace8b1b71d3ecd3c39 ] With clang-11+, the code is broken due to my kvmalloc() conversion (which predated the clang-11 support code) leaving one vmalloc() in place. Fix that. Link: https://lkml.kernel.org/r/20210412214210.6e1ecca9cdc5.I24459763acf0591d5e6b31c7e3a59890d802f79c@changeid Signed-off-by: Johannes Berg Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- kernel/gcov/clang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/gcov/clang.c b/kernel/gcov/clang.c index c466c7fbdece..b81f2823630d 100644 --- a/kernel/gcov/clang.c +++ b/kernel/gcov/clang.c @@ -369,7 +369,7 @@ static struct gcov_fn_info *gcov_fn_info_dup(struct gcov_fn_info *fn) INIT_LIST_HEAD(&fn_dup->head); cv_size = fn->num_counters * sizeof(fn->counters[0]); - fn_dup->counters = vmalloc(cv_size); + fn_dup->counters = kvmalloc(cv_size, GFP_KERNEL); if (!fn_dup->counters) { kfree(fn_dup); return NULL; -- 2.30.2