From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3748C2F25 for ; Sat, 14 May 2022 21:50:46 +0000 (UTC) Received: by mail-pg1-f182.google.com with SMTP id x8so7258154pgr.4 for ; Sat, 14 May 2022 14:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/+6DXPA/etQO+MROO0HlzYfznWa6yuzqrt1lFu+IZCU=; b=X46GUAIQhLZgbIbW3ALwg7mUAi9aD9nKapR3TAoFkfjTlqeeHuVMk1gIo1XQ0yhsdL N0hnyu4RWWhHM3wtF0iEMRxtXOU5NkFees7jAbHlv51A9j241elTXlQkZcd3ZBf54JuI QmQxGgU2qsxD6sDjGZsdeqw6FNs+bdOxLbp9U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/+6DXPA/etQO+MROO0HlzYfznWa6yuzqrt1lFu+IZCU=; b=v2rXo0WIKXDi2/fK69wghxZ8JxSNFjEtQhr7SMZJtKKuTmAEAVjCZp+jt4DqwLaJD/ KVwLWpRjEGDBIMeSlqTtDFRIHuwkdEoUOiFPsDUazaIEDLzJ8cBzTh0Mw6UdwYLAAU8u 8uCef8IgLJYkWGXwYiMurLT+CMUUlE3THIaeXJ78+gMY+7rvYYXY9iOfp79vJ44VbQb8 P9aY5Axtu2YW05UjlrBs4smov2TnA6hetUWsnv3PtaVfKE0Of2sVWm6Qgn19YCeqy6WJ RiYauGnfg/Pq+Hpn9H1Bref2TcoJ+ySrsx6bwlAkQ4hsBUHUtNhSnc+6ch+QJGOqBHK4 ypqw== X-Gm-Message-State: AOAM53152R+6FshkL0hOzOrEW/Fc2WCko3KLBG1+7AeerjWQNzZgt39P WErU+hrh1zWkt+1lzkFM0gEqIw== X-Google-Smtp-Source: ABdhPJyKT2rYy5VGyrBn24YvTCGmr7LDXKmlZ9vWWFE2j7T4CYJuXCvTnF4P3WJsCwUHfcUj11JmLg== X-Received: by 2002:a05:6a00:1709:b0:505:fa47:b611 with SMTP id h9-20020a056a00170900b00505fa47b611mr6064948pfc.65.1652565045739; Sat, 14 May 2022 14:50:45 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j13-20020a170902c3cd00b0015ea95948ebsm4116861plj.134.2022.05.14.14.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 May 2022 14:50:45 -0700 (PDT) Date: Sat, 14 May 2022 14:50:44 -0700 From: Kees Cook To: Sami Tolvanen Cc: linux-kernel@vger.kernel.org, Josh Poimboeuf , Peter Zijlstra , x86@kernel.org, Catalin Marinas , Will Deacon , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [RFC PATCH v2 09/21] arm64: Add types to indirect called assembly functions Message-ID: <202205141450.C5287B6@keescook> References: <20220513202159.1550547-1-samitolvanen@google.com> <20220513202159.1550547-10-samitolvanen@google.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220513202159.1550547-10-samitolvanen@google.com> On Fri, May 13, 2022 at 01:21:47PM -0700, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, assembly functions indirectly called from C > code must be annotated with type identifiers to pass CFI checking. Use > SYM_TYPED_FUNC_START for indirectly called functions. > > Signed-off-by: Sami Tolvanen Sort of related to my question about SYM_TYPED_FUNC_START itself, how were these cases identified? Reviewed-by: Kees Cook -- Kees Cook From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0327C433EF for ; Sat, 14 May 2022 21:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/wVcreD3Io+aeua898G7M67BA4+DVIXkuiwVBA4xfI0=; b=A58V4eeOhFrLZ2 9JsDok/baAG7KgyTPq+eVBs/85J6nvBAI1C/4U9/7l33qo4mWl6DUIEw6pUB8i3/uf9m94rzkPFsA 6D4O4opd+K4prDZg3FkjziBx0MLvx461Q2nCqbnLo8eJJF1jnAjRfu51Th5dR+nIP2gU/jKZAuKiA MAsPdsW1iTnxZpCHB975V3a/eYRcbKm+0rjPSBo3FmqgQbNearqKi8dxLmwtD5xrvBRKCxC00QJmA /Mx5xoH3FMlZDs9aYxRDT5b3DJGU84Bd40MUuiMqf0dHARmzaAbwyN18sFyQx42xuohDsylTUKv8W ZPcrdcMGlrEVVHCD9/xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1npzf0-002NM6-4e; Sat, 14 May 2022 21:50:50 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1npzew-002NKT-NB for linux-arm-kernel@lists.infradead.org; Sat, 14 May 2022 21:50:48 +0000 Received: by mail-pf1-x42a.google.com with SMTP id k16so3975760pff.5 for ; Sat, 14 May 2022 14:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/+6DXPA/etQO+MROO0HlzYfznWa6yuzqrt1lFu+IZCU=; b=X46GUAIQhLZgbIbW3ALwg7mUAi9aD9nKapR3TAoFkfjTlqeeHuVMk1gIo1XQ0yhsdL N0hnyu4RWWhHM3wtF0iEMRxtXOU5NkFees7jAbHlv51A9j241elTXlQkZcd3ZBf54JuI QmQxGgU2qsxD6sDjGZsdeqw6FNs+bdOxLbp9U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/+6DXPA/etQO+MROO0HlzYfznWa6yuzqrt1lFu+IZCU=; b=iAu+6UZbgt4oDhHdWD9VifClJaoVtS82Ffi2M7cbD3lCox0vdIo/jAHiY3QEOaorjl DIOulk+esXWi4HRMuBRdfKRUvvI4PC8GDzPxdmLBEEeDWYtUazhMCyW47KU4xw/38o7X 5df5FipyVsr3grY80OgympNuVVtuj8yArh8rCvyVqNxDQW2HoHmasz6Iy3OV4jaN94iJ DQ3E1ZqdnZ9Vh/o3BRrPVDBbsMG+O4Lcn9lki/mOfQmUQoM97lsKVVs1tcsDoiB5ZEs3 PeQv6zijjds2WmzQTAtk+0IZid7GtvJn4fgsbgikqCvGyXMm/cyk4tOAuBcdeCoSYS6W LiHQ== X-Gm-Message-State: AOAM530NfPkgbyyfdM6oDp4w6u47eth7RdMrSfqvhmrjR1Iy54fldJVC E9wxjcbzYxc2IMlQKQ4wx2Bf4Q== X-Google-Smtp-Source: ABdhPJyKT2rYy5VGyrBn24YvTCGmr7LDXKmlZ9vWWFE2j7T4CYJuXCvTnF4P3WJsCwUHfcUj11JmLg== X-Received: by 2002:a05:6a00:1709:b0:505:fa47:b611 with SMTP id h9-20020a056a00170900b00505fa47b611mr6064948pfc.65.1652565045739; Sat, 14 May 2022 14:50:45 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j13-20020a170902c3cd00b0015ea95948ebsm4116861plj.134.2022.05.14.14.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 May 2022 14:50:45 -0700 (PDT) Date: Sat, 14 May 2022 14:50:44 -0700 From: Kees Cook To: Sami Tolvanen Cc: linux-kernel@vger.kernel.org, Josh Poimboeuf , Peter Zijlstra , x86@kernel.org, Catalin Marinas , Will Deacon , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [RFC PATCH v2 09/21] arm64: Add types to indirect called assembly functions Message-ID: <202205141450.C5287B6@keescook> References: <20220513202159.1550547-1-samitolvanen@google.com> <20220513202159.1550547-10-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220513202159.1550547-10-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220514_145046_829232_793F55A8 X-CRM114-Status: GOOD ( 10.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, May 13, 2022 at 01:21:47PM -0700, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, assembly functions indirectly called from C > code must be annotated with type identifiers to pass CFI checking. Use > SYM_TYPED_FUNC_START for indirectly called functions. > > Signed-off-by: Sami Tolvanen Sort of related to my question about SYM_TYPED_FUNC_START itself, how were these cases identified? Reviewed-by: Kees Cook -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel