Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22730490rwd; Fri, 30 Jun 2023 11:46:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlG56kDgqHN8m1o5/oheCtbE4DcZBejn0WuldfKhgvQkDGfHNXNMdNiYtSKrTpj2jNBFaRtS X-Received: by 2002:a92:d386:0:b0:345:e5ab:e177 with SMTP id o6-20020a92d386000000b00345e5abe177mr3142696ilo.9.1688150801780; Fri, 30 Jun 2023 11:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688150801; cv=none; d=google.com; s=arc-20160816; b=FBWLzIN7ggHc0eK0aYDGqNSaK6x/b5GJJVTxkgzFiN2lLnqUcO8yiGCWUWietdKk2M TAH8ulXOTGxLf/5Au1+RrFXCYIHX3rMzBcELvhzTmRBHjVnsl29U4HjzMQ4xPAAZAWRU q3csiCqgaMrhMnMwLLn9YzLdfSxWlPYafsFu/vtWokU0+Eu3C/REqKu7VNq2JQBWFRvA J9pfegybXjdTrsG7rYDr/CiIK0uxvRTrAGK9t9t6E8uqyo4VubGSH4snLlUasX6JDW04 578EVnu3n5eKIU3Ah7Oz6p3dB1xIHmsNJEbr6NK6P2CWaAJNr4gPqDOLa2DldZsrc/H0 ZCzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kyMHPqgFkqrCLjrfJwzZAICfyuA66R9v5BF7rbPVGX0=; fh=OCV63wBTrJIWgXPg7RMQ8/IXx8xZ6cUExDp1DigCJ+o=; b=QYWHZ40UzVV9JpXBiJS70LZv+UPXHL+iUHltDTpW4zSE+ZAYv6VQWd5DzL1KF27OuZ X+MwcldgZM4eYYsXQX/9gOmTdGZIHVIOy2L1/wGZSGxZ1JOOPTdCDEBQbmuy3XEuHcFR DKUXEFUU1Aj2On/+sCyQu7XVvMIa2LmQAzyspT7sYkTwtWOdrAiPrxVcGsPM4nOMlMxW Md4OyFhdrvCpFH0AbRCyqKB646TEkoyY/W/pNIwNN1BEgSCtYtikoK9poLABgoCggjR5 T+kKLr86Is6Xn8MMHlOyoDWnemuRAaIXHedKN+90fIM9CL/t/ZWYAqwzV/ueL/r1F+e9 O8vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SyByWdPj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 1-20020a630b01000000b00553e8d95744si13296501pgl.94.2023.06.30.11.46.27; Fri, 30 Jun 2023 11:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SyByWdPj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233095AbjF3SZY (ORCPT + 99 others); Fri, 30 Jun 2023 14:25:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233080AbjF3SZP (ORCPT ); Fri, 30 Jun 2023 14:25:15 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F1961B5 for ; Fri, 30 Jun 2023 11:25:14 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3a0642e4695so1316362b6e.2 for ; Fri, 30 Jun 2023 11:25:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1688149514; x=1690741514; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kyMHPqgFkqrCLjrfJwzZAICfyuA66R9v5BF7rbPVGX0=; b=SyByWdPjKThkQ6YM6aYAkTOSoqsI4TPrQQZG2te9zp6qMEaSWKgE8u6CN8kFGQqjsr QFbTYn7s23dZdUayOaom4Sub5UQ4VfgDin3H12OOLPtlVUSHaYlULwhd5HgcOZ7Jlf+y RwQ/MxRM9sRJeMCCwQIBRTWUlXDhw0g3HMcRg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688149514; x=1690741514; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kyMHPqgFkqrCLjrfJwzZAICfyuA66R9v5BF7rbPVGX0=; b=aeh1seYAhxOPiYF5QjvM7hQWDK/zoKsVS7L+0X2BC8q9cbGjOK4Z0UlXzaQJ6aucDI IxW/xvHRFZf9bX9LkAveriUQLt07Ke9EoA8kT6UB0Rff7VyM0x41WBb3L9iXg4+LeKAM YFT3OM2W1vQ09P2zZKujZcw0Imb1FLAXoNwDkiCZxjR8WmYvpBOBw02rpNN077nxtbnn C8qB7G6Dc7Wp4eJ1iaqIlYNB3pfhEg8yDcHBqY3Xiy86Xp6kzePkyk1YSfFaPPqIZ/MK 2ul/JhSTp8BucDEBcWuRKzTRk9avuTANk+gfVwq/N7WEWDx0ocj6MdYomMPM4VZh3iH7 Oz+Q== X-Gm-Message-State: AC+VfDwUICQhwZ00c2xCDA8ujydYvGs6bOopiV9Qs+RPmM9PAuDZntr9 abHIu0X27godFHefNDVMR9aImw== X-Received: by 2002:a05:6808:1b23:b0:3a3:6113:ce79 with SMTP id bx35-20020a0568081b2300b003a36113ce79mr3297214oib.40.1688149513722; Fri, 30 Jun 2023 11:25:13 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id fe21-20020a056a002f1500b0066ebaeb149dsm9530556pfb.88.2023.06.30.11.25.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 11:25:13 -0700 (PDT) Date: Fri, 30 Jun 2023 11:25:12 -0700 From: Kees Cook To: Sami Tolvanen Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Nathan Chancellor , Nick Desaulniers , linux-riscv@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/6] riscv: Add types to indirectly called assembly functions Message-ID: <202306301125.B58257BE4B@keescook> References: <20230629234244.1752366-8-samitolvanen@google.com> <20230629234244.1752366-10-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230629234244.1752366-10-samitolvanen@google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 29, 2023 at 11:42:47PM +0000, 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 the SYM_TYPED_START macro to add types to the > relevant functions. > > Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook -- Kees Cook