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]
Message-ID: <20250904082054.W0fQJAQw@linutronix.de>
Date: Thu, 4 Sep 2025 10:20:54 +0200
From: Nam Cao <namcao@...utronix.de>
To: Gabriele Monaco <gmonaco@...hat.com>
Cc: linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
	linux-trace-kernel@...r.kernel.org,
	Tomas Glozar <tglozar@...hat.com>, Juri Lelli <jlelli@...hat.com>,
	Clark Williams <williams@...hat.com>,
	John Kacur <jkacur@...hat.com>
Subject: Re: [RFC PATCH 16/17] verification/rvgen: Add support for per-obj
 monitors

On Thu, Aug 14, 2025 at 05:08:08PM +0200, Gabriele Monaco wrote:
> +    def fill_per_obj_definitions(self) -> list:
> +        if self.monitor_type == "per_obj":
> +            return ["""
> +/*
> + * da_get_id - Get the id from a target
> + */
> +static inline da_id_type da_get_id(monitor_target target)
> +{
> +	return /* XXX: define how to get an id from the target */;
> +}
> +"""]
> +        return []
> +

I know this is the existing style that we have. But I think this is not
something we should keep. How about something like:

import textwrap

def fill_per_obj_definitions(self) -> list:
    if self.monitor_type == "per_obj":
        return [textwrap.dedent("""
            /*
             * da_get_id - Get the id from a target
             */
            static inline da_id_type da_get_id(monitor_target target)
            {
            	return /* XXX: define how to get an id from the target */;
            }
            """)]
    return []

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ