From: Demi Marie Obenour <demiobenour@gmail.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
Julian Braha <julianbraha@gmail.com>
Cc: nathan@kernel.org, nsc@kernel.org, jani.nikula@linux.intel.com,
akpm@linux-foundation.org, gary@garyguo.net, ljs@kernel.org,
arnd@arndb.de, gregkh@linuxfoundation.org, masahiroy@kernel.org,
ojeda@kernel.org, corbet@lwn.net, qingfang.deng@linux.dev,
yann.prono@telecomnancy.net, ej@inai.de,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [RFC PATCH v3 1/3] scripts: add kconfirm
Date: Sun, 17 May 2026 03:32:14 -0400 [thread overview]
Message-ID: <615113d6-7e90-4d54-ad1f-a6833474e8c9@gmail.com> (raw)
In-Reply-To: <CANiq72kr=tzvEitYj6xyT=jGnKQZK1dmekSU3us7MWGTrv0FNA@mail.gmail.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 3067 bytes --]
On 5/17/26 02:28, Miguel Ojeda wrote:
> On Sat, May 16, 2026 at 11:54 PM Julian Braha <julianbraha@gmail.com> wrote:
>>
>> +CARGO = cargo
>
> Question to Kbuild: would it hurt to hardcore `--offline` here?
>
> If someone within Make actually ever needs Cargo to fetch something,
> then they should be very explicit about it (in which case we could
> have another variable etc.).
>
>> - rust/libpin_init_internal.so rust/libpin_init_internal.dylib
>> + rust/libpin_init_internal.so rust/libpin_init_internal.dylib \
>
> Spurious change?
>
>> +$(TARGET):
>> + $(CARGO) run --release --offline -p kconfirm-linux -- --linux-path $(srctree) --enable-arch $(SRCARCH) $(KCONFIRM_ARGS)
>
> This probably does not work in `O=` builds or in cases where the
> `srctree` is read-only (please see my other reply on the docs patch).
>
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +use crate::AnalysisArgs;
>
> This appears to use a quite different, custom Rust style. If this is
> going to be developed in-tree, then we should do our best to follow
> the guidelines:
>
> https://docs.kernel.org/rust/coding-guidelines.html
>
> For instance, a few key points are not followed here:
>
> - Public items are not documented. When they are, they seem to use
> comments instead of actual docs. Markdown is not used either.
>
> - No examples, doctests or tests.
>
> - No `// SAFETY` comments for unsafe code.
>
>> +unsafe extern "C" {
>> + fn curl_global_init(flags: c_long) -> CURLcode;
>> +
>> + fn curl_easy_init() -> *mut CURL;
>> +
>> + fn curl_easy_cleanup(handle: *mut CURL);
>> +
>> + fn curl_easy_perform(handle: *mut CURL) -> CURLcode;
>> +
>> + fn curl_easy_strerror(code: CURLcode) -> *const c_char;
>> +
>> + fn curl_easy_setopt(handle: *mut CURL, option: CURLoption, ...) -> CURLcode;
>> +
>> + fn curl_easy_getinfo(handle: *mut CURL, info: CURLINFO, ...) -> CURLcode;
>> +}
>
> I like minimizing dependencies, but since we require vendored
> dependencies anyway, then it may be simpler to use a common
> ("standard") Rust dependency for these things. Then we can all agree
> on a particular one and use that when the same need arises.
Using a ton of vendored dependencies would make for unreviewable
patches. It's also the kind of thing that gives distro packagers
headaches.
> In fact, it seems like FFI here and in the other file is the only
> source of `unsafe` code, no? We could perhaps even `forbid` it
> otherwise.
I don't want to pull in a huge library like clap. A simple getopt_long
implementation could also be an option.
> If we truly want to minimize dependencies even if we have vendored
> ones, then we could call into the `curl` CLI instead, just like we
> e.g. call into `bindgen` instead of using its library.
I'm the one who suggested using FFI here and for command-line parsing.
The command-line interface would also work.
--
Sincerely,
Demi Marie Obenour (she/her/hers)
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-05-17 7:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-16 21:53 [RFC v3 0/3] " Julian Braha
2026-05-16 21:53 ` [RFC PATCH v3 1/3] scripts: " Julian Braha
2026-05-17 6:10 ` Demi Marie Obenour
2026-05-17 9:58 ` Miguel Ojeda
2026-05-17 20:25 ` Demi Marie Obenour
2026-05-17 22:53 ` Miguel Ojeda
2026-05-18 8:08 ` Arnd Bergmann
2026-05-18 18:19 ` Julian Braha
2026-05-28 14:30 ` Gary Guo
2026-05-17 6:28 ` Miguel Ojeda
2026-05-17 7:32 ` Demi Marie Obenour [this message]
2026-05-17 9:30 ` Miguel Ojeda
2026-05-17 9:32 ` Demi Marie Obenour
2026-05-17 9:48 ` Miguel Ojeda
2026-05-17 9:28 ` Nathan Chancellor
2026-05-16 21:53 ` [RFC PATCH v3 2/3] Documentation: " Julian Braha
2026-05-17 6:05 ` Miguel Ojeda
2026-05-17 9:40 ` Nathan Chancellor
2026-05-17 12:35 ` Miguel Ojeda
2026-05-16 21:53 ` [RFC PATCH v3 3/3] MAINTAINERS: create entry for kconfirm Julian Braha
2026-05-16 22:36 ` [RFC v3 0/3] add kconfirm Julian Braha
2026-05-17 6:14 ` Demi Marie Obenour
2026-05-17 23:21 ` Julian Braha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=615113d6-7e90-4d54-ad1f-a6833474e8c9@gmail.com \
--to=demiobenour@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=ej@inai.de \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=jani.nikula@linux.intel.com \
--cc=julianbraha@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=masahiroy@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=ojeda@kernel.org \
--cc=qingfang.deng@linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=yann.prono@telecomnancy.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®