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: <CA+CmpXuACmU_S69tQmtC1CGbx-jn0g5NJF_p1dNTTaRMPCp+5g@mail.gmail.com>
Date:   Mon, 18 Jun 2018 18:54:00 +0300
From:   Yehezkel Bernat <yehezkelshb@...il.com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Andreas Noever <andreas.noever@...il.com>,
        michael.jamet@...el.com, christian@...lner.me,
        Mario Limonciello <mario.limonciello@...l.com>, lukas@...ner.de
Subject: Re: [PATCH] thunderbolt: Notify userspace when boot_acl is changed

On Mon, Jun 18, 2018 at 5:44 PM Mika Westerberg
<mika.westerberg@...ux.intel.com> wrote:
>
> The commit 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL")
> introduced boot_acl attribute but missed the fact that now userspace
> needs to poll the attribute constantly to find out whether it has
> changed or not. Fix this by sending notification to the userspace
> whenever the boot_acl attribute is changed.
>
> Fixes: 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL")
> Reported-by: Christian Kellner <ckellner@...hat.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> ---
>  drivers/thunderbolt/domain.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c
> index 6281266b8ec0..a923ebdeb73c 100644
> --- a/drivers/thunderbolt/domain.c
> +++ b/drivers/thunderbolt/domain.c
> @@ -213,6 +213,10 @@ static ssize_t boot_acl_store(struct device *dev, struct device_attribute *attr,
>                 goto err_free_acl;
>         }
>         ret = tb->cm_ops->set_boot_acl(tb, acl, tb->nboot_acl);
> +       if (!ret) {
> +               /* Notify userspace about the change */
> +               kobject_uevent(&tb->dev.kobj, KOBJ_CHANGE);
> +       }
>         mutex_unlock(&tb->lock);
>
>  err_free_acl:
> --
> 2.17.1
>

Acked-by: Yehezkel Bernat <yehezkelshb@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ