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: <CAMuHMdUoZBJewA6nQZLhnbebZuoZo85UCCfwuOv8or_N_e-0qg@mail.gmail.com>
Date: Tue, 20 Aug 2024 10:55:32 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Ulf Hansson <ulf.hansson@...aro.org>
Cc: "Rafael J . Wysocki" <rafael@...nel.org>, Sudeep Holla <sudeep.holla@....com>, linux-pm@...r.kernel.org, 
	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>, Nikunj Kela <nkela@...cinc.com>, 
	Prasad Sodagudi <psodagud@...cinc.com>, Maulik Shah <quic_mkshah@...cinc.com>, 
	Daniel Lezcano <daniel.lezcano@...aro.org>, 
	Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, linux-rt-users@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/7] pmdomain: core: Use dev_name() instead of
 kobject_get_path() in debugfs

Hi Ulf,

On Mon, May 27, 2024 at 4:27 PM Ulf Hansson <ulf.hansson@...aro.org> wrote:
> Using kobject_get_path() means a dynamic memory allocation gets done, which
> doesn't work on a PREEMPT_RT based configuration while holding genpd's raw
> spinlock.
>
> To fix the problem, let's convert into using the simpler dev_name(). This
> means the information about the path doesn't get presented in debugfs, but
> hopefully this shouldn't be an issue.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@...aro.org>
> ---
> Changes in v2:
>         - New patch.

Thanks for your patch, which is now commit 9094e53ff5c86ebe ("pmdomain:
core: Use dev_name() instead of kobject_get_path() in debugfs")
in pmdomain/next.

> --- a/drivers/pmdomain/core.c
> +++ b/drivers/pmdomain/core.c
> @@ -3215,16 +3214,9 @@ static int genpd_summary_one(struct seq_file *s,
>         }
>
>         list_for_each_entry(pm_data, &genpd->dev_list, list_node) {
> -               kobj_path = kobject_get_path(&pm_data->dev->kobj,
> -                               genpd_is_irq_safe(genpd) ?
> -                               GFP_ATOMIC : GFP_KERNEL);
> -               if (kobj_path == NULL)
> -                       continue;
> -
> -               seq_printf(s, "\n    %-50s  ", kobj_path);
> +               seq_printf(s, "\n    %-50s  ", dev_name(pm_data->dev));

While some of the old names didn't even fit in 50 characters, the new
names need much less space, so perhaps this is a good opportunity to
decrease the table width?

>                 rtpm_status_str(s, pm_data->dev);
>                 perf_status_str(s, pm_data->dev);
> -               kfree(kobj_path);
>         }
>
>         seq_puts(s, "\n");

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ