From 1fe41e33fb9dc2acbf683e682dd3a9afa7518bf1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 13 May 2022 13:45:30 +0200 Subject: [PATCH] ANDROID: GKI: update the abi .xml file due to hex_to_bin() changes Commit 4541645b5881 ("hex2bin: make the function hex_to_bin constant-time") in 5.15.38 changed the signature of the hex_to_bin() function to fix a key leak attack vector. This is not an abi break as older modules that use the function will still work properly, and the CRC is preserved, but this resolves any issues going forward as well. Leaf changes summary: 1 artifact changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 1 Changed, 0 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some sub-type change: [C] 'function int hex_to_bin(char)' at hexdump.c:53:1 has some sub-type changes: parameter 1 of type 'char' changed: type name changed from 'char' to 'unsigned char' type size hasn't changed Fixes: 4541645b5881 ("hex2bin: make the function hex_to_bin constant-time") Signed-off-by: Greg Kroah-Hartman Change-Id: I26b2283300369049abc831072df9a5ace3e770d1 --- android/abi_gki_aarch64.xml | 718 ++++++++++++++++++------------------ include/linux/kernel.h | 4 + lib/hexdump.c | 8 + 3 files changed, 371 insertions(+), 359 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 323dcbf57e0d..dbcb7509cafc 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -6170,7 +6170,7 @@ - + @@ -6732,7 +6732,7 @@ - + @@ -13071,7 +13071,7 @@ - + @@ -13083,7 +13083,7 @@ - + @@ -13110,10 +13110,10 @@ - + - + @@ -14853,7 +14853,7 @@ - + @@ -20142,7 +20142,7 @@ - + @@ -22845,7 +22845,7 @@ - + @@ -25413,7 +25413,7 @@ - + @@ -31983,7 +31983,7 @@ - + @@ -39266,60 +39266,60 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -44228,7 +44228,7 @@ - + @@ -45055,7 +45055,7 @@ - + @@ -45776,7 +45776,7 @@ - + @@ -45794,7 +45794,7 @@ - + @@ -47638,7 +47638,7 @@ - + @@ -52336,7 +52336,7 @@ - + @@ -58868,7 +58868,7 @@ - + @@ -63096,21 +63096,21 @@ - + - + - + - + - + - + @@ -64680,7 +64680,7 @@ - + @@ -70684,7 +70684,7 @@ - + @@ -72445,45 +72445,45 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -73389,10 +73389,10 @@ - + - + @@ -78872,35 +78872,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -78911,7 +78883,7 @@ - + @@ -78919,7 +78891,7 @@ - + @@ -78927,7 +78899,7 @@ - + @@ -78935,7 +78907,7 @@ - + @@ -78943,7 +78915,7 @@ - + @@ -78951,7 +78923,7 @@ - + @@ -78962,7 +78934,7 @@ - + @@ -78970,7 +78942,7 @@ - + @@ -78978,7 +78950,7 @@ - + @@ -78989,7 +78961,7 @@ - + @@ -79000,7 +78972,7 @@ - + @@ -79008,7 +78980,7 @@ - + @@ -79016,7 +78988,7 @@ - + @@ -79024,7 +78996,7 @@ - + @@ -79032,7 +79004,7 @@ - + @@ -79040,7 +79012,7 @@ - + @@ -79048,7 +79020,7 @@ - + @@ -79056,12 +79028,12 @@ - + - + @@ -79087,7 +79059,7 @@ - + @@ -79101,7 +79073,7 @@ - + @@ -79109,7 +79081,7 @@ - + @@ -79117,7 +79089,7 @@ - + @@ -79128,7 +79100,7 @@ - + @@ -79136,7 +79108,7 @@ - + @@ -79144,7 +79116,7 @@ - + @@ -79152,7 +79124,7 @@ - + @@ -79163,7 +79135,7 @@ - + @@ -79171,7 +79143,7 @@ - + @@ -79182,7 +79154,7 @@ - + @@ -79190,7 +79162,7 @@ - + @@ -79198,6 +79170,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -84235,7 +84235,7 @@ - + @@ -94784,7 +94784,7 @@ - + @@ -96151,15 +96151,15 @@ - + - + - + - + @@ -96462,7 +96462,7 @@ - + @@ -101440,7 +101440,7 @@ - + @@ -101632,10 +101632,10 @@ - + - + @@ -109170,12 +109170,12 @@ - + - + @@ -109184,7 +109184,7 @@ - + @@ -109226,7 +109226,7 @@ - + @@ -109482,7 +109482,7 @@ - + @@ -113955,7 +113955,7 @@ - + @@ -116123,10 +116123,10 @@ - + - + @@ -117859,15 +117859,15 @@ - + - + - + - + @@ -120103,33 +120103,33 @@ - + - + - + - + - + - + - + - + - + - + @@ -122461,9 +122461,9 @@ - - - + + + @@ -125531,10 +125531,10 @@ - - - - + + + + @@ -125896,15 +125896,15 @@ - - - - + + + + - - - + + + @@ -133643,9 +133643,9 @@ - - - + + + @@ -133868,8 +133868,8 @@ - - + + @@ -134545,12 +134545,12 @@ - - - - - - + + + + + + @@ -135003,26 +135003,26 @@ - - - - + + + + - - - - - - - - + + + + + + + + - - + + @@ -137448,8 +137448,8 @@ - - + + @@ -137484,17 +137484,17 @@ - - - - - + + + + + - - - - + + + + @@ -137635,10 +137635,10 @@ - - - - + + + + @@ -137656,8 +137656,8 @@ - - + + @@ -138199,9 +138199,9 @@ - - - + + + @@ -139024,7 +139024,7 @@ - + @@ -139383,8 +139383,8 @@ - - + + @@ -139394,8 +139394,8 @@ - - + + @@ -140446,10 +140446,10 @@ - - - - + + + + @@ -142548,15 +142548,15 @@ - - - - - - - - - + + + + + + + + + @@ -146386,25 +146386,25 @@ - - - - + + + + - - - + + + - - - + + + - - - + + + @@ -146412,44 +146412,44 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -146460,63 +146460,63 @@ - - - - - + + + + + - - - - - - + + + + + + - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - - + + + + @@ -147539,8 +147539,8 @@ - - + + @@ -147555,8 +147555,8 @@ - - + + @@ -148936,30 +148936,30 @@ - - - + + + - - + + - - + + - - + + - - - + + + - - + + @@ -151568,9 +151568,9 @@ - - - + + + @@ -152108,10 +152108,10 @@ - - - - + + + + @@ -152127,15 +152127,15 @@ - - - + + + - - - - + + + + @@ -152148,13 +152148,13 @@ - - - + + + - - + + @@ -152163,27 +152163,27 @@ - - - + + + - - - - - - + + + + + + - - - + + + - - - + + + @@ -152208,9 +152208,9 @@ - - - + + + diff --git a/include/linux/kernel.h b/include/linux/kernel.h index f56cd8879a59..3e5a0f874a5e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -277,7 +277,11 @@ static inline char *hex_byte_pack_upper(char *buf, u8 byte) return buf; } +#ifdef __GENKSYMS__ +extern int hex_to_bin(char ch); +#else extern int hex_to_bin(unsigned char ch); +#endif extern int __must_check hex2bin(u8 *dst, const char *src, size_t count); extern char *bin2hex(char *dst, const void *src, size_t count); diff --git a/lib/hexdump.c b/lib/hexdump.c index 06833d404398..07cda1a13e09 100644 --- a/lib/hexdump.c +++ b/lib/hexdump.c @@ -43,7 +43,15 @@ EXPORT_SYMBOL(hex_asc_upper); * uppercase and lowercase letters, so we use (ch & 0xdf), which converts * lowercase to uppercase */ +/* + * perserve abi due to 15b78a8e38e8 ("hex2bin: make the function hex_to_bin + * constant-time" + */ +#ifdef __GENKSYMS__ +int hex_to_bin(char ch) +#else int hex_to_bin(unsigned char ch) +#endif { unsigned char cu = ch & 0xdf; return -1 +