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] [day] [month] [year] [list]
Message-ID: <1071f2af-39be-425b-bdb0-7f004a6e8f65@web.de>
Date: Wed, 24 Sep 2025 17:08:39 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Oleg Petrov <o.petrov@...ras.ru>, cocci@...ia.fr,
 dri-devel@...ts.freedesktop.org, lvc-project@...uxtesting.org,
 Julia Lawall <Julia.Lawall@...ia.fr>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
Cc: LKML <linux-kernel@...r.kernel.org>, David Airlie <airlied@...il.com>,
 Maxime Ripard <mripard@...nel.org>, Nicolas Palix <nicolas.palix@...g.fr>,
 Simona Vetter <simona@...ll.ch>, Thomas Zimmermann <tzimmermann@...e.de>,
 Vadim Mutilin <mutilin@...ras.ru>
Subject: Re: [cocci] [PATCH] cocci: drm: report devm-allocated arguments and
 fields

> Add two Coccinelle rules: (1) flag a devres-managed pointer
> passed to a drm-init function, and (2) flag a devres-managed
> pointer assigned to a field of drm-managed struct. …

I suggest to start each enumeration item on a separate text line.


Would you like to refer to “Coccinelle: api:” in the patch prefix?


…> +// Copyright: (C) 2025 Oleg Petrov ISPRAS

Would another delimiter be helpful between the personal name and the organisation identifier?


…> +virtual report
> +virtual org

The restriction on the support for two operation modes will need further development considerations.


…> +devm = \(devm_kzalloc\|devm_kcalloc\|devm_kmalloc\|devm_kmalloc_array\)(...);

Would it be nicer to write such SmPL disjunctions on multiple lines?


…> +@...ipt:python depends on report@
> +p << badarg.p;
> +@@
> +msg = "WARNING devm-allocated argument in a drm-init; use drmm-init family (or drmm-alloc)."
> +coccilib.report.print_report(p[0], msg)

I would like to point out once more that such data can be printed
also without an extra variable like “msg”.


> +@...ipt:python depends on org@
> +p << badarg.p;
> +@@
> +msg = "WARNING devm-allocated argument in a drm-init; use drmm-init family (or drmm-alloc)."
> +coccilib.org.print_report(p[0], msg)

Would the following method call be more appropriate?

coccilib.org.print_todo(p[0],
                        "WARNING: devm-allocated argument in a drm-init; use drmm-init family (or drmm-alloc).")


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ