Skip to content
Snippets Groups Projects
Select Git revision
  • 308e3c46643ae404f8d48c9e0c6735e105a89c6f
  • master default protected
  • android-7.1.2_r28_klist
  • pie-cts-release
  • pie-vts-release
  • pie-cts-dev
  • oreo-mr1-iot-release
  • sdk-release
  • oreo-m6-s4-release
  • oreo-m4-s12-release
  • pie-release
  • pie-r2-release
  • pie-r2-s1-release
  • oreo-vts-release
  • oreo-cts-release
  • oreo-dev
  • oreo-mr1-dev
  • pie-gsi
  • pie-platform-release
  • pie-dev
  • oreo-cts-dev
  • android-o-mr1-iot-release-1.0.4
  • android-9.0.0_r8
  • android-9.0.0_r7
  • android-9.0.0_r6
  • android-9.0.0_r5
  • android-8.1.0_r46
  • android-8.1.0_r45
  • android-n-iot-release-smart-display-r2
  • android-vts-8.1_r5
  • android-cts-8.1_r8
  • android-cts-8.0_r12
  • android-cts-7.1_r20
  • android-cts-7.0_r24
  • android-o-mr1-iot-release-1.0.3
  • android-cts-9.0_r1
  • android-8.1.0_r43
  • android-8.1.0_r42
  • android-n-iot-release-smart-display
  • android-p-preview-5
  • android-9.0.0_r3
41 results

service.te

Blame
    • Peng Xu's avatar
      7df44d82
      Allow all apps to discover contexthub_service · 7df44d82
      Peng Xu authored
      This allows system app, regular app as well as test app to access
      ContextHubManager API. Additional "signature|privilige" permission
      requirement (LOCATION_HARDWARE) still exist to prevent security
      issues, misuse and abuse.
      
      Change-Id: I47f3d243a3de7f1202c933fc715a935c43cf319b
      7df44d82
      History
      Allow all apps to discover contexthub_service
      Peng Xu authored
      This allows system app, regular app as well as test app to access
      ContextHubManager API. Additional "signature|privilige" permission
      requirement (LOCATION_HARDWARE) still exist to prevent security
      issues, misuse and abuse.
      
      Change-Id: I47f3d243a3de7f1202c933fc715a935c43cf319b
    register_functions 1.91 KiB
    ### Important:
    USBIP does not register directly via usb_... instead it first
    registers a platform driver and matching platform device. In the platform
    driver it then registers itself as usb controller.
    
    => All other modules with non-real-bus components seem to do the same thing.
    So we should probably do the same. This approach is also better because
    the system then knows that there is a driver and we can monitor it better.
    
    
    ### BLOCK/CHARACTER 
    Trivial over register_chrdev, register_blkdev
    
    ### USB:
    HCD means Host Controller Device
    See: usbip
    usb_create_hcd(...)
    usb_add_hcd(...)
    usb_put_hcd(...)
    
    
    ### ATA:
    ata_host_register(...)
    /drivers/ata/pata_cs5520.c
    
    ata_host_alloc_pinfo(...)
    ata_port_pbar_desc(...)
    ata_host_activate(...)
    /drivers/ata/sata_sx4.c
    
    There are a lot of options. The ata operations are inherited between the drivers. Closer look needed here. struct ata_port_operations are the operations supported by a ata device.
    These have to be overriden because defaults (in libata-sff.c) use direct port access.
    
    
    ### NETWORK DEVICE:
    register_netdev(...) 
    See: http://linuxgazette.net/156/jangir.html
    
    
    ### TTY DEVICE:
    struct tty_operations
    struct tty_port_operations
    
    alloc_tty_driver(...)
    tty_set_operations(...)
    tty_register_driver(...)
    See: /drivers/tty/isicom.c
    
    Uart etc is below this interface, we could also just add a serial device (uart).
    
    
    ### GRAPHIC CARD:
    Is possible via struct drm_driver
    
    See: /drivers/gpu/drm/bochs/[bocks_drv.c]
    
    ### GENERAL
    The general approach is to search for a layer where we want to inject out device. Then we implement a driver which does everything under this layer. All the drivers which are over our layer are used and can be debugged. All the drivers under our layer are not used and can not be debugged. The device concept in the linux kernel is orthogonal to this layers, because all the layer drivers are in a shared context as "drivers".
    
    TODO: Draw some kind of map which shows this layers.