summaryrefslogtreecommitdiff
path: root/include/uapi/linux (follow)
Commit message (Collapse)AuthorAge
...
* | | | net/ipv6/addrconf: IPv6 tethering enhancementTianyi Gou2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new procfs flag to toggle the automatic addition of prefix routes on a per device basis. The new flag is accept_ra_prefix_route. Defaults to 1 as to not break existing behavior. CRs-Fixed: 435320 Change-Id: If25493890c7531c27f5b2c4855afebbbbf5d072a Acked-by: Harout S. Hedeshian <harouth@qti.qualcomm.com> Signed-off-by: Tianyi Gou <tgou@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | netfilter: xtables: hardidletimer target implementationBhavya Sokke Mallikarjunappa2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a hardidletimer Xtables target that can be used to identify when interfaces have been idle for a certain period of time. Timers are identified by labels and are created when a rule is set with a new label. The rules also take a timeout value (in seconds) as an option. If more than one rule uses the same timer label, the timer will be restarted whenever any of the rules get a hit. One entry for each timer is created in sysfs. This attribute contains the timer remaining for the timer to expire. The attributes are located under the xt_idletimer class: /sys/class/xt_hardidletimer/timers/<label> When the timer expires, the target module sends a sysfs notification to the userspace, which can then decide what to do (eg. disconnect to save power) Compared to xt_IDLETIMER, xt_HARDIDLETIMER can send notifications when CPU is in suspend too, to notify the timer expiry Change-Id: I1723d44e02df864d63da7550766ea7d763076de2 Signed-off-by: Bhavya Sokke Mallikarjunappa <bsokke@codeaurora.org>
* | | | net: sockev: Initial CommitHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added module which subscribes to socket notifier events. Notifier events are then converted to a multicast netlink message for user space applications to consume. CRs-Fixed: 626021 Change-Id: Id5c6808d972b69f5f065d7fba9094e75c6ad0b2c Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: core: add MAP support to RPS flow dissectorHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More efficiently utilize multiple cores when using MAP encoded frames. RPS flow dissector now appropriately decodes IPv4 and IPv6 frames with MAP headers prepended. CRs-Fixed: 681280 Change-Id: Ia4dde47fcc0f3436dcaa71a5160c0a59fe7ed53a Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | rtc: alarm: Add power-on alarm featureMao Jinlong2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android does not support powering-up the phone through alarm. Set rtc alarm in timerfd to power-up the phone after alarm expiration. Change-Id: I781389c658fb00ba7f0ce089d706c10f202a7dc6 Signed-off-by: Mao Jinlong <c_jmao@codeaurora.org>
* | | | Snapshot: SSC Sensor driverSatya Durga Srinivasu Prabhala2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This snapshot is taken as of msm-3.18 commit 95a59da3cf (msm: hdcp: proper state sanitization for different versions) Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
* | | | soc: qcom: Snapshot of thermal/LMH driversMahesh Sivasubramanian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This snapshot is taken as of msm-3.18 commit e70ad0c (Promotion of kernel.lnx.3.18-151201.) Include necessary thermal_core changes to convert long to int inline with upstream kernel changes. Change-Id: I642b666518fe72385794b743989a0f5e5120ec03 Conflicts: drivers/thermal/Makefile
* | | | net: ipc_router: Add snapshot of IPC RouterKarthikeyan Ramasubramanian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of kernel.lnx.3.18-151201.) Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
* | | | uapi: fix export of msm_ion.hJeremy Gebben2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make this file be exported via symlink like the rest of the android staging uapi headers. Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
* | | | soc: qcom: idle: Snapshot of idle/sleep driver as of msm-3.18Mahesh Sivasubramanian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a snapshot of the Sleep driver and realted functionality as of e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 on msm-3.18 branch Change-Id: I98fec26849898c5c66abbb1b094439780c23964d
* | | | msm_rmnet: merge support for RAWIP msm_rmnet deviceAbhijeet Dharmapurikar2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add to support for msm_rmnet device using ARPHRD_RAWIP. Change-Id: Ie1e5433f440b26b644cccb18083ef325129f7942 Acked-by: Andrew Richardson <randrew@qualcomm.com> Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
* | | | net_sched: Add flow control support to prio qdiscTianyi Gou2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add enable_flow flag to the prio qdisc. Packet flow is enabled by default, but can be disabled from userspace (e.g. IPROUTE2 tc tool). This allows for suspending packet dequeue on a per-qdisc basis, which is needed to supprot Quality of Service (QOS) when using WWAN modem. Change-Id: I932f296be946f1acc3b00c7d8569bbb733d33622 Acked-by: Andrew Richardson <randrew@qualcomm.com> CRs-Fixed: 283471 Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
* | | | rmnet_data : Changes to support Scatter Gather and GSO.Ravinder Konka2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables hardware device features such as NETIF_F_SG NETIF_F_GSO NETIF_F_GSO_UDP_TUNNEL NETIF_F_GSO_UDP_TUNNEL_CSUM. This patch also ensures to skip padding(to align length to word boundaries) for outgoing non linear skbs. This patch also adds a new ioctl interface RMNET_IOCTL_GET_SG_SUPPORT to query the physical network devices for Scatter Gather support. Change-Id: I9788d75c249ab2dac5b598dad131c0692ed84e4d Acked-by: Abhishek Chauhan <abchauha@qti.qualcomm.com> Signed-off-by: Ravinder Konka <rkonka@codeaurora.org>
* | | | net: msm_rmnet: Add an IOCTL definition to deregister a net deviceRavinder Konka2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Platform drivers may be registered on driver startup for multiple channels which may cause probe and remove events to be called corresponding to driver events. It is possible that not all channels need to be enumerated for normal device operation. The unused channels also add unnecessary delay during sub system restart. Add an extended IOCTL which provides user space an option to unregister a platform driver. Change-Id: Ifa6284563551ecdd297ae457ea2b35027f60844e Acked-by: Nagarjuna Chaganti <nchagant@qti.qualcomm.com> Signed-off-by: Ravinder Konka <rkonka@codeaurora.org> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: msm_rmnet: extend SET_INGRESS_DATA_FORMAT to include AGG dataHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced new format flag for RMNET_IOCTL_SET_INGRESS_DATA_FORMAT: RMNET_IOCTL_INGRESS_FORMAT_AGG_DATA This flag is set by the entity callint the IOCTL if the ingress_format union has been populated with a valid aggregation count and buffer size. Change-Id: Icb30c99e69062736c343591226fbdb499aa47a41 Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
* | | | net: msm_rmnet: Add an extended ioctl definition to pass xlat device infoHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an ioctl for passing rmnet_data device name to the physical device driver for xlat capable calls. This information is used by the driver to optimize traffic on the rmnet_data device. CRs-Fixed: 762178 Change-Id: Ib19730d239882f0900ca2dbd91e5252fefd63053 Acked-by: Sudharsan Coimbatore Premkumar <supremku@qti.qualcomm.com> Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
* | | | net: msm_rmnet.h: Add sleep state extended IOCTLSubash Abhinov Kasiviswanathan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add extended IOCTL to set and reset the sleep states of the underlying physical transport. CRs-Fixed: 679058 Change-Id: I962e016abf3bfa4b468591039b79cef58fbb8b3b Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: msm_rmnet.h: Fix data type of flow_id in QoS headerSubash Abhinov Kasiviswanathan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an issue where the flow_id was appearing to be 8 bytes in 64 bit platforms. This is because the flow_id is declared as unsigned long which is 8 bytes in 64 bit and 4 bytes in 32 bit platforms. Change the flow_id to uint32_t to make it 4 bytes on all platforms. CRs-fixed: 663814 Change-Id: I2472fb99750d1818ecfae03b5bcd860f19ac51a7 Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: rmnet_data: Add support for MAPv4 data formatSubash Abhinov Kasiviswanathan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the MAPv4 ingress and data format handlers. MAPv4 requires the checksum for uplink TCP and UDP packets to be 1's complemented before passing the packet onto the physical netdevice. This workaround is needed due to failures seen in hardware while processing translated packets. Change-Id: Ib79382fa7e8b2bd0c1adbe68b8de75f1602df10b Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: rmnet_data: add support for UL MAP based checksum offloadSivan Reinstein2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add UL checksum offload routines for MAPv3. Can bypass checksum software for IPv4/IPv6 TCP/UDP protocols. Set rmnet_data VNDs hw_flags to NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM to define the checksum offload abilities. Add UL checksum meta-info header for IPv4/IPv6 TCP/UDP packets for which UL checksum is being offloaded. CRs-fixed: 731693 Change-Id: Ief139d357b528aead66acfe39a5227328b8fbf93 Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
* | | | net: rmnet_data: Add documentation for configuration structuresHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Better document the configuration structures and the element usage. Anticipating more elements being added in the near term. Change-Id: I5ca90b7a776072d6b1ac4838782cada38f4fea3b Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
* | | | net: rmnet_data: add support for DL MAP based checksum offloadSivan Reinstein2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add DL checksum offload routines for MAPv3. Can bypass checksum software for IPv4/IPv6 TCP/UDP protocols. CRs-fixed: 692334 Change-Id: Ic13a5d9a1ebfdc57b6eb53ee93da92c3aee547b1 Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
* | | | net: rmnet_data: Move MAP header definition to UAPIHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose the MAP header to the rest of the kernel and user space. Useful for making various parts of the kernel MAP aware. Keeping consistency with other networking procols by exposing protocol headers to user space with a header file in UAPI. CRs-Fixed: 681280 Change-Id: Ic7f414f926f68531418725f971ab2b44459f5ea1 Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: rmnet_data: modify 8-byte QoS HeaderSubash Abhinov Kasiviswanathan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clients consuming the 8-byte QoS header expect the flowID in a different position in the header thus causing random address dereference and a potential crash. Update the 8-byte QoS header format structure as specified in the mandated QOS specification CRs-Fixed: 625709 Change-Id: I58c662ff2f3adfe9584d19891339ea31ce0c8bd3 Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: rmnet_data: new structure for rmnet ioctlsHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies the rmnet ioctls RMNET_IOCTL_GET_LLP, RMNET_IOCTL_GET_QOS, RMNET_IOCTL_GET_OPMODE, RMNET_IOCTL_FLOW_ENABLE and RMNET_IOCTL_FLOW_DISABLE to avoid putting integral data in pointers and avoid casting between 32 and 64 bits types. CRs-Fixed: 601207 Change-Id: I66edb785f6204f38b6f0ecccb2ceab36d5e38188 Acked-by: Sivan Reinstein <sivanr@qti.qualcomm.com> Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> [subashab@codeaurora.org: remove driver specific changes] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | net: rmnet_data: Add support for guaranteed paddingHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new parameter tail_spacing to RMNET_NETLINK_SET_LINK_INGRESS_DATA_FORMAT in order to support an additional fixed padding on packets. Required to support RNDIS tethering. CRs-Fixed: 579184 Change-Id: I58bbbfbaa68a28b25a96f52b04165285de9c24ef Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
* | | | net: rmnet_data: Enhancements to support SSRHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaned up refcount on get_dev_by_name. Added new APIs to support cleanup of configuration and virtual devices. Added explicit reference managment in association/un-association and when setting/unsetting logical EP. CRs-Fixed: 596227 Change-Id: Ic67bb649b0f0420d9a1e4bf5664ed63c0ff7d8bf Signed-off-by: Harout Hadeshian <harouth@codeaurora.org>
* | | | net: rmnet_data: 8-byte QoS Header SupportHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement 8-byte QoS header support in order to fix alignment issues on HSIC transport and increase throughput CRs-Fixed: 579132 Change-Id: I3e53571d36bd71705abcb1473290929f8227e6f3 Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
* | | | net: msm_rmnet.h: Fix IOCTL numbering for newly introduced IOCTLsHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix IOCTLs with invalid numbers. Addresses limitation in network IOCTL code which prevents more than 16 user defined IOCTLs. All new IOCTLs have been multiplexed into a single user defined ioctl. Required to support RmNet Data features. CRs-Fixed: 554883 Change-Id: Ic33bdf068f7e4014272d3b47ed7b07f5d4a6be2c Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
* | | | net: rmnet_data: In-band flow controlHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement MAP based in-band flow control. Added 2 new configuration messages to allow adding and deleting flow handles. Added handlers in VND for flow control events. Added flow control command handler in rmnet_map_commands. CRs-fixed: 568534 Change-Id: Ica52e4ad89430c9fa5e2b38e389ee6bc91de2e9b Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
* | | | net: rmnet_data: Add support for user defined device name prefixHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run-time user space components can now specify virtual network device name prefix at device creation. This will be used to support legacy data services. CRs-Fixed: 555507 Change-Id: Id34c2761f2060e66b05c521304d5151620ba5665 Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
* | | | RmNet Data: Initial releaseHarout Hedeshian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RmNet Data driver provides a transport agnostic MAP (multiplexing and aggregation protocol) support in embedded and bridge modes. Module provides virtual network devices which can be attached to any IP-mode physical device. This will be used to provide all MAP functionality on future hardware in a single consistent location. CRs-Fixed: 525675 Change-Id: I739947c9c3de008974dd485a74e9953ba2cbb75e Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> [subashab@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
* | | | ion: Export ion headers to userspaceLaura Abbott2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ion headers need to go to userspace. Export them via the staging tree Change-Id: I9b622efaae3d0ed764ce064da228112c363c066d Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
* | | | uapi: export android staging headersJeremy Gebben2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several uapi headers required for android that are in drivers/staging/android/uapi. Create symlinks for these files in include/uapi/linux so that we can export them without messing up Kbuild. Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
* | | | usb: gadget: f_gsi: Add support for configFSHemant Kumar2016-03-22
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds APIs to allocate and instanciate multi instance gsi function driver using configFS. Add an entry in kconfig to select diag driver for configFS. This change fixes all compilation errors caused by moving gsi driver from android.c to compile independently. Change-Id: I0ddb2ca155fd29c6d58fb561cc197f8efee3495a Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
* | | net: diag: Add the ability to destroy a socket.Lorenzo Colitti2016-02-25
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | This patch adds a SOCK_DESTROY operation, a destroy function pointer to sock_diag_handler, and a diag_destroy function pointer. It does not include any implementation code. [backport of net-next 64be0aed59ad519d6f2160868734f7e278290ac1] Change-Id: Ic5327ff14b39dd268083ee4c1dc2c934b2820df5 Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ext4: Add support for FIDTRIM, a best-effort ioctl for deep discard trimJP Abgrall2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * What This provides an interface for issuing an FITRIM which uses the secure discard instead of just a discard. Only the eMMC command is "secure", and not how the FS uses it: due to the fact that the FS might reassign a region somewhere else, the original deleted data will not be affected by the "trim" which only handles un-used regions. So we'll just call it "deep discard", and note that this is a "best effort" cleanup. * Why Once in a while, We want to be able to cleanup most of the unused blocks after erasing a bunch of files. We don't want to constantly secure-discard via a mount option. From an eMMC spec perspective, it tells the device to really get rid of all the data for the specified blocks and not just put them back into the pool of free ones (unlike the normal TRIM). The eMMC spec says the secure trim handling must make sure the data (and metadata) is not available anymore. A simple TRIM doesn't clear the data, it just puts blocks in the free pool. JEDEC Standard No. 84-A441 7.6.9 Secure Erase 7.6.10 Secure Trim From an FS perspective, it is acceptable to leave some data behind. - directory entries related to deleted files - databases entries related to deleted files - small-file data stored in inode extents - blocks held by the FS waiting to be re-used (mitigated by sync). - blocks reassigned by the FS prior to FIDTRIM. Change-Id: I676a1404a80130d93930c84898360f2e6fb2f81e Signed-off-by: Geremy Condra <gcondra@google.com> Signed-off-by: JP Abgrall <jpa@google.com>
* | mm: add a field to store names for private anonymous memoryColin Cross2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Userspace processes often have multiple allocators that each do anonymous mmaps to get memory. When examining memory usage of individual processes or systems as a whole, it is useful to be able to break down the various heaps that were allocated by each layer and examine their size, RSS, and physical memory usage. This patch adds a user pointer to the shared union in vm_area_struct that points to a null terminated string inside the user process containing a name for the vma. vmas that point to the same address will be merged, but vmas that point to equivalent strings at different addresses will not be merged. Userspace can set the name for a region of memory by calling prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, start, len, (unsigned long)name); Setting the name to NULL clears it. The names of named anonymous vmas are shown in /proc/pid/maps as [anon:<name>] and in /proc/pid/smaps in a new "Name" field that is only present for named vmas. If the userspace pointer is no longer valid all or part of the name will be replaced with "<fault>". The idea to store a userspace pointer to reduce the complexity within mm (at the expense of the complexity of reading /proc/pid/mem) came from Dave Hansen. This results in no runtime overhead in the mm subsystem other than comparing the anon_name pointers when considering vma merging. The pointer is stored in a union with fieds that are only used on file-backed mappings, so it does not increase memory usage. Includes fix from Jed Davis <jld@mozilla.com> for typo in prctl_set_vma_anon_name, which could attempt to set the name across two vmas at the same time due to a typo, which might corrupt the vma list. Fix it to use tmp instead of end to limit the name setting to a single vma at a time. Change-Id: I9aa7b6b5ef536cd780599ba4e2fba8ceebe8b59f Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* | prctl: reset PR_SET_TIMERSLACK_PID value to avoid conflictAmit Pundir2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR_SET_TIMERSLACK_PID value keep colliding with that of newer prctls in mainline (e.g. first with PR_SET_THP_DISABLE, and again with PR_MPX_ENABLE_MANAGEMENT). So reset PR_SET_TIMERSLACK_PID to a large number so as to avoid conflict in the near term while it is out of mainline tree. Corresponding Change-Id up for review in platform/system/core is Icd8c658c8eb62136dc26c2c4c94f7782e9827cdb Change-Id: I061b25473acc020c13ee22ecfb32336bc358e76a Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
* | prctl: adds PR_SET_TIMERSLACK_PID for setting timer slack of an arbitrary ↵Ruchi Kandoi2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thread. Second argument is similar to PR_SET_TIMERSLACK, if non-zero then the slack is set to that value otherwise sets it to the default for the thread. Takes PID of the thread as the third argument. This allows power/performance management software to set timer slack for other threads according to its policy for the thread (such as when the thread is designated foreground vs. background activity) Change-Id: I744d451ff4e60dae69f38f53948ff36c51c14a3f Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* | usb: gadget: f_accessory: move userspace interface to uapiColin Cross2016-02-16
| | | | | | | | | | | | | | | | Move the entire contents of linux/usb/f_accessory.h header to uapi, it only contains a userspace interface. Change-Id: Ieb5547da449588ae554988a201c0e6b4e3afc531 Signed-off-by: Colin Cross <ccross@android.com>
* | usb: gadget: f_mtp: move userspace interface to uapiColin Cross2016-02-16
| | | | | | | | | | | | | | | | | | Move the most of linux/usb/f_mtp.h header to uapi. Move the only remaining structure definition into f_mtp.c, the only place that uses it. Change-Id: I952c1a9dc15c36bf295a0eb4d74b6b1ad912ed03 Signed-off-by: Colin Cross <ccross@android.com>
* | netfilter: xt_qtaguid/socket: build fixes for 4.4Amit Pundir2016-02-16
| | | | | | | | | | | | | | | | | | Update xt_socket_lookup_slow_v* usage in aosp patches, to align with changes from mainline commit 686c9b50809d "netfilter: x_tables: Use par->net instead of computing from the passed net devices". Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
* | netfilter: xt_qtaguid: xt_socket: build fixesAmit Pundir2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Add missing header <linux/miscdevice.h> and use xt_socket_lookup_slow_v* instead of xt_socket_get*_sk in xt_qtaguid.c. Fix xt_socket_lookup_slow_v* functions in xt_socket.c and declare them in xt_socket.h Change-Id: I55819b2d4ffa82a2be20995c87d28fb5cc77b5ba Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
* | xt_qtaguid: use sock_gen_put() instead of xt_socket_put_sk()Amit Pundir2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing obsolete xt_socket_put_sk() and using sock_gen_put() instead. xt_socket_put_sk() was reintroduced for xt_qtaguid in one of the patches, but it turned out sock_gen_put() supersedes xt_socket_put_sk(). So we don't need xt_socket_put_sk() any more. This patch is based on commit 1a8bf6eeef9f (netfilter: xt_socket: use sock_gen_put()) Change-Id: I976d5f7f7eded0f3cc91b596acfeb35e4c2057e5 Signed-off-by: Amit Pundir <amit.pundir@linaro.org> (cherry picked from commit 551780fc28cb7480dbc4f585ef80ca02c2922ec1) Signed-off-by: John Stultz <john.stultz@linaro.org>
* | netfilter: Build fixups - kuid/kguid changes & xt_socket_get/put_skJohn Stultz2016-02-16
| | | | | | | | | | | | | | | | | | Fix up build kuid/kguid build issues in netfilter code. Also re-add the xt_socket_get/put_sk interfaces needed by xt_qtaguid. Change-Id: I7027fb840e109785bddffe8ea717b8d018b26d82 Signed-off-by: John Stultz <john.stultz@linaro.org>
* | net: core: Support UID-based routing.Lorenzo Colitti2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This contains the following commits: 1. cc2f522 net: core: Add a UID range to fib rules. 2. d7ed2bd net: core: Use the socket UID in routing lookups. 3. 2f9306a net: core: Add a RTA_UID attribute to routes. This is so that userspace can do per-UID route lookups. 4. 8e46efb net: ipv6: Use the UID in IPv6 PMTUD IPv4 PMTUD already does this because ipv4_sk_update_pmtu uses __build_flow_key, which includes the UID. Bug: 15413527 Change-Id: Iae3d4ca3979d252b6cec989bdc1a6875f811f03a Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
* | net: ipv6: autoconf routes into per-device tablesLorenzo Colitti2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, IPv6 router discovery always puts routes into RT6_TABLE_MAIN. This causes problems for connection managers that want to support multiple simultaneous network connections and want control over which one is used by default (e.g., wifi and wired). To work around this connection managers typically take the routes they prefer and copy them to static routes with low metrics in the main table. This puts the burden on the connection manager to watch netlink to see if the routes have changed, delete the routes when their lifetime expires, etc. Instead, this patch adds a per-interface sysctl to have the kernel put autoconf routes into different tables. This allows each interface to have its own autoconf table, and choosing the default interface (or using different interfaces at the same time for different types of traffic) can be done using appropriate ip rules. The sysctl behaves as follows: - = 0: default. Put routes into RT6_TABLE_MAIN as before. - > 0: manual. Put routes into the specified table. - < 0: automatic. Add the absolute value of the sysctl to the device's ifindex, and use that table. The automatic mode is most useful in conjunction with net.ipv6.conf.default.accept_ra_rt_table. A connection manager or distribution could set it to, say, -100 on boot, and thereafter just use IP rules. Change-Id: I82d16e3737d9cdfa6489e649e247894d0d60cbb1 Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
* | netfilter: xt_IDLETIMER: Add new netlink msg typeJP Abgrall2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send notifications when the label becomes active after an idle period. Send netlink message notifications in addition to sysfs notifications. Using a uevent with subsystem=xt_idletimer INTERFACE=... STATE={active,inactive} This is backport from common android-3.0 commit: beb914e987cbbd368988d2b94a6661cb907c4d5a with uevent support instead of a new netlink message type. Change-Id: I31677ef00c94b5f82c8457e5bf9e5e584c23c523 Signed-off-by: Ashish Sharma <ashishsharma@google.com> Signed-off-by: JP Abgrall <jpa@google.com>
* | net: move PPPoLAC and PPPoPNS headers to uapiColin Cross2016-02-16
| | | | | | | | | | | | | | | | | | Move the entire contents of the linux/if_pppolac.h and linux/if_pppopns.h headers to uapi, they only contain userspace interfaces. Change-Id: I3cfed7f2ae400b53269a1f59144aa3dbc30ae0b5 Signed-off-by: Colin Cross <ccross@android.com>