summaryrefslogtreecommitdiff
path: root/include/uapi/linux (follow)
Commit message (Collapse)AuthorAge
* 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>
* net: add PPP on PPTP Network Server (PPPoPNS) driver.Chia-chi Yeh2016-02-16
| | | | | | | | | Signed-off-by: Chia-chi Yeh <chiachi@android.com> ppopns: dont include px_proto define in if_pppopns.h Change-Id: I27e687667db5b45182562f4a517a2e6cec6b1350 Signed-off-by: Dima Zavin <dima@android.com>
* net: add PPP on L2TP Access Concentrator (PPPoLAC) driver.Chia-chi Yeh2016-02-16
| | | | | | | | | | Change-Id: I3ae3ee7520951ae24269db0ef2898c6455cf6bcc Signed-off-by: Chia-chi Yeh <chiachi@android.com> ppolac: dont include px_proto define in if_pppolac.h Change-Id: I55bc9cf91ea0e9e8f7bf5d6e241d188e1269343a Signed-off-by: Dima Zavin <dima@android.com>
* net: socket ioctl to reset connections matching local addressRobert Love2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new socket ioctl, SIOCKILLADDR, that nukes all sockets bound to the same local address. This is useful in situations with dynamic IPs, to kill stuck connections. Signed-off-by: Brian Swetland <swetland@google.com> net: fix tcp_v4_nuke_addr Signed-off-by: Dima Zavin <dima@android.com> net: ipv4: Fix a spinlock recursion bug in tcp_v4_nuke. We can't hold the lock while calling to tcp_done(), so we drop it before calling. We then have to start at the top of the chain again. Signed-off-by: Dima Zavin <dima@android.com> net: ipv4: Fix race in tcp_v4_nuke_addr(). To fix a recursive deadlock in 2.6.29, we stopped holding the hash table lock across tcp_done() calls. This fixed the deadlock, but introduced a race where the socket could die or change state. Fix: Before unlocking the hash table, we grab a reference to the socket. We can then unlock the hash table without risk of the socket going away. We then lock the socket, which is safe because it is pinned. We can then call tcp_done() without recursive deadlock and without race. Upon return, we unlock the socket and then unpin it, killing it. Change-Id: Idcdae072b48238b01bdbc8823b60310f1976e045 Signed-off-by: Robert Love <rlove@google.com> Acked-by: Dima Zavin <dima@android.com> ipv4: disable bottom halves around call to tcp_done(). Signed-off-by: Robert Love <rlove@google.com> Signed-off-by: Colin Cross <ccross@android.com> ipv4: Move sk_error_report inside bh_lock_sock in tcp_v4_nuke_addr When sk_error_report is called, it wakes up the user-space thread, which then calls tcp_close. When the tcp_close is interrupted by the tcp_v4_nuke_addr ioctl thread running tcp_done, it leaks 392 bytes and triggers a WARN_ON. This patch moves the call to sk_error_report inside the bh_lock_sock, which matches the locking used in tcp_v4_err. Signed-off-by: Colin Cross <ccross@android.com>
* input: misc: keychord: move header to uapiColin Cross2016-02-16
| | | | | | | | Move the entire contents of linux/keychord.h header to uapi, it only contains a userspace interface. Change-Id: If94f83328b19efb58c66391dce3bd8e927788d8d Signed-off-by: Colin Cross <ccross@android.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds2015-12-17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking fixes from David Miller: 1) Fix uninitialized variable warnings in nfnetlink_queue, a lot of people reported this... From Arnd Bergmann. 2) Don't init mutex twice in i40e driver, from Jesse Brandeburg. 3) Fix spurious EBUSY in rhashtable, from Herbert Xu. 4) Missing DMA unmaps in mvpp2 driver, from Marcin Wojtas. 5) Fix race with work structure access in pppoe driver causing corruptions, from Guillaume Nault. 6) Fix OOPS due to sh_eth_rx() not checking whether netdev_alloc_skb() actually succeeded or not, from Sergei Shtylyov. 7) Don't lose flags when settifn IFA_F_OPTIMISTIC in ipv6 code, from Bjørn Mork. 8) VXLAN_HD_RCO defined incorrectly, fix from Jiri Benc. 9) Fix clock source used for cookies in SCTP, from Marcelo Ricardo Leitner. 10) aurora driver needs HAS_DMA dependency, from Geert Uytterhoeven. 11) ndo_fill_metadata_dst op of vxlan has to handle ipv6 tunneling properly as well, from Jiri Benc. 12) Handle request sockets properly in xfrm layer, from Eric Dumazet. 13) Double stats update in ipv6 geneve transmit path, fix from Pravin B Shelar. 14) sk->sk_policy[] needs RCU protection, and as a result xfrm_policy_destroy() needs to free policies using an RCU grace period, from Eric Dumazet. 15) SCTP needs to clone ipv6 tx options in order to avoid use after free, from Eric Dumazet. 16) Missing kbuild export if ila.h, from Stephen Hemminger. 17) Missing mdiobus_alloc() return value checking in mdio-mux.c, from Tobias Klauser. 18) Validate protocol value range in ->create() methods, from Hannes Frederic Sowa. 19) Fix early socket demux races that result in illegal dst reuse, from Eric Dumazet. 20) Validate socket address length in pptp code, from WANG Cong. 21) skb_reorder_vlan_header() uses incorrect offset and can corrupt packets, from Vlad Yasevich. 22) Fix memory leaks in nl80211 registry code, from Ola Olsson. 23) Timeout loop count handing fixes in mISDN, xgbe, qlge, sfc, and qlcnic. From Dan Carpenter. 24) msg.msg_iocb needs to be cleared in recvfrom() otherwise, for example, AF_ALG will interpret it as an async call. From Tadeusz Struk. 25) inetpeer_set_addr_v4 forgets to initialize the 'vif' field, from Eric Dumazet. 26) rhashtable enforces the minimum table size not early enough, breaking how we calculate the per-cpu lock allocations. From Herbert Xu. 27) Fix FCC port lockup in 82xx driver, from Martin Roth. 28) FOU sockets need to be freed using RCU, from Hannes Frederic Sowa. 29) Fix out-of-bounds access in __skb_complete_tx_timestamp() and sock_setsockopt() wrt. timestamp handling. From WANG Cong. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (117 commits) net: check both type and procotol for tcp sockets drivers: net: xgene: fix Tx flow control tcp: restore fastopen with no data in SYN packet af_unix: Revert 'lock_interruptible' in stream receive code fou: clean up socket with kfree_rcu 82xx: FCC: Fixing a bug causing to FCC port lock-up gianfar: Don't enable RX Filer if not supported net: fix warnings in 'make htmldocs' by moving macro definition out of field declaration rhashtable: Fix walker list corruption rhashtable: Enforce minimum size on initial hash table inet: tcp: fix inetpeer_set_addr_v4() ipv6: automatically enable stable privacy mode if stable_secret set net: fix uninitialized variable issue bluetooth: Validate socket address length in sco_sock_bind(). net_sched: make qdisc_tree_decrease_qlen() work for non mq ser_gigaset: remove unnecessary kfree() calls from release method ser_gigaset: fix deallocation of platform device structure ser_gigaset: turn nonsense checks into WARN_ON ser_gigaset: fix up NULL checks qlcnic: fix a timeout loop ...
| * openvswitch: fix trivial comment typoPaolo Abeni2015-12-14
| | | | | | | | | | | | | | | | | | | | The commit 33db4125ec74 ("openvswitch: Rename LABEL->LABELS") left over an old OVS_CT_ATTR_LABEL instance, fix it. Fixes: 33db4125ec74 ("openvswitch: Rename LABEL->LABELS") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Acked-by: Joe Stringer <joe@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * uapi: export ila.hstephen hemminger2015-12-11
| | | | | | | | | | | | | | | | The file ila.h used for lightweight tunnels is being used by iproute2 but is not exported yet. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge tag 'vfio-v4.4-rc5' of git://github.com/awilliam/linux-vfioLinus Torvalds2015-12-09
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull VFIO fixes from Alex Williamson: - Various fixes for removing redundancy, const'ifying structs, avoiding stack usage, fixing WARN usage (Krzysztof Kozlowski, Julia Lawall, Kees Cook, Dan Carpenter) - Revert No-IOMMU mode as the intended user has not emerged (Alex Williamson) * tag 'vfio-v4.4-rc5' of git://github.com/awilliam/linux-vfio: Revert: "vfio: Include No-IOMMU mode" vfio: fix a warning message vfio: platform: remove needless stack usage vfio-pci: constify pci_error_handlers structures vfio: Drop owner assignment from platform_driver
| * Revert: "vfio: Include No-IOMMU mode"Alex Williamson2015-12-04
| | | | | | | | | | | | | | | | | | Revert commit 033291eccbdb ("vfio: Include No-IOMMU mode") due to lack of a user. This was originally intended to fill a need for the DPDK driver, but uptake has been slow so rather than support an unproven kernel interface revert it and revisit when userspace catches up. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
* | nfs: use btrfs ioctl defintions for cloneChristoph Hellwig2015-11-23
|/ | | | | | | | The NFS CLONE_RANGE defintion was wrong and thus never worked. Fix this by simply using the btrfs ioctl defintion. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>