Skip to content
Snippets Groups Projects
  1. Apr 03, 2017
    • Mark Salyzyn's avatar
      logcatd: introduce logcatd executable · 88cdd71d
      Mark Salyzyn authored
      logcatd is the same as logcat, except that the -L flag, if supplied,
      runs once, then the command re-runs itself without the -L flag with
      the same argument set.  By introducing a logcatd daemon executable
      we can solve the problem of the longish reads from pstore that
      sometimes occur when the system is excessively busy spinning in a
      foreground task starving this daemon as we absorb the delay in
      an init service, rather than in an init exec.  This would not have
      been efficiently possible without the introduction of liblogcat.
      
      Test: gTest logcat-unit-tests
      Test: Manual check logpersist operations
      Bug: 28788401
      Bug: 30041146
      Bug: 30612424
      Bug: 35326290
      Change-Id: I3454bad666c66663f59ae03bcd72e0fe8426bb0a
      88cdd71d
  2. Mar 31, 2017
  3. Mar 30, 2017
    • Jin Qian's avatar
      storaged: allow shell to call dumpsys storaged · af3eaf0d
      Jin Qian authored
      Test: adb kill-server && adb shell dumpsys storaged
      Bug: 36492915
      Change-Id: I3a1a2ad2f016ddd5770d585cae82c8be69001df9
      af3eaf0d
    • Tom Cherry's avatar
      Grant vdc access to kmsg · bc4d3630
      Tom Cherry authored
      Init is no longer calling vdc with logwrapper, so it must take care of
      logging to kmsg directly.
      
      Change-Id: I529f5a95e19c08ef75e0da9a02bae1cb7187eec0
      avc: denied { write } for pid=367 comm="vdc" name="kmsg" dev="tmpfs" ino=11056 scontext=u:r:vdc:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0
      
      Test: observe vdc logging in kmsg on boot and stderr on normal usage
      
      Change-Id: Ie3678509d360f19b95cb03aeea75f29843728203
      bc4d3630
    • Myles Watson's avatar
      Disallow HAL access to Bluetooth data files · 02d9d21d
      Myles Watson authored
      Devices that store their BT MAC address in /data/misc/bluedroid/ need
      to find another place for that file.
      
      Bug: 36602160
      Test: Restart Bluetooth, check for selinux denials/files in /data/misc
      Change-Id: Ib8d610f201a8c35f95b464c24857c6639205bc66
      Merged-In: Ib8d610f201a8c35f95b464c24857c6639205bc66
      02d9d21d
    • Vishwath Mohan's avatar
      Refactor sanitized library on-disk layout - SELinux. · 33ebdda8
      Vishwath Mohan authored
      This CL changes the policy for ASAN files on-disk to support the
      changes made by the following CLs -
      https://android-review.googlesource.com/#/c/359087/
      https://android-review.googlesource.com/#/c/359389/
      
      which refactor the on-disk layout of sanitized libraries in the following
      manner -
      /data/lib* --> /data/asan/system/lib*
      /data/vendor/* --> /data/asan/vendor/*
      
      There are a couple of advantages to this, including better isolation
      from other components, and more transparent linker renaming and
      SELinux policies.
      
      Bug: 36574794
      Bug: 36674745
      Test: m -j40 && SANITIZE_TARGET="address" m -j40 and the device
      boots. All sanitized libraries are correctly located in /data/asan/*,
      and have the right SELinux permissions.
      
      Change-Id: Ib08e360cecc8d77754a768a9af0f7db35d6921a9
      33ebdda8
  4. Mar 29, 2017
  5. Mar 28, 2017
  6. Mar 27, 2017
  7. Mar 26, 2017
    • Jeff Sharkey's avatar
      Grant kernel access to new "virtual_disk" file. · 3f724c95
      Jeff Sharkey authored
      This is a special file that can be mounted as a loopback device to
      exercise adoptable storage code on devices that don't have valid
      physical media.  For example, they may only support storage media
      through a USB OTG port that is being used for an adb connection.
      
      avc: denied { read } for path="/data/misc/vold/virtual_disk" dev="sda35" ino=508695 scontext=u:r:kernel:s0 tcontext=u:object_r:vold_data_file:s0 tclass=file permissive=0
      
      Bug: 34903607
      Change-Id: I84721ec0e9495189a7d850461875df1839826212
      3f724c95
    • Jeff Vander Stoep's avatar
      Create selinux_policy phony target · d4a3e9dd
      Jeff Vander Stoep authored
      Moves selinux policy build decisions to system/sepolicy/Android.mk.
      This is done because the PRODUCT_FULL_TREBLE variable isn't available
      in embedded.mk and TARGET_SANITIZE isn't available to dependencies of
      init.
      
      Test: Build/boot Bullhead PRODUCT_FULL_TREBLE=false
      Test: Build/boot Marlin PRODUCT_FULL_TREBLE=true
      Test: Build Marlin TARGET_SANITIZE=address. Verify asan rules are
            included in policy output.
      Bug: 36138508
      Change-Id: I20a25ffdfbe2b28e7e0f3e090a4df321e85e1235
      d4a3e9dd
    • Jeff Sharkey's avatar
      2224f30a
    • Treehugger Robot's avatar
    • Jeff Sharkey's avatar
      Define policy for "loop-control" device. · a8e0f76c
      Jeff Sharkey authored
      Per loop(4), this device is the preferred way of allocating new
      loop devices since Linux 3.1.
      
      avc: denied { read write } for name="loop-control" dev="tmpfs" ino=15221 scontext=u:r:vold:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=0
      
      Bug: 34903607
      Change-Id: I1f5f62cf0a1c24c6f6453100004812af4b8e1503
      a8e0f76c
  8. Mar 25, 2017
    • William Roberts's avatar
      build: stop generating $T/file_contexts · 5d0c2e41
      William Roberts authored
      
      secilc is being used without -f which is causing a file_contexts
      file to be generated in the root of the tree where the build tools
      run:
      
      $ stat $T/file_contexts
        File: 'file_contexts'
        Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
      Device: fc00h/64512d	Inode: 5508958     Links: 1
      Access: (0664/-rw-rw-r--)  Uid: ( 1000/wcrobert)   Gid: ( 1000/wcrobert)
      Access: 2017-03-23 11:23:41.691538047 -0700
      Modify: 2017-03-23 11:23:41.691538047 -0700
      Change: 2017-03-23 11:23:41.691538047 -0700
      
      Test: remove $T/file_contexts, touch a policy file and make sepolicy,
            ensure file is not regenerated. Also, ensure hikey builds and
            boots.
      
      Change-Id: I0d15338a540dba0194c65a1436647c7d38fe3c79
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      5d0c2e41
    • Steven Moreland's avatar
      adbd: use hal_client_domain · 7bd7d417
      Steven Moreland authored
      Bug: 36546152
      Bug: 36278706
      
      Test: `adb shell screencap ...` and pull and visually verify image.
      Change-Id: Iab2ddcfc145cb7f55104cd8f1ce0d58286bca282
      7bd7d417
    • Alex Deymo's avatar
    • Steven Moreland's avatar
      Allow system_server to dump stack traces for hals. · fac3144b
      Steven Moreland authored
      Test: `adb shell am hang --allow-restart` -> Watchdog dumps
        hal traces (eventually)
      Bug: 36414311
      
      Change-Id: I57e6875998b1f06a7deec1b8774facb75148d2c1
      fac3144b
  9. Mar 24, 2017
    • Alex Klyubin's avatar
      Merge "Mark all clients of Allocator HAL" · 73a6f38b
      Alex Klyubin authored
      73a6f38b
    • Alex Klyubin's avatar
      Mark all clients of Allocator HAL · 7cda44f4
      Alex Klyubin authored
      This change associates all domains which are clients of Allocator HAL
      with hal_allocator_client and the, required for all HAL client
      domains, halclientdomain.
      
      This enables this commit to remove the now unnecessary hwallocator_use
      macro because its binder_call(..., hal_allocator_server) is covered by
      binder_call(hal_allocator_client, hal_allocator_server) added in this
      commit.
      
      Unfortunately apps, except isolated app, are clients of Allocator HAL
      as well. This makes it hard to use the hal_client_domain(...,
      hal_allocator) macro because it translates into "typeattribute" which
      currently does not support being provided with a set of types, such as
      { appdomain -isolated_app }. As a workaround, hopefully until
      typeattribute is improved, this commit expresses the necessary
      association operation in CIL. private/technical_debt.cil introduced by
      this commit is appended into the platform policy CIL file, thus
      ensuring that the hack has effect on the final monolithic policy.
      
      P. S. This change also removes Allocator HAL access from isolated_app.
      Isolated app shouldn't have access to this HAL anyway.
      
      Test: Google Play Music plays back radios
      Test: Google Camera records video with sound and that video is then
            successfully played back with sound
      Test: YouTube app plays back clips with sound
      Test: YouTube in Chrome plays back clips with sound
      Bug: 34170079
      Change-Id: Id00bba6fde83e7cf04fb58bc1c353c2f66333f92
      7cda44f4
    • Alex Klyubin's avatar
      su and perfprofd are coredomain too · 6b558dcb
      Alex Klyubin authored
      This is a follow-up to f5446eb1 where
      I forgot to associate su and perfprofd domains with coredomain.
      
      Test: mmm system/sepolicy
            sepolicy-analyze $OUT/root/sepolicy attribute coredomain
      Bug: 35870313
      Change-Id: I13f90693843f7c6fe9fea8e5332aa6dd9558478a
      6b558dcb
    • Alex Klyubin's avatar
      Vendor domains must not use Binder · f5446eb1
      Alex Klyubin authored
      On PRODUCT_FULL_TREBLE devices, non-vendor domains (except vendor
      apps) are not permitted to use Binder. This commit thus:
      * groups non-vendor domains using the new "coredomain" attribute,
      * adds neverallow rules restricting Binder use to coredomain and
        appdomain only, and
      * temporarily exempts the domains which are currently violating this
        rule from this restriction. These domains are grouped using the new
        "binder_in_vendor_violators" attribute. The attribute is needed
        because the types corresponding to violators are not exposed to the
        public policy where the neverallow rules are.
      
      Test: mmm system/sepolicy
      Test: Device boots, no new denials
      Test: In Chrome, navigate to ip6.me, play a YouTube video
      Test: YouTube: play a video
      Test: Netflix: play a movie
      Test: Google Camera: take a photo, take an HDR+ photo, record video with
            sound, record slow motion video with sound. Confirm videos play
            back fine and with sound.
      Bug: 35870313
      Change-Id: I0cd1a80b60bcbde358ce0f7a47b90f4435a45c95
      f5446eb1
    • Treehugger Robot's avatar
  10. Mar 23, 2017
  11. Mar 22, 2017
    • Alex Klyubin's avatar
      Remove unnecessary rules from NFC HAL clients · e5395706
      Alex Klyubin authored
      Rules in clients of NFC HAL due to the HAL running (or previously
      running) in passthrough mode are now targeting hal_nfc. Domains which
      are clients of NFC HAL are associated with hal_nfc only the the HAL
      runs in passthrough mode. NFC HAL server domains are always associated
      with hal_nfc and thus get these rules unconditionally.
      
      This commit also moves the policy of nfc domain to private. The only
      thing remaining in the public policy is the existence of this domain.
      This is needed because there are references to this domain in public
      and vendor policy.
      
      Test: Open a URL in Chrome, NFC-tap Android to another Android and
            observe that the same URL is opened in a web browser on the
            destination device. Do the same reversing the roles of the two
            Androids.
      Test: Install an NFC reader app, tap a passive NFC tag with the
            Android and observe that the app is displaying information about
            the tag.
      Test: No SELinux denials to do with NFC before and during and after
            the above tests on sailfish, bullhead, and angler.
      Bug: 34170079
      
      Change-Id: I29fe43f63d64b286c28eb19a3a9fe4f630612226
      e5395706
    • Treehugger Robot's avatar
    • Treehugger Robot's avatar
    • Treehugger Robot's avatar
      6456542f
Loading