summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-04-13libnl: mark as vendor_availableandroid-wear-o-preview-4android-wear-o-preview-3android-wear-8.0.0_r2android-wear-8.0.0_r1android-vts-8.0_r2android-vts-8.0_r1aosp-new/oreo-devSteven Moreland1-0/+1
By setting vendor_available, the following may become true: * a prebuilt library from this release may be used at runtime by in a later releasse (by vendor code compiled against this release). so this library shouldn't depend on runtime state that may change in the future. * this library may be loaded twice into a single process (potentially an old version and a newer version). The symbols will be isolated using linker namespaces, but this may break assumptions about 1 library in 1 process (your singletons will run twice). Background: This means that these modules may be built and installed twice -- once for the system partition and once for the vendor partition. The system version will build just like today, and will be used by the framework components on /system. The vendor version will build against a reduced set of exports and libraries -- similar to, but separate from, the NDK. This means that all your dependencies must also mark vendor_available. At runtime, /system binaries will load libraries from /system/lib*, while /vendor binaries will load libraries from /vendor/lib*. There are some exceptions in both directions -- bionic(libc,etc) and liblog are always loaded from /system. And SP-HALs (OpenGL, etc) may load /vendor code into /system processes, but the dependencies of those libraries will load from /vendor until it reaches a library that's always on /system. In the SP-HAL case, if both framework and vendor libraries depend on a library of the same name, both versions will be loaded, but they will be isolated from each other. It's possible to compile differently -- reducing your source files, exporting different include directories, etc. For details see: https://android-review.googlesource.com/368372 None of this is enabled unless the device opts into the system/vendor split with BOARD_VNDK_VERSION := current. Bug: 36426473 Bug: 36079834 Test: m -j libnl Test: attempt to compile with BOARD_VNDK_VERSION := current Change-Id: I84c5f871cba9c0e67350e04f5e9f34489470f34e
2017-04-13libnl: Android.mk -> Android.bpSteven Moreland2-46/+50
Converting to be able to use some Soong features not available in make. Test: (sanity) build and flash marlin device, works Bug: 33241851 Change-Id: If1f3f5fd5f6b1999011c25ac8b8107f12648435b
2017-02-10Merge "Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: ↵android-o-preview-1aosp-new/o-previewPaul Stewart0-0/+0
d42374324d am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 am: 642a497f9c am: 170a7d24f4 am: 0a37ab0fdd am: 1ff6ec5e40 am: a96b31573c" into nyc-mr2-dev-plus-aosp am: 91c684b0a7 Change-Id: I50e62302f46220effafb85ae9ad8664e9a144181
2017-02-10Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 am: 642a497f9c am: 170a7d24f4 am: 0a37ab0fdd am: 1ff6ec5e40 am: a1fbdcb6df am: 8ebc658da0 Change-Id: I7efccc7b4c8a55c5006099b4d8f0d04f1908a897
2017-02-10Merge "Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: ↵Android Build Merger (Role)0-0/+0
d42374324d am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 am: 642a497f9c am: 170a7d24f4 am: 0a37ab0fdd am: 1ff6ec5e40 am: a96b31573c" into nyc-mr2-dev-plus-aosp
2017-02-10Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 am: 642a497f9c am: 170a7d24f4 am: 0a37ab0fdd am: 1ff6ec5e40 am: a1fbdcb6df Change-Id: I58034adc7c01c8e5d328c733a06008bbb94e13fb
2017-02-10Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 am: 642a497f9c am: 170a7d24f4 am: 0a37ab0fdd am: 1ff6ec5e40 am: a96b31573c Change-Id: I82d5bd8efec6f09becb413ecbcc01e814283243a
2017-02-10Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 am: 642a497f9c am: 170a7d24f4 am: 0a37ab0fdd am: 1ff6ec5e40 Change-Id: If146c702bff80b8b6803567c10f98d5096653b1e
2017-02-10Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵android-n-mr2-preview-2android-7.1.2_r9android-7.1.2_r8android-7.1.2_r6android-7.1.2_r5android-7.1.2_r4android-7.1.2_r39android-7.1.2_r38android-7.1.2_r37android-7.1.2_r36android-7.1.2_r33android-7.1.2_r32android-7.1.2_r30android-7.1.2_r3android-7.1.2_r29android-7.1.2_r28android-7.1.2_r27android-7.1.2_r25android-7.1.2_r24android-7.1.2_r23android-7.1.2_r2android-7.1.2_r19android-7.1.2_r18android-7.1.2_r17android-7.1.2_r16android-7.1.2_r15android-7.1.2_r14android-7.1.2_r13android-7.1.2_r12android-7.1.2_r11android-7.1.2_r10android-7.1.2_r1aosp-new/nougat-mr2.3-releaseaosp-new/nougat-mr2.2-releaseaosp-new/nougat-mr2.1-releaseaosp-new/nougat-mr2-security-releaseaosp-new/nougat-mr2-releaseaosp-new/nougat-mr2-pixel-releaseaosp-new/nougat-mr2-devPaul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 am: 642a497f9c am: 170a7d24f4 am: 0a37ab0fdd am: 1ff6ec5e40 Change-Id: I5e81524dc3a0b9fdd2e7c05fbe625ef5ab960b1f
2017-02-10Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 am: 642a497f9c am: 170a7d24f4 am: 0a37ab0fdd Change-Id: I57fdb95dc2d530bafd70c862b92cc2b1b7476335
2017-02-10Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 am: 642a497f9c am: 170a7d24f4 Change-Id: I9f5b21f74a6a0f24ce38202bba0243bbae3e220b
2017-02-10Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 am: 642a497f9c Change-Id: I26dfbb4b58a9d34be0df2d953b939e3ce7ca89b4
2017-02-10Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a am: 45c4ce4768 Change-Id: I818b903bad92c4dde312838510d8e1e2c5630435
2017-02-09Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 am: 65d4de583a Change-Id: Iee30bc34aa5125ddccfc93f09ddd43a6403aa296
2017-02-09Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc am: b0a4ed4800 Change-Id: I931664c2af7f7a88bfead15efe49c94beffa07d3
2017-02-09Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324d ↵Paul Stewart1-0/+3
am: d9f824b744 am: 25edb109fc Change-Id: I917eb10527bacaad4319b61d97338ccc8d91e3cd
2017-02-09Perform range check on len in nlmsg_reserve am: f83d9c1c67 am: d42374324dPaul Stewart1-0/+3
am: d9f824b744 Change-Id: Ibc0ba8193e59b559601235c28904eed160a83077
2017-02-09Perform range check on len in nlmsg_reserve am: f83d9c1c67Paul Stewart1-0/+3
am: d42374324d Change-Id: Idaa71608952cab5fc9ecfa2c769c1974539e25d3
2017-02-09Perform range check on len in nlmsg_reservePaul Stewart1-0/+3
am: f83d9c1c67 Change-Id: Ie702166cfd63a452792704a608c82e8481b3c123
2017-02-09lib/utils.c: add mutex to get_psched_settings() am: 920dc7f13d am: ↵Thomas Haller1-12/+20
45218277cd am: be91606750 am: c9bc7966fa Change-Id: Ia72e11c9da9bd49d26119653886c562797a97f4b
2017-02-09lib/utils.c: ensure calling get_psched_settings() for ↵Thomas Haller1-0/+2
nl_us2ticks()/nl_ticks2us() am: 7389cb7f37 am: 605874c781 am: 268fec081e am: 43085d6e5b Change-Id: I9b8cd7455144ee1896eb6e4701f7896ad389e03d
2017-02-09lib/utils.c: lazy initialize user_hz and psched_hz am: 6760f904f2 am: ↵Nick Kralevich1-1/+8
43dadae700 am: d0a1958f4a am: 67081dd1ee Change-Id: I6d1013c3add9cc3a6d49087ed334ccf22cfde352
2017-02-09lib/utils.c: add mutex to get_psched_settings() am: 920dc7f13d am: 45218277cdThomas Haller1-12/+20
am: be91606750 Change-Id: I09304682c81d5cf8c9bec099d7d693fed0a7d279
2017-02-09lib/utils.c: ensure calling get_psched_settings() for ↵Thomas Haller1-0/+2
nl_us2ticks()/nl_ticks2us() am: 7389cb7f37 am: 605874c781 am: 268fec081e Change-Id: I6475fcd4f3840e74ea2b7c5c5a78e0e2f2b74291
2017-02-09lib/utils.c: lazy initialize user_hz and psched_hz am: 6760f904f2 am: 43dadae700Nick Kralevich1-1/+8
am: d0a1958f4a Change-Id: Iece05529bfc7d822ea96f27f1d915d8ba49c4b33
2017-02-09lib/utils.c: add mutex to get_psched_settings() am: 920dc7f13dThomas Haller1-12/+20
am: 45218277cd Change-Id: Ib10e47a35bfc358f7d9978697b70454ae3575afd
2017-02-09lib/utils.c: ensure calling get_psched_settings() for ↵Thomas Haller1-0/+2
nl_us2ticks()/nl_ticks2us() am: 7389cb7f37 am: 605874c781 Change-Id: Id2e8f9f3f88466c09f0ddf45c81be641d75afc3a
2017-02-09lib/utils.c: lazy initialize user_hz and psched_hz am: 6760f904f2Nick Kralevich1-1/+8
am: 43dadae700 Change-Id: I4600ff3e71e0992c49f36f0971c9b7c3c405ebe8
2017-02-09lib/utils.c: add mutex to get_psched_settings()Thomas Haller1-12/+20
am: 920dc7f13d Change-Id: I5d4d1c3223be9ba9636ffd1e735aec1f422aa74c
2017-02-09lib/utils.c: ensure calling get_psched_settings() for ↵Thomas Haller1-0/+2
nl_us2ticks()/nl_ticks2us() am: 7389cb7f37 Change-Id: Ib60637b557286e9fa8bd935589f33f01a2375181
2017-02-09lib/utils.c: lazy initialize user_hz and psched_hzNick Kralevich1-1/+8
am: 6760f904f2 Change-Id: I03333818696be3d607f6c0b23d80577904facbb5
2017-02-09lib/utils.c: add mutex to get_psched_settings()Thomas Haller1-12/+20
Let's add a mutex to get_psched_settings() hoping to solve worst case scenarios when calling get_psched_settings() from multiple threads. Also, only read the environment variables once, who knows whether they are modified concurrently. (cherry picked from commit 24d669a3a990d1d637fc94698cc4ae2c6e8e178e) Test: Compiles and ueventd proc_net denial is gone. Bug: 35197529 Change-Id: Ic49dd28d3ab951a4d1b557a5e27290366f4640cc
2017-02-09lib/utils.c: ensure calling get_psched_settings() for ↵Thomas Haller1-0/+2
nl_us2ticks()/nl_ticks2us() (cherry picked from commit c33dec5a4a7df01730f90dd41f28a53c188aab46) Test: Compiles and ueventd proc_net denial is gone. Bug: 35197529 Change-Id: I09dbc1f36089c58f7965b26bf8a632a4865c3865
2017-02-09lib/utils.c: lazy initialize user_hz and psched_hzNick Kralevich1-1/+8
Rather than initializing user_hz and psched_hz when libnl is loaded, defer initialization of these variables to the first time they are used. This has several advantages: 1) Avoids an unnecessary permission denied error on /proc/net/psched, which can occur on systems where /proc/net isn't readable due to security policy. 2) Allows program code to initialize the environment variables PROC_NET_PSCHED and/or PROC_ROOT prior to the first libnl call, giving a program more flexibility about where libnl should look. 3) Trivially faster startup time (although unlikely to be significant). 4) Compiler may be able to prove that the get_psched_settings() function is unreachable and optimize appropriately, because the callers never (directly or indirectly) use this method. This could occur, for instance, in doing dead code elimination for programs which statically link libnl. Signed-off-by: Nick Kralevich <nnk@google.com> https://github.com/thom311/libnl/pull/123 (cherry picked from commit 8e0ead4b5bcf22dcc210442629ebb416116ea1f0) Test: Compiles and ueventd proc_net denial is gone. Bug: 35197529 Change-Id: Iad9ea207315c92489617334edeba73053d67cf6b
2017-02-08Perform range check on len in nlmsg_reservePaul Stewart1-0/+3
Bug: 32342065 Test: Compile Change-Id: I2ef3d63f0910120721c1448eb7d4d64bcec71009
2016-12-12Merge changes from topic 'libnl-3.2.25' am: 821e05033e am: 8052fe8168 am: ↵Paul Stewart0-0/+0
cf03a17b7a am: 236b64e103 Change-Id: I820aff338fcddabdbdb2309ebf52c14186fbfb5a
2016-12-12libnl: Fix build warnings am: d4a8d459dc am: f972b501a7 am: a3ae9a8a0bPaul Stewart1-2/+3
am: ccaefadb1d Change-Id: I05347ed3c73af3b12a84cfccc4e864ea7cd7dbea
2016-12-12[BACKPORT] build: move copy of linux headers to private directory am: ↵Paul Stewart36-4/+5
aabc42835d am: 459b75002c am: ae177106a0 am: 5a726a5d90 Change-Id: I8dd2b454b9f89d083db9d754bb82ef11bf287a90
2016-12-12 Update libnl to 3.2.25 am: 054c80d775 am: 33bbc2af11 am: 5771f1e9e7Paul Stewart472-11400/+58559
am: 6937bb7162 Change-Id: Ide7b676bedc5c2d2564aeb25ba70c2fb05282238
2016-12-12Merge changes from topic 'libnl-3.2.25' am: 821e05033e am: 8052fe8168Paul Stewart0-0/+0
am: cf03a17b7a Change-Id: I287424cd68ca569034055b4bfb4a0218bed570aa
2016-12-12libnl: Fix build warnings am: d4a8d459dc am: f972b501a7Paul Stewart1-2/+3
am: a3ae9a8a0b Change-Id: I93c89fd3c36ad305509520efdc41300f9dc0a534
2016-12-12[BACKPORT] build: move copy of linux headers to private directory am: ↵Paul Stewart36-4/+5
aabc42835d am: 459b75002c am: ae177106a0 Change-Id: I0e546b417e535736dc267758980d739de3e0a132
2016-12-12 Update libnl to 3.2.25 am: 054c80d775 am: 33bbc2af11Paul Stewart472-11400/+58559
am: 5771f1e9e7 Change-Id: Iaf2ba1dd8f534db65b00c8e32b4262e2b181b084
2016-12-12Merge changes from topic 'libnl-3.2.25' am: 821e05033ePaul Stewart0-0/+0
am: 8052fe8168 Change-Id: I377beb041e48c9fdfdbf727fc21daea92a348217
2016-12-12libnl: Fix build warnings am: d4a8d459dcPaul Stewart1-2/+3
am: f972b501a7 Change-Id: Ica21e1bfc23b84433107a21b4c05a4d27231794f
2016-12-12[BACKPORT] build: move copy of linux headers to private directory am: aabc42835dPaul Stewart36-4/+5
am: 459b75002c Change-Id: I0dc88ba7d7b029234fd1778ab510f013131ce8e4
2016-12-12 Update libnl to 3.2.25 am: 054c80d775Paul Stewart472-11400/+58559
am: 33bbc2af11 Change-Id: Ie10e0982862efa3ffd2cfc3ab1961019652d104d
2016-12-12Merge changes from topic 'libnl-3.2.25'Paul Stewart0-0/+0
am: 821e05033e Change-Id: Ic9fbeb7ff03a1b50fd90089d29f5c3beb442f59c
2016-12-12libnl: Fix build warningsPaul Stewart1-2/+3
am: d4a8d459dc Change-Id: Ia7ebc92b548552a67f742f60030aa2852dbc7ba1
2016-12-12[BACKPORT] build: move copy of linux headers to private directoryPaul Stewart36-4/+5
am: aabc42835d Change-Id: I54dc3c11fbd6c72ed17eabbcfc0b479625788aa2