From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] lib: switch cgroup bit-fields from signed to unsigned int
Date: Thu, 23 Jan 2025 21:50:04 +0100 [thread overview]
Message-ID: <20250123205004.GA150153@pevik> (raw)
In-Reply-To: <20250118102615.127485-1-liwang@redhat.com>
Hi Li,
> There is a problem in cgroup lib that the declearation int
> can lead to -1 during the | operation.
> Becasue if the field contains uninitialized garbage data,
> a bit-field declared as int could interpret 0b1 as -1 due
> to signed arithmetic.
> By changing the type to unsigned int, the issue is avoided
> since unsigned fields cannot represent negative values.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
> Signed-off-by: Li Wang <liwang@redhat.com>
> Cc: Jin Guojie <guojie.jin@gmail.com>
> ---
> Notes:
> @Cyril, Petr, I vote to merge this patch before the release.
> @Guojie, Could you plz repost your memcontrol04 patch based on this change?
+1
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-01-23 20:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-18 10:26 [LTP] [PATCH] lib: switch cgroup bit-fields from signed to unsigned int Li Wang
2025-01-23 20:50 ` Petr Vorel [this message]
2025-01-24 11:19 ` Cyril Hrubis
2025-01-25 2:43 ` Li Wang
2025-01-25 2:46 ` Li Wang
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=20250123205004.GA150153@pevik \
--to=pvorel@suse.cz \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.