platform_system_core/libappfuse
Daichi Hirono afa3453256 Skip FUSE request from /dev/fuse if unique=0
APCT log shows that we got FUSE request unique=0 and replying to such
request causes a EINVAL.

The possible reasons of getting unique=0 here are:

 * /dev/fuse actually submits such requests. In this case, not replying
   to such request probabbly safe as the kernel cannot wait corresponding
   response without a unique number. We can observing the kernel code to
   find out what unique=0 actually means.
 * Memory corruption happens and unique number are cleared with zero.
   In this case, if we skip unique=0 request, libappfuse does not reply
   to the kernel request and APCT result will become timeout .

To see which case happens, the CL ScopedLogSeverity to output
verbose logs and lets FuseBridgeLoop skip a request from /dev/fuse if unique=0.

Bug: 62429763
Test: libappfuse_tests
Change-Id: I8c4d532564b690d55573b92260170b0cd68150ab
2017-06-20 00:25:28 +00:00
..
include/libappfuse Change FuseAppLoop so that it can process messages asynchronously. 2017-03-29 00:13:58 +00:00
tests Skip FUSE request from /dev/fuse if unique=0 2017-06-20 00:25:28 +00:00
Android.bp Merge "Add test config to libappfuse_test" am: dccf5a1dc8 am: 31d4b50cc4 2017-04-05 00:19:53 +00:00
AndroidTest.xml Add test config to libappfuse_test 2017-03-31 17:11:50 -07:00
EpollController.cc Add new EpollController class. 2017-03-15 15:58:06 +09:00
FuseAppLoop.cc Change FuseAppLoop so that it can process messages asynchronously. 2017-03-29 00:13:58 +00:00
FuseBridgeLoop.cc Skip FUSE request from /dev/fuse if unique=0 2017-06-20 00:25:28 +00:00
FuseBuffer.cc Add more logs for writing failures. 2017-06-12 10:37:08 +09:00