[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220731124730.311c8207@rorschach.local.home>
Date: Sun, 31 Jul 2022 12:47:30 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Tao Zhou <tao.zhou@...ux.dev>
Cc: Daniel Bristot de Oliveira <bristot@...nel.org>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>,
Jonathan Corbet <corbet@....net>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Marco Elver <elver@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Shuah Khan <skhan@...uxfoundation.org>,
Gabriele Paoloni <gpaoloni@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>,
Clark Williams <williams@...hat.com>,
Randy Dunlap <rdunlap@...radead.org>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-trace-devel@...r.kernel.org
Subject: Re: [PATCH V9 01/16] rv: Add Runtime Verification (RV) interface
On Sun, 31 Jul 2022 23:06:31 +0800
Tao Zhou <tao.zhou@...ux.dev> wrote:
> > All things above are misled by the first interpretation but,,,
>
> Yeah, this is not that clear from my above words expression. I said the return
> value of da_monitor_init_*() will be 0, but it is not right. Global and per-cpu
> monitor will return 0, per-task monitor may return a positive value when the
> slot is equal or greater than RV_PER_TASK_MONITOR_INIT(how possible this will
> happen I do know yet). This is from reading the current code implementation.
> I just want to say that there may be a bug here.
Well, rv_get_monitor_slot() can currently only return 0 or negative.
This is because PER_TASK_MONITORS is just 1 and we can not return that
or greater.
> If rv_enable_monitor() return a positive value and the error happened(as above
With the current code this can not happen, as we only allow for a
single PER_TASK_MONITORS.
But in the future, if we increment this, then you are correct. We can
not just check retval, but need to check retval < 0.
This does need to be fixed. But because it currently isn't an issue
because we they can only return 0 or negative, I'm going to pull this
series in.
But Daniel, these checks do need to be updated. Please send patches on
top of this series to address it.
-- Steve
> said), user space will not know this is a error return value, but regard it as a
> right writing. Even if the return value(the slot value not in [0..RV_PER_TASK_MONITOR_INIT))
> is equal to count of charaters that are writen to the file(the string length of monitor name),
> it will still be not a right writing.
>
Powered by blists - more mailing lists