Commit graph

87 commits

Author SHA1 Message Date
Christopher Ferris
9584fa46e9 Update to android-mainline kernel headers v5.4.
Update generate_uapi_headers.sh to checkout the android mainline
kernel. Also, add a small modification to look for the kernel directory
in common not linux-stable.

Remove deprecated android headers from android/uapi/linux. Also,
remove f_accessory.h since it's in the android mainline kernel.

Test: Builds and runs on walleye.
Change-Id: Ia371305e19f56e6bcc2db6d5b4d299819f07ffc6
2019-12-12 14:59:25 -08:00
Christopher Ferris
b8a95e2186 Update to kernel headers v5.3.2.
Test: Builds and run unit tests on taimen/cuttlefish.
Change-Id: I6ebd8f179d159ac974555e8edca588083e8081b3
2019-10-03 10:59:32 -07:00
Christopher Ferris
e892fd6b17 Update to kernel headers v5.2.11.
Test: Build and boots on taimen.
Test: Bionic unit tests all pass on taimen.
Change-Id: I80abb6f9abbff9ca20ce6c7c912a259b5ca86fa2
2019-09-03 15:56:49 -07:00
Christopher Ferris
fa59a10bcd Update to kernel headers v5.2.6.
Also, fix a bug in update_all.py when the syscalls file does not change.

Test: Builds and boots on a taimen.
Change-Id: If85b00daef2c176f804a0861894f5bbca9c6d5df
2019-08-05 12:59:58 -07:00
Christopher Ferris
aeddbcfb2c Update to kernel headers v5.2.
Test: Booted a taimen, ran unit bionic unit tests.
Change-Id: I3522c59793bbcef98ea515996a481d92f14b8816
2019-07-08 13:54:11 -07:00
Christopher Ferris
24f97eb27b Update to kernel headers to v5.1.3.
Test: Builds and boots taimen.
Test: Ran bionic unit tests.
Change-Id: Ieaca8709d568f075df8cac60c9da2c0ed1916963
2019-05-20 12:58:13 -07:00
Christopher Ferris
e6be532ed6 Update kernel headers to v5.0.3.
Test: Build and boot taimen.
Change-Id: I6ed881b5dc6dc7d0a6cc56edcd09b42ddd185b62
Merged-In: I6ed881b5dc6dc7d0a6cc56edcd09b42ddd185b62
2019-03-21 15:31:06 +00:00
Christopher Ferris
d842e43e1d Update to v5.0 kernel headers.
Test: Builds and boots on taimen.
Change-Id: I13843bf1ab30ea89a50852adc88f2cba8401bded
2019-03-07 11:19:22 -08:00
Christopher Ferris
86a4837a8e Update to v4.20.1 kernel headers.
This includes one manual change:

In the file bionic/libc/kernel/uapi/linux/in.h, the macro IN_BADCLASS
was not definied correctly. Change the macro from:

  #define IN_BADCLASS(a) ((((long int) (a)) == 0xffffffff)

to:

  #define IN_BADCLASS(a) (((long int) (a)) == (long int)0xffffffff)

This change is being pushed to the upstream kernels.

Test: Builds and boots.
Change-Id: Ia304773a9dc6789b34d9769d73742384d6afb571
Merged-In: Ia304773a9dc6789b34d9769d73742384d6afb571
(cherry picked from commit 967fb01cce)
2019-01-15 07:33:14 -08:00
Christopher Ferris
48fe0aef16 Update kernel headers with new parser.
Test: Builds.
Change-Id: I3f0714d53ac893ccc3e66f7a92d0ea7a6737f1c3
2019-01-10 17:33:56 -08:00
Christopher Ferris
9ce28844db Update to v4.19 kernel headers.
Test: Builds and boots.
Change-Id: I99a9ed79666e143b47f02ca4e59eed94f69b7e4a
(cherry picked from commit a981e2e52e)
2018-10-30 09:21:16 -07:00
Christopher Ferris
76a1d45599 Update to v4.17.3 kernel headers.
Test: Builds, boots on a walleye.
Change-Id: I389d8b61ec00ea309e38d1b1a2e0dace48c21edb
2018-06-27 14:12:29 -07:00
Christopher Ferris
5ed15ba733 Remove ion.h from bionic uapi headers.
Bug: 77976082

Test: Ran the generate script and verified ion.h is deleted.
Change-Id: I33b3aeef66f08f35dd496a073931b2fe2c80a1d6
2018-04-24 13:33:30 -07:00
Christopher Ferris
038ef23f62 Use the ion.h from the kernel headers.
All code that needs to use the frozen version of ion.h header should
have a copy, so move to the version as parsed from the real headers.

Test: Compiled and boots.
Change-Id: If9feae9c163ca64c4862045e86611fd3cf1fc18e
2018-02-22 20:22:14 +00:00
Christopher Ferris
934ec94955 Update to v4.15 kernel headers.
Test: Compiles, boots bullhead/hikey960.
Change-Id: I118beb8b6cac0881b1270f9bf6981959297a41a8
2018-02-01 10:51:01 -08:00
Elliott Hughes
64f355ffbd Use in_addr in ip_mreq_source and ip_msfilter.
This adds a new mechanism to say "replace struct S with #include <bits/S.h>".

Also switch epoll_event over to the new mechanism.

Also use the kernel's struct sockaddr_storage directly rather than behind
an unnecessary #define.

This patch also removes some dead code in the header scrubber. This code
still needs rewriting completely. I learned that a "block" isn't necessarily
a single struct definition, say; it might be a run of them. It seems like
a block is a run of preprocessor directives or a run of regular code.

Bug: https://issuetracker.google.com/36987220
Test: new test
Change-Id: Ic6a5c09559766a4babe3cd4c3ea538b885e07308
2017-12-14 10:07:27 -08:00
Elliott Hughes
8c75675ec6 Merge "Change ARG_MAX/_SC_ARG_MAX back to a constant." 2017-11-16 21:46:49 +00:00
Elliott Hughes
baed51ee3a Change ARG_MAX/_SC_ARG_MAX back to a constant.
As per the lkml thread https://lkml.org/lkml/2017/11/1/946.

Bug: http://b/65818597
Test: ran tests
Change-Id: I7a0610e6903e6761f2b31416e2f5017bd7a60659
2017-11-15 15:14:35 -08:00
Christopher Ferris
1308ad3ab3 Update to kernel headers v4.14.
Remove the hiding of the kernel structure binder_fd_array_object. This
structure now matches the structure used in the binder code.

Load the libclang_android.so shared library directly for parsing.
This file changed name in a recent update to the prebuilts.

Test: Compiles arm/arm64/x86/x86_64.
Test: Boots on hikey and boots on a sailfish.
Test: Ran bionic unit tests on hikey and sailfish.
Change-Id: I141a4b93ac3511cd58f4d12bb3c0d4efaa4c2742
2017-11-15 12:23:56 -08:00
Christopher Ferris
02ce96835b Revert "Revert "Move back to the previous version of ion.h.""
This reverts commit 89d6c321f8.

Reason for revert: Still a bunch of branches/builds depending on this incorrectly.

Change-Id: I8de678848b0e5445837c02c0942f7388d27dbfd7
2017-08-03 18:55:45 +00:00
Christopher Ferris
89d6c321f8 Revert "Move back to the previous version of ion.h."
This reverts commit 1a0344d65d.

Reason for revert: Fixed the original problem.

Change-Id: Ibf4ba05160048a3216e0cc49cc88519f73d00fa4
2017-08-01 19:32:14 +00:00
Christopher Ferris
1a0344d65d Move back to the previous version of ion.h.
The new kernel headers changed this and lots of parts of the tree
want the old definition, so restore the previous version.

Test: Builds.
Change-Id: I725e56bb7c51c9fcd23ebc4b67eac33d66e196e7
2017-07-29 13:45:07 -07:00
Christopher Ferris
525ce914ed Update to kernel headers v4.12.3.
Test: Built angler.
Change-Id: Icbcf4fac2334de8409b049ed7a3b4c24b4e98ce9
2017-07-27 16:01:39 -07:00
Elliott Hughes
96c1db7b9d Remove the repetitive warnings from the uapi headers.
Having

  WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS

every four lines made the headers harder to read, made the diffs much worse
each time we upgraded, and wasn't really providing any benefit. Before the
next uapi update, let's just stop doing this.

Bug: N/A
Test: builds, manually inspected files look right
Change-Id: Id7088cf750894c9d24950f3d53587fe3156c4f7d
2017-05-25 13:48:01 -07:00
Elliott Hughes
497ad30d7d Make union semun usable.
This is a bit bogus because it's been removed from glibc (though not
thoroughly) and is never useful on Android (because the system calls
in question are compiled out of Android kernels, and SELinux would
disallow them even if you weren't running an Android kernel). This
also means that on glibc you need to include <linux/sem.h> for this
and on bionic you need <sys/sem.h> (and for either if you #include
the other file, you won't get this union).

Bug: https://github.com/android-ndk/ndk/issues/400
Test: added new test
Change-Id: I47f721da77515531f616d6ad8479bfbc9b60ee47
2017-05-18 15:05:26 -07:00
Christopher Ferris
ee1e0a34ae Update static functions/macro definitions.
Fix the list of static functions coming from swab.h to match the
ones exported by glibc.

Force the definition of __HAVE_BUILTIN_BSWAP{16,32,64}__ so the headers
use the builtin.

Add a unit test to guarantee that kernel header updates do not break this.

Test: Built and booted angler.
Test: Built the bionic unit tests for arm, arm64, mips, x86, x86_64.
Test: Ran the new test on angler and glibc.

Change-Id: I4ce229e3f198c204186d72bf22dd97b5cdf239e4
2017-04-21 20:59:53 -07:00
Christopher Ferris
5f41ce25c6 Merge "Update to kernel headers v4.10." 2017-02-27 20:09:54 +00:00
Elliott Hughes
893fd97cdc Use <linux/eventpoll.h> to implement <sys/epoll.h>.
Bug: https://github.com/android-ndk/ndk/issues/302
Test: builds
Change-Id: Ia3074326a128c38f2488e342c028cc030801cfd9
2017-02-23 17:26:24 -08:00
Christopher Ferris
48af7cb2e2 Update to kernel headers v4.10.
Test: Built angler, booted on angler, ran bionic unit tests.
Change-Id: Ia24511e74106116ea84b44ab724865ec492de8f9
2017-02-21 14:42:34 -08:00
Christopher Ferris
351a796d2d Update to kernel headers v4.9.6.
Test: Built arm/arm64/x86/x86_64 targets.
Change-Id: Id4d2711aaa96fe537f3726a0a89f2959e9cca34a
2017-01-27 10:49:48 -08:00
Christopher Ferris
6a9755d20a Update to kernel headers v4.9.3.
Test: Built arm, arm64, x86, x86_64 targets.
Test: Booted on angler, and ran bionic unit tests (32 bit and 64 bit).

Change-Id: I14a8dcbea11b41f83431eabed6590cd25af07b1d
2017-01-25 16:23:56 -08:00
Christopher Ferris
49f525c47b Update to kernel headers v4.8.14.
Test: Built mips/arm/arm64/x86/x86_64. Built and booted angler.
Change-Id: Icedb035769d8a41a170a6f1ecd707113e332d8dd
2016-12-12 19:08:01 -08:00
Christopher Ferris
106b3a8a7d Update to kernel headers v4.7.2.
Modify the kernel header update script to rename C++ keyword
struct members to something else. This fixes problems when including
these kernel files in C++ code.

Also, make a manual change to linux/fib_rules.h and comment out the
value FRA_PAD since it conflicts with a special android kernel value
FRA_UID_START that has not been upstreamed yet.

Test: Built aosp_angler, aosp_x86_64, aosp_mips (bionic only)
Test: Booted on angler and ran bionic unit tests
Test: Built these changes in internal master

Change-Id: Ia22b7e3ca409404696dba76311f49157f4a9ceed
2016-08-29 12:07:13 -07:00
Elliott Hughes
7c59f3f6f3 Flesh out <sys/msg.h>, <sys/sem.h>, <sys/shm.h>.
Also fix <sys/ipc.h>.

Not useful except to systems/bringup folks for testing. Trivial tests
added, and double-checked under strace to see that things look right.

x86 -- which works differently to everything else -- tested on the host.

Bug: http://b/27952303
Change-Id: I328534e994ae9e90755f545478fba03038c0bb94
2016-08-18 15:23:38 -07:00
Elliott Hughes
38dba2e7e1 Fix sysconf(_SC_ARG_MAX).
ARG_MAX hasn't been a constant since Linux 2.6.23.

Bug: http://lists.landley.net/pipermail/toybox-landley.net/2016-August/008592.html
Change-Id: I1eddb562751604c75b89fa610d79be0655c53693
Test: ran the bionic tests on device and against glibc
2016-08-10 15:51:06 -07:00
Christopher Ferris
d6e8b8ca56 Move/remove android only kernel uapi headers.
Move all of the uapi kernel headers that are only found in the android
kernel, and are still used by the tree into their own directory.

Delete all of these files that are not used.

Also, delete binder.h from the linux directory since it already exists
in the linux/android directory.

Bug: 30072483
Change-Id: I879f16e366f7670b8be3546b0a9cf9567fce6526
2016-07-19 12:43:56 -07:00
Christopher Ferris
82ef6a19cb Updated to v4.4.11 kernel headers.
Change-Id: I6b55a921670d32d7bfff3c304d8001058409d3f7
2016-05-19 17:03:14 -07:00
Christopher Ferris
05d08e9716 Updated to v4.4.1 kernel headers.
Small modifications needed to allow compilation with the new headers:

- Manually modify bionic/libc/kernel/uapi/asm-mips/asm/siginfo.h to
  remove the uapi from the include.
- PR_XXX defines are now available for mips, so remove the definition
  from linker_mips.cpp.

Bug: 23789423
Change-Id: I6dc8a03b012426d3a937db15cb24d3a50fab5a8c
2016-02-05 16:03:55 -08:00
Elliott Hughes
f8a2243ebe <netinet/udp.h> should include <linux/udp.h>.
The comment about "other stuff" referred to pre-uapi headers. Everything
in the current <linux/udp.h> should be exposed to userspace. The only
problem is that BSD and Linux use different names for the members of
struct udphdr. We can move the Linux udphdr out of the way and use an
anonymous union to get the best of both worlds. (Though unfortunately
this means that code that includes <linux/udp.h> directly instead of
using <netinet/udp.h> now won't have any definition of struct udphdr.
We've taken the stance in the past that you shouldn't include a linux/
header if there's a standard equivalent --- you should rely on us
transitively including it for you.)

Change-Id: Ie625892441b0edd8df3b76d3fcf2cbe299077bc4
2015-09-22 12:34:13 -07:00
Christopher Ferris
915bf813ad Update to v3.18.21 kernel headers.
Change-Id: I4ade68d62981c7f6f361750cc811e8d84be9d5b9
2015-09-02 17:23:31 -07:00
Christopher Ferris
dda4fd4644 Update to v3.18.18 kernel headers.
Change-Id: I0a0f423bda89500ad8e13a80582f05ec8bc756ea
2015-07-13 17:21:18 -07:00
Christopher Ferris
e01d32f802 Upgrade kernel headers to 3.18.10.
Change-Id: Iff1f1c830780585990856a5114b559c61282dcd6
2015-03-31 14:57:48 -07:00
Yabin Cui
2d8f9b5aea Define MAXHOSTNAMELEN explicitly in source files.
Bug: 19093777
Bug: 19092844
Change-Id: I0778507ca2d5c008abb9a6d6315d0909263a8817
2015-02-09 19:56:47 -08:00
Tao Bao
d7db594b8d Switch kernel header parsing to python libclang
Replace the tokenizer in cpp.py with libclang.

Bug: 18937958
Change-Id: I27630904c6d2849418cd5ca3d3c612ec3078686d
2015-02-06 14:48:41 -08:00
Christopher Ferris
82d7504cd7 Update kernel headers to v3.18.3.
Bug: 19127803
Change-Id: I67fa0832322ddd0032d909476047578be052bcf2
2015-01-26 10:57:07 -08:00
Christopher Ferris
cbf33a9988 am d5e1c583: Merge "Move to v3.16.3 kernel headers."
* commit 'd5e1c583a66a821c7d7e8f43e1238a4569981b90':
  Move to v3.16.3 kernel headers.
2014-09-18 21:48:49 +00:00
Christopher Ferris
653676dde8 Move to v3.16.3 kernel headers.
Change-Id: Ife491bd7630b853a78532dd74e4644438256a3a1
2014-09-18 13:14:58 -07:00
Christopher Ferris
aac37784df am 0bd28a43: Merge "Update kernel uapi headers to v3.16.1."
* commit '0bd28a43dae87c808f6af61ad3dba042b35be7e7':
  Update kernel uapi headers to v3.16.1.
2014-09-18 00:41:24 +00:00
Christopher Ferris
ba8d4f460b Update kernel uapi headers to v3.16.1.
Other changes to support the new headers:

- Remove the flock64 structure it is defined in the new headers.
- Update the syscalls to correspond with the headers.

Change-Id: I49a6b07e8b2bfffb67be71b07b58e4e6848fcc09
2014-09-17 17:05:17 -07:00
Christopher Ferris
e2d86feb7b Pull input.h from v3.16.1 kernel headers.
(cherry-pick of 027d2717d067c3706f22bf84dc1226ede7c1566d.)

Bug: 17407564
Change-Id: Idcfc40a7254605280e3d5474c61ae1ab7b2b7b51
2014-09-17 15:18:21 -07:00