Re: [PATCH v9 07/27] rust: import upstream `alloc` crate

From: Kees Cook
Date: Wed Aug 17 2022 - 16:07:44 EST


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 <keescook@xxxxxxxxxxxx>

--
Kees Cook