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: <CANk1AXR_=yKyHmTj282o89irF-2FhsmCt-dV30Z9HkeNcVVizg@mail.gmail.com>
Date:   Thu, 19 Oct 2017 14:04:02 -0500
From:   Alan Tull <atull@...nel.org>
To:     Frank Rowand <frowand.list@...il.com>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
        David Airlie <airlied@...ux.ie>, Jyri Sarha <jsarha@...com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Mark Rutland <mark.rutland@....com>,
        Tomi Valkeinen <tomi.valkeinen@...com>,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v3 06/12] of: overlay: detect cases where device tree may
 become corrupt

On Tue, Oct 17, 2017 at 6:36 PM,  <frowand.list@...il.com> wrote:

>  static int overlay_notify(struct overlay_changeset *ovcs,
>                 enum of_overlay_notify_action action)
>  {
> @@ -86,8 +109,14 @@ static int overlay_notify(struct overlay_changeset *ovcs,
>
>                 ret = blocking_notifier_call_chain(&overlay_notify_chain,
>                                                    action, &nd);
> -               if (ret)
> -                       return notifier_to_errno(ret);
> +               if (ret == NOTIFY_STOP)
> +                       return 0;
> +               if (ret) {
> +                       ret = notifier_to_errno(ret);
> +                       pr_err("overlay changeset %s notifier error %d, target: %pOF\n",
> +                              of_overlay_action_name[action], ret, nd.target);
> +                       return ret;
> +

Hi Frank,

This will spew lots of "error 0" messages for every notifier that
returns NOTIFY_OK.

rmdir /sys/kernel/config/device-tree/overlays/1
[  131.972505] OF: overlay: overlay changeset pre-remove notifier
error 0, target: /soc/base_fpga_region/fpga_pr_region0
[  131.987879] OF: overlay: overlay changeset post-remove notifier
error 0, target: /soc/base_fpga_region/fpga_pr_region0

I could change fpga-region.c to return NOTIFY_STOP if it is accepting
the overlay, but it will still want to return NOTIFY_OK for every case
where it doesn't have an opinion.

Alan

>         }
>
>         return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ