From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
qemu-ppc@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Chinmay Rath" <rathc@linux.ibm.com>,
kvm@vger.kernel.org, "Glenn Miles" <milesg@linux.ibm.com>,
"Thomas Huth" <thuth@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [PATCH v2 3/3] docs/devel/style: Mention alloca() family API is forbidden
Date: Mon, 1 Sep 2025 16:41:13 +0200 [thread overview]
Message-ID: <7fffe10a-05dc-4e6d-89fd-03d351aac06e@linaro.org> (raw)
In-Reply-To: <CAAjaMXbDSwXjTFb5nPrK7tWyjbDtxm3mgxOwUK7yMUOG61y6qQ@mail.gmail.com>
On 1/9/25 16:05, Manos Pitsidianakis wrote:
> On Mon, Sep 1, 2025 at 4:27 PM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> Suggested-by: Alex Bennée <alex.bennee@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>
> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
>
>> docs/devel/style.rst | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/docs/devel/style.rst b/docs/devel/style.rst
>> index d025933808e..941fe14bfd4 100644
>> --- a/docs/devel/style.rst
>> +++ b/docs/devel/style.rst
>> @@ -446,8 +446,8 @@ Low level memory management
>> ===========================
>>
>> Use of the ``malloc/free/realloc/calloc/valloc/memalign/posix_memalign``
>> -APIs is not allowed in the QEMU codebase. Instead of these routines,
>> -use the GLib memory allocation routines
>> +or ``alloca/g_alloca/g_newa/g_newa0`` APIs is not allowed in the QEMU codebase.
>> +Instead of these routines, use the GLib memory allocation routines
>> ``g_malloc/g_malloc0/g_new/g_new0/g_realloc/g_free``
>> or QEMU's ``qemu_memalign/qemu_blockalign/qemu_vfree`` APIs.
>>
>> --
>
> If you wanna dust off your perl, you could also add this to checkpatch.pl :)
We expect contributors to test their patches before posting :P
(normally it shouldn't build due to -Walloca in the previous patch)
Thanks!
next prev parent reply other threads:[~2025-09-01 14:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 13:26 [PATCH v2 0/3] system: Forbid alloca() Philippe Mathieu-Daudé
2025-09-01 13:26 ` [PATCH v2 1/3] target/ppc/kvm: Avoid using alloca() Philippe Mathieu-Daudé
2025-09-01 13:30 ` Peter Maydell
2025-09-01 14:07 ` Manos Pitsidianakis
2025-09-02 6:41 ` Harsh Prateek Bora
2025-09-02 14:05 ` Stefan Hajnoczi
2025-09-01 13:26 ` [PATCH v2 2/3] buildsys: Prohibit alloca() use on system code Philippe Mathieu-Daudé
2025-09-01 13:37 ` Daniel P. Berrangé
2025-09-01 13:26 ` [PATCH v2 3/3] docs/devel/style: Mention alloca() family API is forbidden Philippe Mathieu-Daudé
2025-09-01 14:05 ` Manos Pitsidianakis
2025-09-01 14:41 ` Philippe Mathieu-Daudé [this message]
2025-09-02 14:04 ` Stefan Hajnoczi
2025-09-02 10:17 ` [PATCH v2 0/3] system: Forbid alloca() Philippe Mathieu-Daudé
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=7fffe10a-05dc-4e6d-89fd-03d351aac06e@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=harshpb@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=milesg@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rathc@linux.ibm.com \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
/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).