Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp5214195rwb; Wed, 17 Aug 2022 13:13:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR6MjaXbn15GLJhJ6U1wEc1VhnGVJaoOPVOOpKjTWIdWmX1w+2NESxAjdMW1rEbCyHPbw9Vt X-Received: by 2002:a17:907:6da1:b0:731:6a7a:83c0 with SMTP id sb33-20020a1709076da100b007316a7a83c0mr17885411ejc.473.1660767229879; Wed, 17 Aug 2022 13:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660767229; cv=none; d=google.com; s=arc-20160816; b=zKLtndkl9fUuVsfiTWFBxsw7XvDlqPIb1bq08D2sGj0/LEq92Ku1w2+oRSUQpym6uX 3173i+qiHuAnXVcX/h1EU6eANRFss7S3V7XvD79x9XwHW19na5eBHrTpNZof2QM26+IH pBKUhMf/ILbuJTS721ZMpfjicQjhhR2qdGJCra8K9GqUsricZq6Yvf9NNerMVdrlBLOz QN8JoqvRkCUSwN0U6Y/KuciDTVZh+MsMkU6GA/zo8VZbSlABa+d3QNxjrjys99ZjLoaz MbRBWw7E009HxNbhuO07nCndzYjFVgc6jeR7SgX5mhRBv+qFyZ1fyIzWB2cbjNec2RH3 RKng== 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=HfC3dMpEngb7r9gnYszZZUkGHTRJbCSwAF6hsjZawl8=; b=IkqaaAR6d7fNoXWstcxc54DND02E+Ix7InsF50eRpFARAQBMai6vgnr5P+VNU1HJG9 ve/J/CuHFzjGZkhYq1cVJH6BuEFVZA/2Bk3gatGAMc8cS03DU/kMT53GFUCMyUnKSILe v8evrV3tM8Jk1OuijUAQOtDWyO7oJlwCe66FIkezux7p/96oQlAnsZ+U/h5PAKFn81/U JPkDBv4ofL9zEQvXDNKeOBwOe+sG9hnrxJn8A0l+p0FB4tC2pdHxBAhbMKqThWt/WF+s RI4qBcmxKm0rxPu33pZHoGU/Er8UZMWFt+7xQ31YJJhM9z04sOHc7biap+MPhMczdPQ8 WuBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VgN2NI+E; 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 uz3-20020a170907118300b00734be0ce0dfsi11266888ejb.575.2022.08.17.13.13.23; Wed, 17 Aug 2022 13:13:49 -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=VgN2NI+E; 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 S238289AbiHQUMD (ORCPT + 99 others); Wed, 17 Aug 2022 16:12:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237343AbiHQUMC (ORCPT ); Wed, 17 Aug 2022 16:12:02 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39C2E66A4B for ; Wed, 17 Aug 2022 13:12:01 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id r15-20020a17090a1bcf00b001fabf42a11cso1670937pjr.3 for ; Wed, 17 Aug 2022 13:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=HfC3dMpEngb7r9gnYszZZUkGHTRJbCSwAF6hsjZawl8=; b=VgN2NI+Ezj1YnwZA75qkUzO3odm7nQ/YsFK2soo32JnPYdtR6gEuOdUGqLBg8c5ktf fCo70wM3ALHe+y+fUNIROShP5H6+3xzGZPkl98pJmQZYK+HzHeTl7B8BF44BfwOOv+ir h+sT7VUYnSBUCMIx81qQvnB+TETrbRV0froDc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=HfC3dMpEngb7r9gnYszZZUkGHTRJbCSwAF6hsjZawl8=; b=t145910lC8qwfM4XaFg7rkdwvfJCt8xUtuHlhxisb46j2nCD8/7gaAMWTi/BjbH+DW psYqOP45+dQXE95upwHMP/A93+RVfiCyri8RUJ8Jpzee4j55jfMd/GBoaWjHyk/WzF0+ 87aiRJqcZTGxe7l1C8kggL7s11cIaJuAhxHRNn0z8kQP4vOM7vwcOKzmckchzNt2TczM CTEH41PpqdSXsTRKEWLzTN5rxTUBNP84nRTGThWmjh4O45a/lIxvpWaky/hz5abOJe8h xQJNJa/NszGCldym+UgkKrMNPXM0eBVJPf2jQmcRDTq2fNera0QCWpcGLfFPi8M9qTea 51dg== X-Gm-Message-State: ACgBeo2YmoYDObZNN8nwggCmZtEnh7txlBGNOqDOncWiRMXEuHdCILR4 9vKE9/H0fk48NBHjw96n2+W1ow== X-Received: by 2002:a17:903:1246:b0:171:5033:85c with SMTP id u6-20020a170903124600b001715033085cmr27932780plh.146.1660767120719; Wed, 17 Aug 2022 13:12:00 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j15-20020a170903024f00b0015e8d4eb1d7sm346970plh.33.2022.08.17.13.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 13:11:59 -0700 (PDT) Date: Wed, 17 Aug 2022 13:11:58 -0700 From: Kees Cook To: Miguel Ojeda Cc: Linus Torvalds , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, patches@lists.linux.dev, Jarkko Sakkinen , Alex Gaynor , Wedson Almeida Filho , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Boqun Feng , Gary Guo Subject: Re: [PATCH v9 13/27] rust: export generated symbols Message-ID: <202208171311.73A2CAAA6@keescook> References: <20220805154231.31257-1-ojeda@kernel.org> <20220805154231.31257-14-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220805154231.31257-14-ojeda@kernel.org> 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=unavailable 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 Fri, Aug 05, 2022 at 05:41:58PM +0200, Miguel Ojeda wrote: > All symbols are reexported reusing the `EXPORT_SYMBOL_GPL` macro > from C. The lists of symbols are generated on the fly. > > There are three main sets of symbols to distinguish: > > - The ones from the `core` and `alloc` crates (from the Rust > standard library). The code is licensed as Apache/MIT. > > - The ones from our abstractions in the `kernel` crate. > > - The helpers (already exported since they are not generated). > > We export everything as GPL. This ensures we do not mistakenly > expose GPL kernel symbols/features as non-GPL, even indirectly. > > Co-developed-by: Alex Gaynor > Signed-off-by: Alex Gaynor Reviewed-by: Kees Cook -- Kees Cook