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: <CAHRSSEynz6S-XPPrY92TewdVGW+rJ1=mHmHNMhb+aNrHtgM7Rw@mail.gmail.com>
Date:   Fri, 6 May 2022 15:05:42 -0700
From:   Todd Kjos <tkjos@...gle.com>
To:     Carlos Llamas <cmllamas@...gle.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arve Hjønnevåg <arve@...roid.com>,
        Todd Kjos <tkjos@...roid.com>,
        Martijn Coenen <maco@...roid.com>,
        Christian Brauner <brauner@...nel.org>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        Hridya Valsaraju <hridya@...gle.com>, kernel-team@...roid.com,
        linux-kernel@...r.kernel.org, Shuah Khan <shuah@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, Li Li <dualli@...gle.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v2 3/5] binderfs: add extended_error feature entry

On Fri, Apr 29, 2022 at 4:57 PM Carlos Llamas <cmllamas@...gle.com> wrote:
>
> Add extended_error to the binderfs feature list, to help userspace
> determine whether the BINDER_GET_EXTENDED_ERROR ioctl is supported by
> the binder driver.
>
> Signed-off-by: Carlos Llamas <cmllamas@...gle.com>

Acked-by: Todd Kjos <tkjos@...gle.com>

> ---
>  drivers/android/binderfs.c                                | 8 ++++++++
>  .../selftests/filesystems/binderfs/binderfs_test.c        | 1 +
>  2 files changed, 9 insertions(+)
>
> diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
> index e3605cdd4335..6c5e94f6cb3a 100644
> --- a/drivers/android/binderfs.c
> +++ b/drivers/android/binderfs.c
> @@ -60,6 +60,7 @@ enum binderfs_stats_mode {
>
>  struct binder_features {
>         bool oneway_spam_detection;
> +       bool extended_error;
>  };
>
>  static const struct constant_table binderfs_param_stats[] = {
> @@ -75,6 +76,7 @@ static const struct fs_parameter_spec binderfs_fs_parameters[] = {
>
>  static struct binder_features binder_features = {
>         .oneway_spam_detection = true,
> +       .extended_error = true,
>  };
>
>  static inline struct binderfs_info *BINDERFS_SB(const struct super_block *sb)
> @@ -615,6 +617,12 @@ static int init_binder_features(struct super_block *sb)
>         if (IS_ERR(dentry))
>                 return PTR_ERR(dentry);
>
> +       dentry = binderfs_create_file(dir, "extended_error",
> +                                     &binder_features_fops,
> +                                     &binder_features.extended_error);
> +       if (IS_ERR(dentry))
> +               return PTR_ERR(dentry);
> +
>         return 0;
>  }
>
> diff --git a/tools/testing/selftests/filesystems/binderfs/binderfs_test.c b/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
> index 0315955ff0f4..9409bb136d95 100644
> --- a/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
> +++ b/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
> @@ -64,6 +64,7 @@ static int __do_binderfs_test(struct __test_metadata *_metadata)
>                 device_path[sizeof(P_tmpdir "/binderfs_XXXXXX/") + BINDERFS_MAX_NAME];
>         static const char * const binder_features[] = {
>                 "oneway_spam_detection",
> +               "extended_error",
>         };
>
>         change_mountns(_metadata);
> --
> 2.36.0.464.gb9c8b46e94-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ