lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 31 Jul 2022 13:01:44 -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 12:47:30 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> But Daniel, these checks do need to be updated. Please send patches on
> top of this series to address it.

I believe what Tao is trying to say is this:

If we set RV_PER_TASKS_MONITORS greater than 1 we have:

int rv_enable_monitor(struct rv_monitor_def *mdef)
{
        int retval;

        lockdep_assert_held(&rv_interface_lock);

        if (mdef->monitor->enabled)
                return 0;

        retval = mdef->monitor->enable();  <- if that returns positive, then things break.

        if (!retval)
                mdef->monitor->enabled = 1;  <- this is not set.

        return retval;
}

static int enable_wip(void)
{
        int retval;

        retval = da_monitor_init_wip();  <- if that returns positive, things break
        if (retval)
                return retval;



static int da_monitor_init_##name(void)                                                         \
{                                                                                               \
        int slot;                                                                               \
                                                                                                \
        slot = rv_get_task_monitor_slot();  <- if this returns positive, things break           \
        if (slot < 0 || slot >= RV_PER_TASK_MONITOR_INIT)                                       \

And we probably need slot to be negative if it is greater or equal to RV_PER_TASK_MONITOR_INIT.

                return slot;                                                                    \
                                

int rv_get_task_monitor_slot(void)
{
        int i;

        lockdep_assert_held(&rv_interface_lock);

        if (task_monitor_count == RV_PER_TASK_MONITORS)
                return -EBUSY;

        task_monitor_count++;

        for (i = 0; i < RV_PER_TASK_MONITORS; i++) {
                if (task_monitor_slots[i] == false) {
                        task_monitor_slots[i] = true;
                        return i;  <- if RV_PER_TASK_MONITORS > 1 then it can return positive!
                }
        }

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ