From: Cyril Hrubis <chrubis@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it, David Hildenbrand <david@redhat.com>
Subject: Re: [LTP] [PATCH v2] security/dirtyc0w_shmem: Add new test for CVE-2022-2590
Date: Fri, 25 Nov 2022 15:35:06 +0100 [thread overview]
Message-ID: <Y4DSmk7uY9zUUQsV@yuki> (raw)
In-Reply-To: <aedafbef-fc19-d552-9459-0878d9a6be8a@suse.cz>
Hi!
> I think the point is that there's no guarantee that NULL will actually
> be defined as (void*)0. It can be defined as a plain integer instead.
> And it *IS* defined as plain integer when the header is #included in C++.
NULL is required to be 0 cast to void* in POSIX.
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html
So at least on POSIX-like systems in C NULL must be ((void*)0)
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-11-25 14:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 10:35 [LTP] [PATCH v2] security/dirtyc0w_shmem: Add new test for CVE-2022-2590 David Hildenbrand
2022-11-24 22:13 ` Petr Vorel
2022-11-25 9:53 ` Martin Doucha
2022-11-25 10:06 ` Petr Vorel
2022-11-25 10:20 ` David Hildenbrand
2022-11-25 10:25 ` Martin Doucha
2022-11-25 10:29 ` David Hildenbrand
2022-11-25 10:39 ` Petr Vorel
2022-11-25 10:42 ` David Hildenbrand
2022-11-25 10:17 ` David Hildenbrand
2022-11-25 14:22 ` Cyril Hrubis
2022-11-25 14:26 ` Martin Doucha
2022-11-25 14:35 ` Cyril Hrubis [this message]
2022-11-25 10:37 ` Martin Doucha
2022-11-25 10:39 ` Petr Vorel
2022-11-25 10:40 ` David Hildenbrand
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=Y4DSmk7uY9zUUQsV@yuki \
--to=chrubis@suse.cz \
--cc=david@redhat.com \
--cc=ltp@lists.linux.it \
--cc=mdoucha@suse.cz \
/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