Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1170209pxb; Sat, 17 Apr 2021 08:41:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj2tZKjnih5+PnFp0Ni+sIyRd6mZOJvgSNIeaaqROhAyhEnbRkzbXQhCo0ysc12RlC+YWd X-Received: by 2002:a17:906:dfd6:: with SMTP id jt22mr13451949ejc.161.1618674063826; Sat, 17 Apr 2021 08:41:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618674063; cv=none; d=google.com; s=arc-20160816; b=gixsHQpHGYlCxiGdplUXQVxi66EtJLFyjxKMGsxkCcfM5s5d50L4dp5kz3Qmlkn5VW zmsS0QuuR/1KNNvgUzhfqKIzIO3Yh84w9Yf9BPkXcEk7LNF8x/RBPQMOKuK3e7dgya1r OHXC13MlQ0+tlTLChJgxFY26mgSyNXrSXCC4aB6PDrnSKXImYCUs87Lv9LH/ovw39K38 OK9rDuffTVwiriWPpqI0N7cEyUwgLeC/Ib7VawOFy8WeQDtXl7PjOMZWbq7WKTVFbak1 xt/27Q8wokyyYXtqJn5A1cmlLAY80/O813s0vl/N5hNirwTMA4+riiFixUi2cp7sV146 mkVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=REupEnRN7L+AIB6fZVn/PM0AvwXs9epbdeATajunDF8=; b=TnseJHPgwavDtHWH9kOh1d8Nui/hedCADaUclvzcq7YH7at5OidpJByJo3H16y4Dc4 vq+sBHa5faLjBn88zhnViDQtHDX3TxN6tqR3nD5sZrI0gKfJi0qH2GABsgZX7b3dIC5P ur6v1J50CboOMqYTa+O5O/0hkrIeGriGbKwXAIyrEJT0ETe/htdQOCapffupRUI1Ugl4 I0Ic2ffbyibev77zT6BdpBWb2LZLajkSY1B1YPJV+1RvDlpxU/twYxyG543svi/R/eyU q+igg5xHpgYbpOHK2zDazCcIFTj0gV/AIae+R9MTfe/hXc0xnhH0USFpNz+eUkM3xXnd QmOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N7hAtqIi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h28si7843676edj.546.2021.04.17.08.40.40; Sat, 17 Apr 2021 08:41:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N7hAtqIi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236698AbhDQPjg (ORCPT + 99 others); Sat, 17 Apr 2021 11:39:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236481AbhDQPje (ORCPT ); Sat, 17 Apr 2021 11:39:34 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36367C061574; Sat, 17 Apr 2021 08:39:08 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id o10so33526514ybb.10; Sat, 17 Apr 2021 08:39:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=REupEnRN7L+AIB6fZVn/PM0AvwXs9epbdeATajunDF8=; b=N7hAtqIixPrITocgEQklFpqfXSxObVUSuWpjcfnYlWzb4KMba/NJ8qvYxobCiP7UTq xk9XHfVcvEazTk9v8Xinig1AeZobTU/z78bw00pQUVIIySL6bOAyLskC56DtiqXABjM7 ruUMIg20cUr67vUWuKZUZBQ8zWZeIESk89FgllbIeFNaflaVVD5eWrk6YypfLt6ogBwc Zc43Vj7vPewU5C9q7phOT0wj32oVYauAISJNJblbz6msPplFs2WNz6UdBCUhq8DkOYiG /R77D7XAo1aYGfkhudGy1evL2bfw0fTCPCThRnv87c4ldPuzIiByKTssBKqQAII8ouQT JkOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=REupEnRN7L+AIB6fZVn/PM0AvwXs9epbdeATajunDF8=; b=GHJ+3SYWddeIR4RBMwyHfGWgeacrrHvniRTT7UfKH2RjvQxVXLcRvdzsvJrIi8gBce yatvyl9iOGiDezmexAN3MvUV9DyBsufwNu886xwLS7FkUy9MlXFbx44JAkznQJOy8xzv MjOJx7eb45/BI+XZfmpUcNVyYNra1FSBiC/A1GZja2xB7sq0zIlt+d/0rMZfhkXUB5GP mrpz0GxIQ+bfDIx8xwfsGBdJHQFyXk8InQGf3s6zQTS5axN9H2gxpZ5mh8wdoFZB+6JZ xPXqqrJhpLEJWQyQpJU+dMoaSdvVH6yZvHlJehUoD1Gv8MQLg4tuqnE3LxU8OsbM9gck 0jlw== X-Gm-Message-State: AOAM531RUJpwmE7+7xMONQplvs8HH7O6tV+a1T2lrIMWdiGFLH0EXQub oD7Z0CXc+4ocA2lVU3OKuxPSYVRlQz9bbk99jN8= X-Received: by 2002:a25:cfc2:: with SMTP id f185mr6511822ybg.26.1618673947623; Sat, 17 Apr 2021 08:39:07 -0700 (PDT) MIME-Version: 1.0 References: <20210416220416.GA11872@1wt.eu> <20210417042405.GA13432@1wt.eu> In-Reply-To: <20210417042405.GA13432@1wt.eu> From: Miguel Ojeda Date: Sat, 17 Apr 2021 17:38:56 +0200 Message-ID: Subject: Re: [PATCH 04/13] Kbuild: Rust support To: Willy Tarreau Cc: Connor Kuehl , Al Viro , Linus Torvalds , Peter Zijlstra , Miguel Ojeda , Greg Kroah-Hartman , rust-for-linux , Linux Kbuild mailing list , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Alex Gaynor , Geoffrey Thomas , Finn Behrens , Adam Bratschi-Kaye , Wedson Almeida Filho , Michael Ellerman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 17, 2021 at 6:24 AM Willy Tarreau wrote: > > My concern was to know what field to look at to reliably detect an error > from the C side after a sequence doing C -> Rust -> C when the inner C > code uses NULL to mark an error and the upper C code uses NULL as a valid > value and needs to look at an error code instead to rebuild a result. But I see, thanks for clarifying. I don't think we want to change anything on either of the C sides (at least for the foreseeable future). So the Rust code in-between must respect whatever conventions both C sides already use, even if they happen to be different on each side. Thus the C side will not know there was a `Result` inside the Rust side and so it does not need to worry about which field to look at. Cheers, Miguel