Add permission checking for binder IPC.

Signed-off-by: artas182x <artas182x@gmail.com>
Do not apply permission checks to private files.

Signed-off-by: artas182x <artas182x@gmail.com>
Fix security_binder_transfer_binder hook.

Drop the owning task argument to security_binder_transfer_binder
since ref->node->proc can be NULL (dead owner?).
Revise the SELinux checking to apply a single transfer check between
the source and destination tasks.  Owning task is no longer relevant.
Drop the receive permission definition as it is no longer used.

This makes the transfer permission similar to the call permission; it is only
useful if you want to allow a binder IPC between two tasks (call permission)
but deny passing of binder references between them (transfer permission).

Signed-off-by: artas182x <artas182x@gmail.com>
netfilter: xt_qtaguid: remove AID_* dependency for access control

qtaguid limits what can be done with /ctrl and /stats based on group
membership.
This changes removes AID_NET_BW_STATS and AID_NET_BW_ACCT, and picks
up the groups from the gid of the matching proc entry files.

Signed-off-by: JP Abgrall <jpa@google.com>
Change-Id: I42e477adde78a12ed5eb58fbc0b277cdaadb6f94
Signed-off-by: artas182x <artas182x@gmail.com>
netfilter: xt_qtaguid: extend iface stat to report protocols

In the past the iface_stat_fmt would only show global bytes/packets
for the skb-based numbers.
For stall detection in userspace, distinguishing tcp vs other protocols
makes it easier.
Now we report
  ifname total_skb_rx_bytes total_skb_rx_packets total_skb_tx_bytes
  total_skb_tx_packets {rx,tx}_{tcp,udp,ohter}_{bytes,packets}

Bug: 6818637
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: artas182x <artas182x@gmail.com>
netfilter: xt_qtaguid: Allow tracking loopback

In the past it would always ignore interfaces with loopback addresses.
Now we just treat them like any other.
This also helps with writing tests that check for the presence
of the qtaguid module.

Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: artas182x <artas182x@gmail.com>
netfilter: qtaguid: rate limit some of the printks

Some of the printks are in the packet handling path.
We now ratelimit the very unlikely errors to avoid
kmsg spamming.

Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: artas182x <artas182x@gmail.com>
panel-hx8389: Allow reading the kcal RGB values

Signed-off-by: artas182x <artas182x@gmail.com>
tspdrv: Add a sysfs control for timed vibrator strength

Signed-off-by: artas182x <artas182x@gmail.com>
apds9190: Fix gcc 4.7-induced failure

The int init function wasn't actually returning an int, and while the
default assumption for that case was OK with older compilers, it
failed hard with 4.7 resulting in random behavior

Signed-off-by: artas182x <artas182x@gmail.com>