Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp5219901rwb; Wed, 17 Aug 2022 13:21:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR7wakuUO4XSoWRLn4OkI7dthIB3Q1WqcDmXMLMgVbwRNWveTUMA/D7R5j2sDxOO+553d+Bp X-Received: by 2002:a17:906:7304:b0:6ff:a76:5b09 with SMTP id di4-20020a170906730400b006ff0a765b09mr17029428ejc.193.1660767678425; Wed, 17 Aug 2022 13:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660767678; cv=none; d=google.com; s=arc-20160816; b=yRNsmj4iYTNHimFNpX57bZziRrqETsb/KVIcpB3vCCErRHhgnRurCfaOqIFvzbgh42 3EgI8OWBWXDak3Guho34Lbn9y3nbbaXZiEcBZq32FAWug2192yLmPyw/Nto6QMf2s5iy ql+hI1VYROrrJwPURTws9c+Ro6CT9WZPV53MzncjXX2XvRbikd6r9ygOKumaeMecrqjO G2M8g6OXW7xlYp9YlWDKYAiBX0KZqrwGzcK57PvjmIZpubZ12vvMIycvQuJ95hkSMCm1 n4S5kJnS70Md1CFwkq6+cIBz94tSVJkYF8wwPBl2r1ZGIWInMHWvrYqgb6rxtuNgnh7q tfkA== 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=L1J+Db0VnmbiI3Iaaum15jtXnTuosKmaYb/Lkdrr5jE=; b=wQnl9+3gimpspLzM+BTbrc5TraAfLyHqPiho1fPz2eC4VRsqPaIp+WAXLQDhN6JBYn q6Qb6l+m+DDW6ur5mrh76kNt5TPiu2sF2m2JzYpoo+zAFLZv6lYwqTQyx+dRuvcLqJjC UYNw8uybEV+bm5KY6uk6nyZmJrEuv/nXmk3WfsNUzUhh4G4Yjyd4PL09+gkUgFFLg4SS PQr6yXmq15OmLvg/wrk/qNb7D2mYZuKMG280xl9NCUzscdELsBtI9lxUW1KhWZwiDdJG DJjXdGEpbB8ZQlfM7qKI7gZsnkH7WfoDvojpW0Y9aSFrQraMSyN4+5mzNHAwcoC43Uwf LACA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=U+gyR2Mo; 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 es8-20020a056402380800b00445dba83badsi973004edb.395.2022.08.17.13.20.17; Wed, 17 Aug 2022 13:21:18 -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=U+gyR2Mo; 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 S241745AbiHQUHm (ORCPT + 99 others); Wed, 17 Aug 2022 16:07:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241471AbiHQUH1 (ORCPT ); Wed, 17 Aug 2022 16:07:27 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 497FCA6C31 for ; Wed, 17 Aug 2022 13:07:22 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id l64so12885731pge.0 for ; Wed, 17 Aug 2022 13:07:22 -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=L1J+Db0VnmbiI3Iaaum15jtXnTuosKmaYb/Lkdrr5jE=; b=U+gyR2Mo78uIYzbWklKeKt4ZYdel9+/phgy56njeKiM+XlSgX/waUrlrw5+SfCLNVY xSEVXltiRRK6gqaK7QEC7WqHfljzsXVLHRQNE7H8NH0JwmVqwyV0Ejps/JAgMjbD423b y183iG/Lv20mPJotIXHLSPFvBKTfSLLi7FqM4= 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=L1J+Db0VnmbiI3Iaaum15jtXnTuosKmaYb/Lkdrr5jE=; b=NxJ9cWJMruO6vW8qpQHaw1ZrpxKO88P62yLKbeUxfj2phOhQIUGYMuXt9OUS538M7H lmGcJp5kBlJM1lMtFraeYxYBmNj6Kfs1i8KqLc/LC/Vswmk8f0agEa9eKJVf/aox/ZkV kkFFDJgu34sHHGJ7R4w55imTKpXVUfMhBLK9bWza5mR0UfIRkU2AmsmDQyDo1YqInfWb PosPl+Sj4IPpC33fPPlqWA7FHUmKmWROCRbEmTEo1ehpUslfkWwAl1HZeZy1iGnJUnOi ICnf4k1VO19G9hR681P3UI5ZXQULdte6GxZj25SUnIwZIp9ujW4ZmU0mpKgTveBNY/hV GHLQ== X-Gm-Message-State: ACgBeo36pSfuFrTbw9mX83F2NWo71zFO9mlLiadgwdjSPfPiwlgeaMCT mxXI0mbqYEBVH0cgIoeOQqBh3A== X-Received: by 2002:a05:6a00:b8c:b0:52e:d6b4:d5a2 with SMTP id g12-20020a056a000b8c00b0052ed6b4d5a2mr26589037pfj.72.1660766841593; Wed, 17 Aug 2022 13:07:21 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id w1-20020a170902904100b0016be6a554b5sm302013plz.233.2022.08.17.13.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 13:07:20 -0700 (PDT) Date: Wed, 17 Aug 2022 13:07:19 -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 , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron Subject: Re: [PATCH v9 07/27] rust: import upstream `alloc` crate Message-ID: <202208171257.E256DAA@keescook> References: <20220805154231.31257-1-ojeda@kernel.org> <20220805154231.31257-8-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220805154231.31257-8-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:52PM +0200, Miguel Ojeda wrote: > This is a subset of the Rust standard library `alloc` crate, > version 1.62.0, licensed under "Apache-2.0 OR MIT", from: > > https://github.com/rust-lang/rust/tree/1.62.0/library/alloc/src > > The files are copied as-is, with no modifications whatsoever > (not even adding the SPDX identifiers). > > For copyright details, please see: > > https://github.com/rust-lang/rust/blob/1.62.0/COPYRIGHT > > The next patch modifies these files as needed for use within > the kernel. This patch split allows reviewers to double-check > the import and to clearly see the differences introduced. Can you include an easy script (in the commit log) for this kind of verification? For this, I have done: $ git am 0001-rust-import-upstream-alloc-crate.patch $ for i in $(diffstat -lp3 0001-rust-import-upstream-alloc-crate.patch); do wget --quiet -O check.rs \ https://github.com/rust-lang/rust/raw/1.62.0/library/alloc/src/$i diff -up rust/alloc/$i check.rs && echo $i: ok rm -f check.rs done Reviewed-by: Kees Cook -- Kees Cook