Re: [PATCH V4 01/20] rv: Add Runtime Verification (RV) interface
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH V4 01/20] rv: Add Runtime Verification (RV) interface
- From: Matthew Wilcox <willy@xxxxxxxxxxxxx>
- Date: Wed, 6 Jul 2022 18:53:21 +0100
- Cc: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Marco Elver <elver@xxxxxxxxxx>, Dmitry Vyukov <dvyukov@xxxxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>, Gabriele Paoloni <gpaoloni@xxxxxxxxxx>, Juri Lelli <juri.lelli@xxxxxxxxxx>, Clark Williams <williams@xxxxxxxxxx>, linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-trace-devel@xxxxxxxxxxxxxxx
- In-reply-to: <YsXLDvjHqOxYtckg@geo.homenetwork>
- References: <cover.1655368610.git.bristot@kernel.org> <60548902dbccaa7ba420e40e46835693e27f643f.1655368610.git.bristot@kernel.org> <YsXLDvjHqOxYtckg@geo.homenetwork>
On Thu, Jul 07, 2022 at 01:49:02AM +0800, Tao Zhou wrote:
> > +struct rv_monitor {
> > + const char *name;
> > + const char *description;
> > + bool enabled;
>
> Can the 'bool enabled;' be put at the end like the definition of
> structure rv_monitor_def. If '8+8+sizeof(bool)+8+8+8' not the same
> as '8+8+8+8+8+sizeof(bool)', I mean is it possible that after the
> end of stucture there is a int or char not require to align to 8 as
> an example from my nonsense.
That will make no difference at all. C doesn't allow other variables
to "fill in the hole" at the end of the structure like that. For
example, one could legitimately do 'memset(&rvm, sizeof(rvm))',
and that would wipe out those other variables as well.
[Index of Archives]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]