From c40503e1fa86f3027e003118aaf91646a82f2b5d Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 26 Oct 2021 15:15:11 +0000 Subject: all: add binderfs fuzzing support Create one instance of binderfs per process and add descriptions to enable syzkaller to create binderfs mounts and binder devices itself. Keep descriptions compatible with the legacy mode (when devices are created at boot time). --- sys/linux/dev_binder.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/linux/dev_binder.txt') diff --git a/sys/linux/dev_binder.txt b/sys/linux/dev_binder.txt index b7b50f655..1fcfa6a95 100644 --- a/sys/linux/dev_binder.txt +++ b/sys/linux/dev_binder.txt @@ -1,10 +1,10 @@ # Copyright 2017 syzkaller project authors. All rights reserved. # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. -# Description uses binder device per test process, they are expected to be configured with -# CONFIG_ANDROID_BINDER_DEVICES="binder0,...,binder31". -# "binder,hwbinder,vndbinder" is also supported; this is the kconfig default and -# it's what's used on real Android devices (the main user of binder). +# These descriptions rely on binderfs being enabled and creating at least binder0 +# and binder1 devices right after a mount. +# "binder,hwbinder,vndbinder" devices are also supported; this is the kconfig default +# and it's what's used on real Android devices (the main user of binder). # Description assumes CONFIG_ANDROID_BINDER_IPC_32BIT is not set. include @@ -19,8 +19,8 @@ type binder_handle int32[0:3] # It seems that cookies are only checked for inequality and non-matching cookies only cover error paths. type binder_cookie const[0, int64] -syz_open_dev$binderN(dev ptr[in, string["/dev/binder#"]], id proc[0, 1], flags flags[binder_open_flags]) fd_binder openat$binder(fd const[AT_FDCWD], file ptr[in, string["/dev/binder"]], flags flags[binder_open_flags], mode const[0]) fd_binder +openat$binderfs(fd const[AT_FDCWD], file ptr[in, string[binderfs_devpath]], flags flags[binder_open_flags], mode const[0]) fd_binder openat$hwbinder(fd const[AT_FDCWD], file ptr[in, string["/dev/hwbinder"]], flags flags[binder_open_flags], mode const[0]) fd_binder openat$vndbinder(fd const[AT_FDCWD], file ptr[in, string["/dev/vndbinder"]], flags flags[binder_open_flags], mode const[0]) fd_binder -- cgit mrf-deployment