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 0624DC433FE for ; Fri, 3 Dec 2021 14:15:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381392AbhLCOSb (ORCPT ); Fri, 3 Dec 2021 09:18:31 -0500 Received: from mga04.intel.com ([192.55.52.120]:2316 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352612AbhLCOS3 (ORCPT ); Fri, 3 Dec 2021 09:18:29 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10186"; a="235713332" X-IronPort-AV: E=Sophos;i="5.87,284,1631602800"; d="scan'208";a="235713332" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2021 06:15:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,284,1631602800"; d="scan'208";a="561730699" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by fmsmga008.fm.intel.com with ESMTP; 03 Dec 2021 06:14:57 -0800 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 1B3EEtKR008897; Fri, 3 Dec 2021 14:14:55 GMT From: Alexander Lobakin To: Peter Zijlstra Cc: Alexander Lobakin , linux-hardening@vger.kernel.org, x86@kernel.org, Jesse Brandeburg , Kristen Carlson Accardi , Kees Cook , Miklos Szeredi , Ard Biesheuvel , Tony Luck , Bruce Schlobohm , Jessica Yu , kernel test robot , Miroslav Benes , Evgenii Shatokhin , Jonathan Corbet , Masahiro Yamada , Michal Marek , Nick Desaulniers , Herbert Xu , "David S. Miller" , Thomas Gleixner , Will Deacon , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Arnd Bergmann , Josh Poimboeuf , Nathan Chancellor , Masami Hiramatsu , Marios Pomonis , Sami Tolvanen , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, live-patching@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v8 08/14] livepatch: only match unique symbols when using FG-KASLR Date: Fri, 3 Dec 2021 15:14:35 +0100 Message-Id: <20211203141435.82565-1-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: <20211202223214.72888-1-alexandr.lobakin@intel.com> <20211202223214.72888-9-alexandr.lobakin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra Date: Fri, 3 Dec 2021 11:05:54 +0100 > On Thu, Dec 02, 2021 at 11:32:08PM +0100, Alexander Lobakin wrote: > > If any type of function granular randomization is enabled, the sympos > > algorithm will fail, as it will be impossible to resolve symbols when > > there are duplicates using the previous symbol position. > > > > We could override sympos to 0, but make it more clear to the user > > and bail out if the symbol is not unique. > > Since we're going lots of horrendous things already, why can't we fix > this duplicate nonsense too? Oh, I see a ton of code duplication here in Kristen's code as well. I'll address it. Al