diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index a263c39a0a40..0e226a9b0df5 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -1427,6 +1427,7 @@ + @@ -2145,6 +2146,8 @@ + + @@ -5037,258 +5040,258 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -5304,38 +5307,38 @@ - + - + - + - + - + - + - - + + - + - + - + - + @@ -14033,28 +14036,28 @@ - + - + - + - + - + - + - + - + - + @@ -14158,12 +14161,12 @@ - + - + - + @@ -14217,12 +14220,12 @@ - + - + - + @@ -14345,12 +14348,12 @@ - + - + - + @@ -14361,12 +14364,12 @@ - + - + - + @@ -18050,23 +18053,23 @@ - + - + - + - + - + - + - + @@ -20289,32 +20292,32 @@ - + - + - + - + - + - + - + - + - + - + @@ -22041,7 +22044,7 @@ - + @@ -26282,7 +26285,7 @@ - + @@ -26300,7 +26303,7 @@ - + @@ -30600,6 +30603,23 @@ + + + + + + + + + + + + + + + + + @@ -32163,7 +32183,7 @@ - + @@ -32184,7 +32204,7 @@ - + @@ -32584,7 +32604,7 @@ - + @@ -33568,7 +33588,7 @@ - + @@ -33826,10 +33846,10 @@ - + - + @@ -34835,7 +34855,7 @@ - + @@ -36502,16 +36522,9 @@ - - - - - - - - + @@ -41224,9 +41237,9 @@ - - - + + + @@ -44631,6 +44644,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -48855,7 +48958,7 @@ - + @@ -48890,7 +48993,7 @@ - + @@ -49207,10 +49310,10 @@ - + - + @@ -54075,24 +54178,24 @@ - + - + - + - + - + @@ -54102,7 +54205,7 @@ - + @@ -54111,11 +54214,11 @@ - + - + @@ -54648,12 +54751,12 @@ - + - + - + @@ -54673,8 +54776,8 @@ - - + + @@ -54702,6 +54805,20 @@ + + + + + + + + + + + + + + @@ -55317,12 +55434,12 @@ - + - + @@ -55406,12 +55523,12 @@ - + - + - + @@ -55619,7 +55736,7 @@ - + @@ -55633,7 +55750,7 @@ - + @@ -55681,7 +55798,7 @@ - + @@ -55691,7 +55808,7 @@ - + @@ -55737,37 +55854,37 @@ - + - + - + - + - + - + - + @@ -55976,26 +56093,26 @@ - + - + - + - + - + - + - + - + @@ -56181,7 +56298,7 @@ - + @@ -56191,7 +56308,7 @@ - + @@ -57773,12 +57890,6 @@ - - - - - - @@ -57786,7 +57897,7 @@ - + @@ -57799,13 +57910,19 @@ - + - + + + + + + + @@ -57817,13 +57934,13 @@ - + - + @@ -57832,7 +57949,7 @@ - + @@ -57842,7 +57959,7 @@ - + @@ -57856,7 +57973,7 @@ - + @@ -57872,7 +57989,7 @@ - + @@ -57903,7 +58020,7 @@ - + @@ -57912,7 +58029,7 @@ - + @@ -57927,11 +58044,11 @@ - + - + @@ -58696,7 +58813,7 @@ - + @@ -58723,7 +58840,7 @@ - + @@ -59189,23 +59306,23 @@ - + - + - + - + - + - + - + @@ -62251,7 +62368,7 @@ - + @@ -62260,7 +62377,7 @@ - + @@ -62630,12 +62747,12 @@ - + - + @@ -62643,7 +62760,7 @@ - + @@ -62651,7 +62768,7 @@ - + @@ -62683,7 +62800,7 @@ - + @@ -62701,7 +62818,7 @@ - + @@ -62718,12 +62835,12 @@ - + - + @@ -62750,7 +62867,7 @@ - + @@ -63499,7 +63616,7 @@ - + @@ -63583,7 +63700,7 @@ - + @@ -66305,7 +66422,7 @@ - + @@ -66316,7 +66433,7 @@ - + @@ -70086,7 +70203,7 @@ - + @@ -71741,10 +71858,10 @@ - + - + @@ -73382,17 +73499,17 @@ - - - + + + - - + + - - + + @@ -78897,7 +79014,7 @@ - + @@ -80869,7 +80986,7 @@ - + @@ -81541,6 +81658,739 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -82706,7 +83556,7 @@ - + @@ -83554,7 +84404,7 @@ - + @@ -84283,7 +85133,7 @@ - + @@ -85918,14 +86768,6 @@ - - - - - - - - @@ -86492,23 +87334,6 @@ - - - - - - - - - - - - - - - - - @@ -86564,7 +87389,7 @@ - + @@ -86589,12 +87414,12 @@ - + - + - + @@ -86633,7 +87458,7 @@ - + @@ -86807,7 +87632,7 @@ - + @@ -86992,10 +87817,10 @@ - + - + @@ -87269,7 +88094,7 @@ - + @@ -87531,7 +88356,7 @@ - + @@ -87579,7 +88404,7 @@ - + @@ -87764,7 +88589,7 @@ - + @@ -87776,15 +88601,15 @@ - + - + - + @@ -87932,7 +88757,7 @@ - + @@ -88046,7 +88871,7 @@ - + @@ -88061,7 +88886,7 @@ - + @@ -88120,7 +88945,7 @@ - + @@ -88742,7 +89567,7 @@ - + @@ -88837,7 +89662,7 @@ - + @@ -89502,7 +90327,7 @@ - + @@ -89550,7 +90375,7 @@ - + @@ -89696,7 +90521,7 @@ - + @@ -90260,7 +91085,7 @@ - + @@ -90682,7 +91507,7 @@ - + @@ -90775,6 +91600,14 @@ + + + + + + + + @@ -91464,7 +92297,7 @@ - + @@ -92561,7 +93394,7 @@ - + @@ -92579,7 +93412,7 @@ - + @@ -93714,10 +94547,10 @@ - + - + @@ -93893,7 +94726,7 @@ - + @@ -93914,7 +94747,7 @@ - + @@ -95957,10 +96790,10 @@ - + - + @@ -101611,7 +102444,7 @@ - + @@ -101625,7 +102458,24 @@ - + + + + + + + + + + + + + + + + + + @@ -101885,7 +102735,7 @@ - + @@ -102685,7 +103535,7 @@ - + @@ -102923,7 +103773,7 @@ - + @@ -102968,7 +103818,7 @@ - + @@ -103318,10 +104168,10 @@ - + - + @@ -104051,16 +104901,16 @@ - + - + - + @@ -104068,7 +104918,7 @@ - + @@ -104146,7 +104996,7 @@ - + @@ -104163,7 +105013,50 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104243,6 +105136,25 @@ + + + + + + + + + + + + + + + + + + + @@ -104402,7 +105314,50 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104421,6 +105376,25 @@ + + + + + + + + + + + + + + + + + + + @@ -104612,7 +105586,7 @@ - + @@ -104630,10 +105604,10 @@ - + - + @@ -104652,7 +105626,7 @@ - + @@ -104682,7 +105656,7 @@ - + @@ -104772,7 +105746,7 @@ - + @@ -105002,210 +105976,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -105213,7 +105987,7 @@ - + @@ -105232,145 +106006,134 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - @@ -105543,13 +106306,6 @@ - - - - - - - @@ -105557,10 +106313,6 @@ - - - - @@ -105633,7 +106385,7 @@ - + @@ -105689,7 +106441,7 @@ - + @@ -105855,28 +106607,28 @@ - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - + + @@ -105900,7 +106652,7 @@ - + @@ -105909,7 +106661,7 @@ - + @@ -106088,7 +106840,7 @@ - + @@ -106117,7 +106869,7 @@ - + @@ -106128,7 +106880,7 @@ - + @@ -106139,7 +106891,7 @@ - + @@ -106967,7 +107719,7 @@ - + @@ -107003,7 +107755,7 @@ - + @@ -107429,7 +108181,7 @@ - + @@ -107509,7 +108261,7 @@ - + @@ -107646,7 +108398,7 @@ - + @@ -107709,7 +108461,7 @@ - + @@ -108270,7 +109022,7 @@ - + @@ -108292,7 +109044,7 @@ - + @@ -108479,6 +109231,17 @@ + + + + + + + + + + + @@ -108541,13 +109304,24 @@ + + + + + + + + + + + - + @@ -108589,26 +109363,26 @@ - + - + - + - + @@ -109232,7 +110006,7 @@ - + @@ -109254,7 +110028,7 @@ - + @@ -109262,7 +110036,7 @@ - + @@ -109270,7 +110044,7 @@ - + @@ -109278,7 +110052,7 @@ - + @@ -110143,10 +110917,10 @@ - + - + @@ -110315,7 +111089,7 @@ - + @@ -110325,7 +111099,7 @@ - + @@ -111023,52 +111797,52 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -111109,7 +111883,7 @@ - + @@ -111117,7 +111891,7 @@ - + @@ -111125,7 +111899,7 @@ - + @@ -111133,7 +111907,7 @@ - + @@ -111141,7 +111915,7 @@ - + @@ -111149,7 +111923,7 @@ - + @@ -111160,7 +111934,7 @@ - + @@ -111179,7 +111953,7 @@ - + @@ -111209,12 +111983,12 @@ - + - + - + @@ -111279,7 +112053,7 @@ - + @@ -111287,7 +112061,7 @@ - + @@ -111511,7 +112285,7 @@ - + @@ -111520,7 +112294,7 @@ - + @@ -112271,62 +113045,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -112423,10 +113141,10 @@ - + - + @@ -112448,10 +113166,10 @@ - + - + @@ -112604,8 +113322,6 @@ - - @@ -112629,7 +113345,7 @@ - + @@ -112663,14 +113379,14 @@ - + - + @@ -112683,7 +113399,7 @@ - + @@ -112790,7 +113506,7 @@ - + @@ -112978,7 +113694,7 @@ - + @@ -113007,10 +113723,10 @@ - + - + @@ -113018,12 +113734,12 @@ - + - + - + @@ -113044,7 +113760,7 @@ - + @@ -113196,7 +113912,7 @@ - + @@ -113309,7 +114025,7 @@ - + @@ -113532,15 +114248,15 @@ - + - + - + - + @@ -113563,7 +114279,7 @@ - + @@ -113950,50 +114666,245 @@ - + + + + + + + + + + + + + - + + + + - - - - - - - - - - - - + - + - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114004,7 +114915,7 @@ - + @@ -114012,11 +114923,11 @@ - + - + - + @@ -114025,12 +114936,12 @@ - + - + @@ -114041,7 +114952,7 @@ - + @@ -114069,7 +114980,7 @@ - + @@ -114088,7 +114999,7 @@ - + @@ -114099,7 +115010,7 @@ - + @@ -114107,7 +115018,7 @@ - + @@ -114121,7 +115032,7 @@ - + @@ -114129,8 +115040,18 @@ - + + + + + + + + + + + @@ -114202,6 +115123,17 @@ + + + + + + + + + + + @@ -118833,7 +119765,7 @@ - + @@ -118841,15 +119773,7 @@ - - - - - - - - - + @@ -118863,17 +119787,6 @@ - - - - - - - - - - - @@ -119562,7 +120475,6 @@ - @@ -119584,14 +120496,6 @@ - - - - - - - - @@ -119688,12 +120592,12 @@ - + - + - + @@ -119726,7 +120630,7 @@ - + @@ -120332,7 +121236,7 @@ - + @@ -120346,7 +121250,7 @@ - + @@ -120354,7 +121258,7 @@ - + @@ -120362,7 +121266,7 @@ - + @@ -120470,17 +121374,6 @@ - - - - - - - - - - - @@ -120553,7 +121446,7 @@ - + @@ -120622,7 +121515,7 @@ - + @@ -120633,12 +121526,12 @@ - + - + - + @@ -120655,13 +121548,13 @@ - + - + @@ -120785,7 +121678,7 @@ - + @@ -120845,13 +121738,13 @@ - + - + @@ -121587,7 +122480,7 @@ - + @@ -121597,9 +122490,9 @@ - + - + @@ -121611,7 +122504,7 @@ - + @@ -121667,7 +122560,7 @@ - + @@ -121676,24 +122569,24 @@ - + - + - + - + - + - + @@ -121701,7 +122594,7 @@ - + @@ -121709,7 +122602,7 @@ - + @@ -121717,7 +122610,7 @@ - + @@ -121740,7 +122633,7 @@ - + @@ -121818,13 +122711,13 @@ - + - + @@ -122468,6 +123361,14 @@ + + + + + + + + @@ -122698,7 +123599,7 @@ - + @@ -122866,7 +123767,7 @@ - + @@ -122937,9 +123838,6 @@ - - - @@ -123550,7 +124448,7 @@ - + @@ -123667,10 +124565,10 @@ - + - + @@ -123777,10 +124675,10 @@ - + - + @@ -124627,7 +125525,7 @@ - + @@ -125841,7 +126739,7 @@ - + @@ -126209,7 +127107,7 @@ - + @@ -126429,7 +127327,7 @@ - + @@ -126537,7 +127435,7 @@ - + @@ -126553,6 +127451,6 @@ diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index 4937eec64a99..ab8314462433 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -1289,6 +1289,8 @@ kvmalloc_node kzfree led_blink_set + led_classdev_flash_register_ext + led_classdev_flash_unregister led_classdev_register_ext led_classdev_unregister led_get_default_pattern diff --git a/android/abi_gki_aarch64_workarounds b/android/abi_gki_aarch64_workarounds new file mode 100644 index 000000000000..3e4b6d16c687 --- /dev/null +++ b/android/abi_gki_aarch64_workarounds @@ -0,0 +1,3 @@ +[abi_whitelist] + # b/167230325 + ehci_handshake diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 915bb1639763..14863ad89f81 100644 --- a/arch/x86/power/cpu.c +++ b/arch/x86/power/cpu.c @@ -268,6 +268,19 @@ static void notrace __restore_processor_state(struct saved_context *ctxt) /* Needed by apm.c */ void notrace restore_processor_state(void) { +#ifdef __clang__ + // The following code snippet is copied from __restore_processor_state. + // Its purpose is to prepare GS segment before the function is called. + // Since the function is compiled with SCS on, it will use GS at its + // entry. + // TODO: Hack to be removed later when compiler bug is fixed. +#ifdef CONFIG_X86_64 + wrmsrl(MSR_GS_BASE, saved_context.kernelmode_gs_base); +#else + loadsegment(fs, __KERNEL_PERCPU); + loadsegment(gs, __KERNEL_STACK_CANARY); +#endif +#endif __restore_processor_state(&saved_context); } #ifdef CONFIG_X86_32 diff --git a/build.config.gki.aarch64 b/build.config.gki.aarch64 index d80fb6a2ddbf..3a875c99c702 100644 --- a/build.config.gki.aarch64 +++ b/build.config.gki.aarch64 @@ -17,6 +17,7 @@ android/abi_gki_aarch64_qcom android/abi_gki_aarch64_sunxi android/abi_gki_aarch64_unisoc android/abi_gki_aarch64_vivo +android/abi_gki_aarch64_workarounds " TRIM_NONLISTED_KMI=1 KMI_SYMBOL_LIST_ADD_ONLY=1 diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 4d8ae842041d..02df51ede095 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -3306,7 +3306,7 @@ static void binder_transaction(struct binder_proc *proc, t->buffer = binder_alloc_new_buf(&target_proc->alloc, tr->data_size, tr->offsets_size, extra_buffers_size, - !reply && (t->flags & TF_ONE_WAY)); + !reply && (t->flags & TF_ONE_WAY), current->tgid); if (IS_ERR(t->buffer)) { /* * -ESRCH indicates VMA cleared. The target is dying. diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index 2048ba6c8b08..f637998e3f69 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -339,12 +339,50 @@ static inline struct vm_area_struct *binder_alloc_get_vma( return vma; } +static void debug_low_async_space_locked(struct binder_alloc *alloc, int pid) +{ + /* + * Find the amount and size of buffers allocated by the current caller; + * The idea is that once we cross the threshold, whoever is responsible + * for the low async space is likely to try to send another async txn, + * and at some point we'll catch them in the act. This is more efficient + * than keeping a map per pid. + */ + struct rb_node *n = alloc->free_buffers.rb_node; + struct binder_buffer *buffer; + size_t total_alloc_size = 0; + size_t num_buffers = 0; + + for (n = rb_first(&alloc->allocated_buffers); n != NULL; + n = rb_next(n)) { + buffer = rb_entry(n, struct binder_buffer, rb_node); + if (buffer->pid != pid) + continue; + if (!buffer->async_transaction) + continue; + total_alloc_size += binder_alloc_buffer_size(alloc, buffer) + + sizeof(struct binder_buffer); + num_buffers++; + } + + /* + * Warn if this pid has more than 50 transactions, or more than 50% of + * async space (which is 25% of total buffer size). + */ + if (num_buffers > 50 || total_alloc_size > alloc->buffer_size / 4) { + binder_alloc_debug(BINDER_DEBUG_USER_ERROR, + "%d: pid %d spamming oneway? %zd buffers allocated for a total size of %zd\n", + alloc->pid, pid, num_buffers, total_alloc_size); + } +} + static struct binder_buffer *binder_alloc_new_buf_locked( struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, - int is_async) + int is_async, + int pid) { struct rb_node *n = alloc->free_buffers.rb_node; struct binder_buffer *buffer; @@ -487,11 +525,20 @@ static struct binder_buffer *binder_alloc_new_buf_locked( buffer->offsets_size = offsets_size; buffer->async_transaction = is_async; buffer->extra_buffers_size = extra_buffers_size; + buffer->pid = pid; if (is_async) { alloc->free_async_space -= size + sizeof(struct binder_buffer); binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC_ASYNC, "%d: binder_alloc_buf size %zd async free %zd\n", alloc->pid, size, alloc->free_async_space); + if (alloc->free_async_space < alloc->buffer_size / 10) { + /* + * Start detecting spammers once we have less than 20% + * of async space left (which is less than 10% of total + * buffer size). + */ + debug_low_async_space_locked(alloc, pid); + } } return buffer; @@ -509,6 +556,7 @@ err_alloc_buf_struct_failed: * @offsets_size: user specified buffer offset * @extra_buffers_size: size of extra space for meta-data (eg, security context) * @is_async: buffer for async transaction + * @pid: pid to attribute allocation to (used for debugging) * * Allocate a new buffer given the requested sizes. Returns * the kernel version of the buffer pointer. The size allocated @@ -521,13 +569,14 @@ struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, - int is_async) + int is_async, + int pid) { struct binder_buffer *buffer; mutex_lock(&alloc->mutex); buffer = binder_alloc_new_buf_locked(alloc, data_size, offsets_size, - extra_buffers_size, is_async); + extra_buffers_size, is_async, pid); mutex_unlock(&alloc->mutex); return buffer; } diff --git a/drivers/android/binder_alloc.h b/drivers/android/binder_alloc.h index db9c1b984695..55d8b4106766 100644 --- a/drivers/android/binder_alloc.h +++ b/drivers/android/binder_alloc.h @@ -32,6 +32,7 @@ struct binder_transaction; * @offsets_size: size of array of offsets * @extra_buffers_size: size of space for other objects (like sg lists) * @user_data: user pointer to base of buffer space + * @pid: pid to attribute the buffer to (caller) * * Bookkeeping structure for binder transaction buffers */ @@ -51,6 +52,7 @@ struct binder_buffer { size_t offsets_size; size_t extra_buffers_size; void __user *user_data; + int pid; }; /** @@ -117,7 +119,8 @@ extern struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, - int is_async); + int is_async, + int pid); extern void binder_alloc_init(struct binder_alloc *alloc); extern int binder_alloc_shrinker_init(void); extern void binder_alloc_vma_close(struct binder_alloc *alloc); diff --git a/drivers/android/binder_alloc_selftest.c b/drivers/android/binder_alloc_selftest.c index 4151d9938255..c2b323bc3b3a 100644 --- a/drivers/android/binder_alloc_selftest.c +++ b/drivers/android/binder_alloc_selftest.c @@ -119,7 +119,7 @@ static void binder_selftest_alloc_buf(struct binder_alloc *alloc, int i; for (i = 0; i < BUFFER_NUM; i++) { - buffers[i] = binder_alloc_new_buf(alloc, sizes[i], 0, 0, 0); + buffers[i] = binder_alloc_new_buf(alloc, sizes[i], 0, 0, 0, 0); if (IS_ERR(buffers[i]) || !check_buffer_pages_allocated(alloc, buffers[i], sizes[i])) { diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 0d3b4faa7bc7..7b4b1abbb537 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -55,4 +55,3 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_rwsem_list_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_futex_plist_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_is_fpsimd_save); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipi_stop); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_input_handle_event); diff --git a/drivers/input/input.c b/drivers/input/input.c index 6434e0aec875..e2eb9b9b8363 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -26,10 +26,6 @@ #include "input-compat.h" #include "input-poller.h" -#ifndef __GENKSYMS__ -#include -#endif - MODULE_AUTHOR("Vojtech Pavlik "); MODULE_DESCRIPTION("Input core"); MODULE_LICENSE("GPL"); @@ -442,7 +438,6 @@ void input_event(struct input_dev *dev, if (is_event_supported(type, dev->evbit, EV_MAX)) { spin_lock_irqsave(&dev->event_lock, flags); - trace_android_vh_input_handle_event(dev, type, code, value); input_handle_event(dev, type, code, value); spin_unlock_irqrestore(&dev->event_lock, flags); } diff --git a/include/trace/hooks/debug.h b/include/trace/hooks/debug.h index d3127643ece8..99ae33889b0d 100644 --- a/include/trace/hooks/debug.h +++ b/include/trace/hooks/debug.h @@ -11,20 +11,12 @@ #include #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) - struct pt_regs; DECLARE_HOOK(android_vh_ipi_stop, TP_PROTO(struct pt_regs *regs), TP_ARGS(regs)) - -struct input_dev; -DECLARE_HOOK(android_vh_input_handle_event, - TP_PROTO(struct input_dev *dev, unsigned int type, - unsigned int code, int value), - TP_ARGS(dev, type, code, value)) #else #define trace_android_vh_ipi_stop(regs) -#define trace_android_vh_input_handle_event(dev, type, code, value) #endif #endif /* _TRACE_HOOK_DEBUG_H */ diff --git a/net/core/dev.c b/net/core/dev.c index fb3238c916ab..bfb7bf0f2847 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5609,12 +5609,13 @@ static void napi_skb_free_stolen_head(struct sk_buff *skb) kmem_cache_free(skbuff_head_cache, skb); } -static gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb) +static gro_result_t napi_skb_finish(struct napi_struct *napi, + struct sk_buff *skb, + gro_result_t ret) { switch (ret) { case GRO_NORMAL: - if (netif_receive_skb_internal(skb)) - ret = GRO_DROP; + gro_normal_one(napi, skb); break; case GRO_DROP: @@ -5646,7 +5647,7 @@ gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb) skb_gro_reset_offset(skb); - ret = napi_skb_finish(dev_gro_receive(napi, skb), skb); + ret = napi_skb_finish(napi, skb, dev_gro_receive(napi, skb)); trace_napi_gro_receive_exit(ret); return ret;