linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: Wei Yang <richard.weiyang@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mike Rapoport <rppt@kernel.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH v4 1/2] mm/memblock: Add reserved memory release function
Date: Mon, 7 Apr 2025 10:40:32 +0900	[thread overview]
Message-ID: <20250407104032.162f1d10e9ab885c72bfac8c@kernel.org> (raw)
In-Reply-To: <20250407093351.5514960330bebbe07b707431@kernel.org>

On Mon, 7 Apr 2025 09:33:51 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:

> But this is fragile by design. As I did for lib/bootconfig and
> tools/bootconfig, you should use __KERNEL__ and makes it not depending on
> the kernel header files because it does not expected to be used in user
> space.
> Even if I added mutex.h, it stopped with another reason.
> 
> test -L linux/memblock.h || ln -s ../../../../include/linux/memblock.h linux/memblock.h
> test -L asm/asm.h || ln -s ../../../arch/x86/include/asm/asm.h asm/asm.h
> test -L asm/cmpxchg.h || ln -s ../../../arch/x86/include/asm/cmpxchg.h asm/cmpxchg.h
> cc -I. -I../../include -Wall -O2 -fsanitize=address -fsanitize=undefined -D CONFIG_PHYS_ADDR_T_64BIT   -c -o main.o main.c
> test -L memblock.c || ln -s ../../../mm/memblock.c memblock.c
> cc -I. -I../../include -Wall -O2 -fsanitize=address -fsanitize=undefined -D CONFIG_PHYS_ADDR_T_64BIT   -c -o memblock.o memblock.c
> memblock.c: In function 'memblock_add_range.isra':
> memblock.c:685:17: warning: 'end_rgn' may be used uninitialized [-Wmaybe-uninitialized]
>   685 |                 memblock_merge_regions(type, start_rgn, end_rgn);
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> memblock.c:591:42: note: 'end_rgn' was declared here
>   591 |         int idx, nr_new, start_rgn = -1, end_rgn;
>       |                                          ^~~~~~~
> cc -I. -I../../include -Wall -O2 -fsanitize=address -fsanitize=undefined -D CONFIG_PHYS_ADDR_T_64BIT   -c -o lib/slab.o lib/slab.c
> cc -I. -I../../include -Wall -O2 -fsanitize=address -fsanitize=undefined -D CONFIG_PHYS_ADDR_T_64BIT   -c -o mmzone.o mmzone.c
> cc -I. -I../../include -Wall -O2 -fsanitize=address -fsanitize=undefined -D CONFIG_PHYS_ADDR_T_64BIT   -c -o slab.o ../../lib/slab.c
> ../../lib/slab.c:6:10: fatal error: urcu/uatomic.h: No such file or directory
>     6 | #include <urcu/uatomic.h>
>       |          ^~~~~~~~~~~~~~~~
> compilation terminated.
> make: *** [<builtin>: slab.o] Error 1

Ah, sorry. This is from liburcu. I installed the package and fixes the issue.
Let me send the patch.

Thank you,

-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  reply	other threads:[~2025-04-07  1:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 15:08 [PATCH v4 0/2] tracing: Make persistent ring buffer freeable Masami Hiramatsu (Google)
2025-02-18 15:08 ` [PATCH v4 1/2] mm/memblock: Add reserved memory release function Masami Hiramatsu (Google)
2025-04-05  2:30   ` Wei Yang
2025-04-07  0:33     ` Masami Hiramatsu
2025-04-07  1:40       ` Masami Hiramatsu [this message]
2025-02-18 15:09 ` [PATCH v4 2/2] tracing: Freeable reserved ring buffer Masami Hiramatsu (Google)
2025-02-25 20:55 ` [PATCH v4 0/2] tracing: Make persistent ring buffer freeable Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250407104032.162f1d10e9ab885c72bfac8c@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=richard.weiyang@gmail.com \
    --cc=rostedt@goodmis.org \
    --cc=rppt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).