From patchwork Tue Jan 11 14:36:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 12709916 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF34CC433F5 for ; Tue, 11 Jan 2022 14:36:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242168AbiAKOgh (ORCPT ); Tue, 11 Jan 2022 09:36:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240845AbiAKOgh (ORCPT ); Tue, 11 Jan 2022 09:36:37 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACD09C06173F; Tue, 11 Jan 2022 06:36:36 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 3D8661F44642 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1641911794; bh=WoCSfvWZ0RM1u1nDrNK6amswglzkJ65ayw9iZSom+UI=; h=From:To:Cc:Subject:Date:From; b=J4zrWziFsqvl8KXsnoBV6LHs6IhDf2sdQkFD5qfCiGZcEvjktFI1em79VvJ3mbZk2 D9NXIMXeaSmTbjNVBYRrxWZf17/77NQlKyWIxMb4ahMoFscUn2/UPEPl62h+zCDfOx tDG+ph9eROPaNmRTQSWpyMN8o9Z3S7atpH9HbJwrt4dty740OdV2vfkxicTKnf0QLw u8ZV1xdREf7okKEA5bRtC2zW5QJPEygX1uNwyPYG5Nf+G5Bj7HPihBRnu5S4v4cSEa gv/H/c4DsTKxLOowC4Lc4LN5QmLj521/lA6/PLSgxROeZAKgS6RTxUFY1OUUESqJ0H 2H4QCpK1MMMzQ== From: Muhammad Usama Anjum To: Kees Cook , Shuah Khan , linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK), linux-kernel@vger.kernel.org (open list) Cc: Muhammad Usama Anjum , kernel@collabora.com Subject: [PATCH 1/2] selftests/lkdtm: Remove dead config option Date: Tue, 11 Jan 2022 19:36:13 +0500 Message-Id: <20220111143614.629452-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org CONFIG_HARDENED_USERCOPY_FALLBACK config option has been removed in commit 53944f171a89 ("mm: remove HARDENED_USERCOPY_FALLBACK"). Remove it from the lkdtm selftest config. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/lkdtm/config | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/lkdtm/config b/tools/testing/selftests/lkdtm/config index a26a3fa9e925..a7a58f885f52 100644 --- a/tools/testing/selftests/lkdtm/config +++ b/tools/testing/selftests/lkdtm/config @@ -3,7 +3,6 @@ CONFIG_DEBUG_LIST=y CONFIG_SLAB_FREELIST_HARDENED=y CONFIG_FORTIFY_SOURCE=y CONFIG_HARDENED_USERCOPY=y -# CONFIG_HARDENED_USERCOPY_FALLBACK is not set CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=y CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y CONFIG_UBSAN_BOUNDS=y From patchwork Tue Jan 11 14:36:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 12709917 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F00FFC433FE for ; Tue, 11 Jan 2022 14:36:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240845AbiAKOgj (ORCPT ); Tue, 11 Jan 2022 09:36:39 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:50992 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242179AbiAKOgi (ORCPT ); Tue, 11 Jan 2022 09:36:38 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 466931F44645 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1641911796; bh=dewZi1oCBM3pJh97E1Dyib+o1ce0sI8WMZt2GX/YFVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vs9AwJwY3Dgc528+vc74CGjIyYO5WocgFvc3qu+AxRZf031L0MBB7Wy7GaSWzHfjS z6+daa9G6CU/aDPJNbDxMv5k2Pt0t2yu+FquhoV6xr76gTai7rX00K+vE7FmMT2bAk OIo7zdZ5lctF9Auy5zJTUB3JZRvzbqMSHp8s10qEky1o2wkszE55ahpzegLDRYRukQ 0qfV1wn50bdkazAHbjvKpG3Iw0ZiN9sDlRLzuicS3I5tP6AovozuFFOHuLXyuv8Aj4 xA8SXDBTET+iOBZBBtB3vsJwxeaHnuuUp2DjeN7/WrFAogSXtrR7YWdt3+agu9lFbA UOZS/36MjdW+Q== From: Muhammad Usama Anjum To: Kees Cook , Shuah Khan , linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK), linux-kernel@vger.kernel.org (open list) Cc: Muhammad Usama Anjum , kernel@collabora.com Subject: [PATCH 2/2] selftests/lkdtm: Add UBSAN config Date: Tue, 11 Jan 2022 19:36:14 +0500 Message-Id: <20220111143614.629452-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220111143614.629452-1-usama.anjum@collabora.com> References: <20220111143614.629452-1-usama.anjum@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org UBSAN_BOUNDS and UBSAN_TRAP depend on UBSAN config option. merge_config.sh script generates following warnings if parent config doesn't have UBSAN config already enabled and UBSAN_BOUNDS/UBSAN_TRAP config options don't get added to the parent config. Value requested for CONFIG_UBSAN_BOUNDS not in final .config Requested value: CONFIG_UBSAN_BOUNDS=y Actual value: Value requested for CONFIG_UBSAN_TRAP not in final .config Requested value: CONFIG_UBSAN_TRAP=y Actual value: Fix this by including UBSAN config. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/lkdtm/config | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/lkdtm/config b/tools/testing/selftests/lkdtm/config index a7a58f885f52..46f39ee76208 100644 --- a/tools/testing/selftests/lkdtm/config +++ b/tools/testing/selftests/lkdtm/config @@ -5,6 +5,7 @@ CONFIG_FORTIFY_SOURCE=y CONFIG_HARDENED_USERCOPY=y CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=y CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y +CONFIG_UBSAN=y CONFIG_UBSAN_BOUNDS=y CONFIG_UBSAN_TRAP=y CONFIG_STACKPROTECTOR_STRONG=y