aboutsummaryrefslogtreecommitdiff
path: root/libc/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Set VIDEO_MAX_FRAME value back to 64.Christopher Ferris2022-04-221-1/+6
| | | | | | | | | | | | | This value was changed from 64 to 32, but it really should not have gone down. So fixing back to 64 manually, and then the next kernel header update should remove the comment but leave the value unchanged. Bug: 228783882 Test: Compiles. (cherry picked from commit 880308daa00c0412a2cfc598fc46ecdbbead8ff1) Change-Id: I2d81d7bc76fcaa905dce0abb094d61d02c481a5e
* Update to v5.17 kernel headers.Christopher Ferris2022-03-2252-92/+1321
| | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.17 Test: Boots on a flame and all bionic unit tests pass. Change-Id: I7057d7308241f3acfa600597d287994c39ababbc
* Update to v5.16 kernel headers.Christopher Ferris2022-01-1081-374/+894
| | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.16 Test: Builds and bionic unit tests pass. Change-Id: I2522c4f2a0efb9f8a193e1f2d65868e478217502
* Update to v5.15 kernel headers.Christopher Ferris2021-11-0273-334/+1095
| | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.15 Test: Builds, and ran bionic unit tests on flame. Change-Id: I86901ea6d89fb0f7384b90a47bef35d194083c24
* Update to v5.14 kernel headers.Christopher Ferris2021-09-0274-131/+727
| | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.14 Test: Builds, bionic unit tests. Change-Id: Iff3424da9fbf7ae89ebeb6daabb34c4aa650901f
* Define sockaddr_storage in bionicColin Cross2021-07-146-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | Bionic currently renames the kernel's __kernel_sockaddr_storage to sockaddr_storage. We would like to reuse the bionic kernel headers for musl, but musl defines its own sockaddr_storage, causing redefinition errors when the musl and kernel headers are both included. Give bionic its own definition of sockaddr_storage so the kernel one can be left as __kernel_sockaddr_storage, avoiding the conflict in musl. Some of the structs in netinet/in.h contain sockaddr_storage members. There are definitions in linux/in.h, but they now use the __kernel_sockaddr_storage naming. To avoid having to copy the structs from linux/in.h into netinet/in.h, add some #define hackery to rename __kernel_sockaddr_storage to sockaddr_storage when including linux/in.h from netinet/in.h. Bug: 190084016 Test: m checkbuild Test: bionic-unit-tests Change-Id: I8f654511722b3a4a8e0bb146e4418ebcd370305c
* Merge "Support replacing nested kernel structs"Treehugger Robot2021-07-121-2/+7
|\
| * Support replacing nested kernel structsColin Cross2021-06-291-2/+7
| | | | | | | | | | | | | | | | When replacing structs with bits/ includes, count the number of opening and closing braces to find the end of the struct. Test: tools/update_all.py Change-Id: Ic9712a385da517710ceffccbdb223c89ae0b5f65
* | Update to v5.13 kernel headers.Christopher Ferris2021-07-0174-783/+1906
|/ | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.13 Test: Builds, bionic unit tests. Change-Id: Ia4360ca4a2808206f64187dcb234d73c5752624b
* Update to v5.12 kernel headers.Christopher Ferris2021-05-0364-63/+944
| | | | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.12 Test: Boots flame device and runs bionic unit tests. Test: Boots acloud device and runs bionic unit tests. Change-Id: I8ac107ce9d4978be3ef9517b90ad6ecafd06785a
* Merge "Fix last python3 issues."Christopher Ferris2021-04-211-5/+5
|\
| * Fix last python3 issues.Christopher Ferris2021-04-201-5/+5
| | | | | | | | | | | | | | | | | | | | Includes pointing to the python3 version of the clang bindings. Also, remove stale .gitignore line. Test: Ran bionic/libc/kernel/tools/update_all.py and verified Test: the files generated the same exact way. Change-Id: I4eb9dd7382bca013f70d921b6ef48c7e7478615a
* | Fix overly-zealous strip.Dan Albert2021-04-201-2/+2
|/ | | | | | | | | The argument to this is the characters to strip, so `line.strip(line)` just returns the empty string. Test: None? Bug: None Change-Id: I4f62bffcd00936e4eef837a28b78023fcad54bb0
* Update for python3.Christopher Ferris2021-04-195-46/+28
| | | | | | | | | | | | | This fixes all of the problems with our kernel scripts, but not the clang python script problems. I also removed the updateGitFiles function since that code was just silently failing any way. I replaced all calls with updateFiles. Test: Ran script using python2 to verify it still works. Test: Run script in python3 verifying that it starts to run. Change-Id: I223a31a8324c59e6bc4067f48a6110361b3e26e8
* Force everything to use python3 for consistency.Elliott Hughes2021-04-153-3/+3
| | | | | | | | | | Rather than "whatever people have installed as 'python' on their machine". I've removed check-symbols.py because that's been broken for years and we never even noticed, and I'm not sure it's worth fixing. Test: treehugger, manual Change-Id: Ieb996bbdf790a18d4b1fb46a409cc240ba2a2a49
* Update kernel update documentation.Christopher Ferris2021-03-181-9/+27
| | | | | | | Parts of the document have gone out of date, so update it. Test: NA Change-Id: Ia4bc534ca1cc9a538d5995126c541c2cd7029c57
* Update to v5.11 kernel headers.Christopher Ferris2021-02-1699-904/+1918
| | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.11 Test: Built cuttlefish and flame images. Ran bionic unit tests on both. Change-Id: Ie60337aafad4bda55af99b6c8fe9f56bf2fa787f
* Update to v5.10 kernel headers.Christopher Ferris2020-12-1495-187/+996
| | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.10 Test: Built cuttlefish and flame images. Ran bionic unit tests on both. Change-Id: I37ffc850970adcce1febbe2269c202632fce763a
* Clean up header files from kernel directory.Christopher Ferris2020-12-031-3/+11
| | | | | | | | | | | | Add a make distclean for each supported arch before generating headers and at the end so these files are not left hanging around in the kernel directory. Bug: 174795055 Test: Verified all generated files are deleted after running. Test: Verified this generates the exact same files as before this change. Change-Id: I0f66f580af2ea50c190eb532032017e782d7cae6
* Update to v5.9 kernel headers.Christopher Ferris2020-10-1991-219/+900
| | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.9 Test: Boots cuttlefish 64bit, passes 32 bit and 64 bit bionic unit tests. Change-Id: Ib5503355b238ea75595538e63eb000c867d06ef7
* Update to v5.8 kernel headers.Christopher Ferris2020-08-0493-60/+1342
| | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.8 Test: NA Change-Id: I2231c877589820fc09800a200cf4ac62ba74b04c
* More cleanup for #inclusivefixit.Elliott Hughes2020-07-311-1/+1
| | | | | | | Found manually with grep, since the script seems to miss stuff. Test: treehugger Change-Id: I5933cbade9792801d4a0bec1ccb077efa6ad8fbc
* Update the generate script.Christopher Ferris2020-06-042-221/+0
| | | | | | | | | | | | The arm kvm.h file has been deprecated, so nobody should be including it. Therefore, remove the hack to copy the file out of the tools directory. Also, update to remove the arm kvm.h file. Test: Ran generate and update script and verified only the arm kvm.h Test: was deleted. Test: Builds and boots on a walleye. Change-Id: I95dcc8877bdb2da2858b0b9d0aa95d1d2072cf9a
* Update to v5.7 kernel headers.Christopher Ferris2020-06-0277-151/+1235
| | | | | | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.7 Update the generate_uapi_headers.sh where the types.h file is now in the right place, but kvm.h is not. Test: Booted cuttlefish/bonito. Test: Ran bionic-unit-tests on cuttlefish/bonito. Change-Id: Ice9ce370a658e320b80f564b34a4431927fcf100
* Update to v5.6 kernel headers.Christopher Ferris2020-04-1084-278/+1449
| | | | | | | | | | | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.6 Add a new method for removing structures. This is to deal with the kernel headers changing some definitions of timeval to __kernel_old_timeval and itimerval to __kernel_old_itimerval. Remove the __kernel_old_XX strutures and change the other structures to the previous definitions. This only works so long as these structures stay the same, if they diverge, then a different strategy will need to be implemented. Test: Booted cuttlefish/walleye. Test: Ran bionic-unit-tests on cuttlefish/walleye. Change-Id: I0a61f4fa6e4155c602e0414d9b38c2e1637829af
* Update to v5.5 kernel headers.Christopher Ferris2020-02-0792-246/+754
| | | | | | | | | | | | | | | Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.5 Test: Boots on walleye. Test: Ran bionic-unit-tests on walleye. Test: Boots on cuttlefish. Test: Ran bionic-unit-tests on cuttlefish. Change-Id: I57387d3c31e0ba5ad125ffe291cecf365c7b374e Merged-In: I57387d3c31e0ba5ad125ffe291cecf365c7b374e
* Stop generating unused headers.Elliott Hughes2020-02-0350-4465/+2
| | | | | | | | These just cause confusion because they often have different values/layouts, but they're never actually used. Test: treehugger Change-Id: I424034088e017c919f62fcefa7d6d3f903f31cfb
* Merge "Fully disable clang format where needed."Christopher Ferris2020-01-301-0/+2
|\
| * Fully disable clang format where needed.Christopher Ferris2020-01-301-0/+2
| | | | | | | | | | | | | | | | Even with formatting off, clang still tries to rearrange the include files or the using statements, so disable that too. Test: Verified that the include directories are not rearranged. Change-Id: I991a1b2bfa94a8202c5a486664658d654f1c7811
* | _FILE_OFFSET_BITS=64 support for fcntl.Elliott Hughes2020-01-293-25/+5
|/ | | | | | | | | | | | | | | | | | | On Android, fcntl is always implemented by fcntl64(2). This means that an LP32 binary can `fcntl(F_SETLK, struct flock)` (because fcntl64(2) passes through to the 32-bit fcntl(2) to handle F_SETLK), and it can also `fcntl(F_SETLK64, struct flock64)`. What it can't do before this patch is set _FILE_OFFSET_BITS=64 and then `fcntl(F_SETLK, struct flock)` where that `struct flock` is actually implicitly `struct flock64`. Move the kernel uapi structs out of the way, define them ourselves based on __LP64__ and _FILE_OFFSET_BITS, and fix up the relevant F_ constants. (Also add a .clang-format to turn off clang-format in libc/include/.) Bug: N/A Test: treehugger (and strace!) Change-Id: Iccd6c83d9133e1efcf93a7b49a6ae0f1bbd3d58b
* Link .clang-format file to system/core one.Christopher Ferris2020-01-291-0/+1
| | | | | | | | | | | | | Use the .clang-format-2 found in system/core instead of this which is not actually being used. Also, enable clang-format running by default. All upstream directories are marked as ignoring formatting so that their source files are not modified. Test: NA Change-Id: Icee6030f373fa5f072df162f97e6f34320e3d89a
* Merge "Update documentation around kernel header imports."Christopher Ferris2019-12-161-4/+12
|\
| * Update documentation around kernel header imports.Christopher Ferris2019-12-131-4/+12
| | | | | | | | | | Test: NA Change-Id: I8866ef30efbc565e8996c574a9f895c574cd8e55
* | Clone with --depth 1 in generate_uapi_headers.sh --download-kernel.Josh Gao2019-12-131-1/+1
|/ | | | | Test: manual Change-Id: Id60b354fb1914470315976dd103d2665a6fefab8
* Update to android-mainline kernel headers v5.4.Christopher Ferris2019-12-1296-271/+960
| | | | | | | | | | | | 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
* Update to kernel headers v5.3.2.Christopher Ferris2019-10-03102-863/+1253
| | | | | Test: Builds and run unit tests on taimen/cuttlefish. Change-Id: I6ebd8f179d159ac974555e8edca588083e8081b3
* Update to kernel headers v5.2.11.Christopher Ferris2019-09-035-25/+17
| | | | | | Test: Build and boots on taimen. Test: Bionic unit tests all pass on taimen. Change-Id: I80abb6f9abbff9ca20ce6c7c912a259b5ca86fa2
* Update to kernel headers v5.2.6.Christopher Ferris2019-08-056-10/+13
| | | | | | | 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
* Update to kernel headers v5.2.Christopher Ferris2019-07-0890-102/+1457
| | | | | Test: Booted a taimen, ran unit bionic unit tests. Change-Id: I3522c59793bbcef98ea515996a481d92f14b8816
* Update to kernel headers to v5.1.3.Christopher Ferris2019-05-20100-104/+1280
| | | | | | Test: Builds and boots taimen. Test: Ran bionic unit tests. Change-Id: Ieaca8709d568f075df8cac60c9da2c0ed1916963
* Generate assembler system call stubs via genrule.Elliott Hughes2019-04-161-5/+0
| | | | | | | There's no need to check in generated code. Test: builds & boots Change-Id: Ife368bca4349d4adeb0666db590356196b4fbd63
* clean_header: Run outside of $ANDROID_BUILD_TOPDaniel Mentz2019-04-151-2/+11
| | | | | | | | | | | Enable the use case where we run clean_header.py from outside of $ANDROID_BUILD_TOP. Previously, this script required the current working directory to be under $ANDROID_BUILD_TOP. Running it from a different directory resulted in the following error message: clean_header.py: error: Not in android tree pointed at by ANDROID_BUILD_TOP (....) Change-Id: I48210ea1a0033228a9aaa4124d28247b07cee6d4
* clean_header: Fix error handling for no-such-file caseDaniel Mentz2019-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | The function cleanupFile should always return a single value (as opposed to a tuple or list). In addition, if it encounters an error, it is expected to return a value that evaluates to False. As it stands, however, it returns (None, None) in certain error cases. Change this function to return None, in those cases. We previously saw the following error message, when we tried to run clean_header.py on a non-existent file. Traceback (most recent call last): File "clean_header.py", line 208, in <module> b.updateGitFiles() File "utils.py", line 164, in updateGitFiles self._writeFile(dst) File "utils.py", line 136, in _writeFile f.write(self.new_data[dst]) TypeError: expected a string or other character buffer object Change-Id: I5f717dd1a4388f598f0fd4bfd5e6129017de9095
* Merge "Move kernel README files to Markdown."Treehugger Robot2019-04-122-20/+23
|\
| * Move kernel README files to Markdown.Elliott Hughes2019-04-112-20/+23
| | | | | | | | | | Test: N/A Change-Id: If987d8a24baf87adba20914896d29c94fc01cbfd
* | <bits/glibc-syscalls.h>: only regenerate when we have new uapi headers.Elliott Hughes2019-04-111-6/+61
|/ | | | | Test: update_all.py Change-Id: Iaa92dce263197f5a0e7d2dce5e00a31372dcb3e9
* clean_header: Don't print extraneous newline charDaniel Mentz2019-03-291-1/+6
| | | | | | | | | | | | | Don't print an extraneous newline character at the end of the include file if clean_header.py is used in the non-update mode. This is necessary to achieve consistent results in the update and non-update modes. Running clean_header in the non-update mode and redirecting the output to a file should have the same result as using the update mode and have the script write to the file directly. Change-Id: I6b176c5365840d66e4499bacd205f1fa77302a2b
* clean_header: Write to correct dst_fileDaniel Mentz2019-03-291-2/+2
| | | | | | | | | | | | | | | | Write to correct dst_file when in update mode. This enables use cases like the following: ../../../bionic/libc/kernel/tools/clean_header.py -k original-kernel-headers/ -d kernel-headers/ -u linux/ion.h Previously, we had to cd into kernel-headers/ and then run ../../../../bionic/libc/kernel/tools/clean_header.py -k ../original-kernel-headers/ -d . -u linux/ion.h because the tool didn't allow the relative path to be different from the destination path. Change-Id: I8c5e284ce7a6737d77a2f5ead3e7e5db01317425
* Update kernel headers to v5.0.3.Christopher Ferris2019-03-212-1/+8
| | | | | | Test: Build and boot taimen. Change-Id: I6ed881b5dc6dc7d0a6cc56edcd09b42ddd185b62 Merged-In: I6ed881b5dc6dc7d0a6cc56edcd09b42ddd185b62
* Update to v5.0 kernel headers.Christopher Ferris2019-03-0786-1291/+2088
| | | | | Test: Builds and boots on taimen. Change-Id: I13843bf1ab30ea89a50852adc88f2cba8401bded