Skip to content
Snippets Groups Projects
Select Git revision
  • c7594898dbce021677e6444eb855eb591df1097b
  • 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

uncrypt.te

Blame
    • William Roberts's avatar
      625a3526
      Replace unix_socket_connect() and explicit property sets with macro · 625a3526
      William Roberts authored
      
      A common source of mistakes when authoring sepolicy is properly
      setting up property sets. This is a 3 part step of:
      1. Allowing the unix domain connection to the init/property service
      2. Allowing write on the property_socket file
      3. Allowing the set on class property_service
      
      The macro unix_socket_connect() handled 1 and 2, but could be
      confusing for first time policy authors. 3 had to be explicitly
      added.
      
      To correct this, we introduce a new macros:
      set_prop(sourcedomain, targetprop)
      
      This macro handles steps 1, 2 and 3.
      
      No difference in sediff is expected.
      
      Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@linux.intel.com>
      625a3526
      History
      Replace unix_socket_connect() and explicit property sets with macro
      William Roberts authored
      
      A common source of mistakes when authoring sepolicy is properly
      setting up property sets. This is a 3 part step of:
      1. Allowing the unix domain connection to the init/property service
      2. Allowing write on the property_socket file
      3. Allowing the set on class property_service
      
      The macro unix_socket_connect() handled 1 and 2, but could be
      confusing for first time policy authors. 3 had to be explicitly
      added.
      
      To correct this, we introduce a new macros:
      set_prop(sourcedomain, targetprop)
      
      This macro handles steps 1, 2 and 3.
      
      No difference in sediff is expected.
      
      Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@linux.intel.com>
    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.