Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp547109pxb; Fri, 16 Apr 2021 11:51:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAJvoeRramKJk42jMRRHwHydl5rpfbYt9q2kQdmk6dzEd17p9SPmWXeBqDmMho7zERbI// X-Received: by 2002:aa7:ccd0:: with SMTP id y16mr11662714edt.101.1618599078117; Fri, 16 Apr 2021 11:51:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618599078; cv=none; d=google.com; s=arc-20160816; b=PoAn9W5B4kTd2Ls1c7GBfe19kz2oBLm8VwNicy60Em/w9AUA/ZldG0uSAvsZzv5M0u 07v5OI64wJRYmky6mCotuTgO8sAToydjTWnUgSxGJVY/i+cE16myq8rYcL4QY8Ivuvy+ HW3HhHRaxi8yNtwlN8NG1EVE+6BiAgKeyKLw4PgfLqigG6Q5BO+B+ZuHICDiOiQ7sdva eLPDI2FvfXl28pZ9Bn11BoGu3YgzaueuGE1ymc2oJ1U0gXOtOpmhnd1Y4rzSh+3tRgvB UDP6mNjhVwGqxyROjYGq3v8kQSmh1tQ4Vdido2n0H6k76qpWSBmz192zxqvpcgQfGQsf 8B+Q== 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=AcDAVQ+0h+jENPZeM69/kZwGZfdDXc/0125nsKSlnZg=; b=qMWhuo9tE/biVPTv3gEATpJWqu3EAv14JTPRpaK/TOWWOboHjkeaGGMQnN1XP6m9a0 90ljruh3BokWIq0/Bh66Jy8jkZl/GASajwTv7rH7q8dMGgDGe62TI9f8dGMpY0uQim9W DYURYydcnxWVSxVsUbgf3HCFM4yWalfUKGZT/itZXpyEWlX11zvrL90WVp1Lk9seGorm 67qw/mnncFuMu0zOXHk5qRWuFsYOZqKnVmNjD7x7aPIcFbYr1Sw1+axStH7YPyybEY5v 43BTAHD3Pp3/HMFs0s5n7aCgT9D+HvD/a27pbFCnSWWdfRBPCxFvu/yLMDGpw4B1fI2o NSUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=dnz1bYqV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp27si1509787ejc.24.2021.04.16.11.50.54; Fri, 16 Apr 2021 11:51:18 -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=@linux-foundation.org header.s=google header.b=dnz1bYqV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236467AbhDPRGE (ORCPT + 99 others); Fri, 16 Apr 2021 13:06:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235659AbhDPRGD (ORCPT ); Fri, 16 Apr 2021 13:06:03 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D791C06175F for ; Fri, 16 Apr 2021 10:05:38 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id z8so31815382ljm.12 for ; Fri, 16 Apr 2021 10:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AcDAVQ+0h+jENPZeM69/kZwGZfdDXc/0125nsKSlnZg=; b=dnz1bYqVAlRM6259A+dx+Rc2q9Qis0LBOOOmkDKaY6WJu06OAB3WTXaPaSSbSH2kHN CUxAYJW2MSUb6KLd9VHkZqoeTvqRIILdDBdw4/TbIMff3ssQa3bNYa96Mu2MipKekQxe RdIn9i/ob2oUe8MI005glSrjfmJXy7RQVtkC4= 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=AcDAVQ+0h+jENPZeM69/kZwGZfdDXc/0125nsKSlnZg=; b=rBjzveqS+vEp0UQ4M0LfE7QpW7OoyIhA1jEltkEW3OfWviUjNc/MYRIGtsZ/po9SQw 1yV9/wnLK1ajW056TNUKda5mFuxjBff/dHkjJyPjISeaQmrQdGLQWh/WcHmrnp+Wds6L jJZa9/I+Ui/WgKlMms56bokWvt5Xebek2Q5BL966+5v3Z0/swEcvUk6XD5wVoZh+nldy tI3InPXapFY2Rs0qwzhpYVHldLFuF06QVY/ZE8e4iKbGRPTr6lVnx/6mYE4GJ12AU8Ax dlrXTQgjOoBuOqJZunAHcwWGiodhwBXI/40tWzcY1tSgzH9/qBx50FShaA5yTte+NQT2 FWOg== X-Gm-Message-State: AOAM533v5bESJktA8nv1hTPFgEbPOqkfJrr7lWjTTbjV/sH2fwiQOCO2 MpxgzYC51z7nTqu6i69mXiv7fuguuxaGzbpN X-Received: by 2002:a2e:7505:: with SMTP id q5mr3245557ljc.322.1618592736640; Fri, 16 Apr 2021 10:05:36 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id t198sm1043597lff.121.2021.04.16.10.05.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Apr 2021 10:05:35 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id r128so18831705lff.4 for ; Fri, 16 Apr 2021 10:05:34 -0700 (PDT) X-Received: by 2002:a05:6512:1286:: with SMTP id u6mr3571784lfs.377.1618592734654; Fri, 16 Apr 2021 10:05:34 -0700 (PDT) MIME-Version: 1.0 References: <20210414184604.23473-1-ojeda@kernel.org> <20210414184604.23473-5-ojeda@kernel.org> In-Reply-To: From: Linus Torvalds Date: Fri, 16 Apr 2021 10:05:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 04/13] Kbuild: Rust support To: Peter Zijlstra Cc: ojeda@kernel.org, Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, 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 Fri, Apr 16, 2021 at 6:38 AM Peter Zijlstra wrote: > > AFAICT rust has try/throw/catch exception handling (like > C++/Java/others) which is typically implemented with stack unwinding of > its own. I was assuming that the kernel side would never do that. There's some kind of "catch_unwind()" thing that catches a Rust "panic!" thing, but I think it's basically useless for the kernel. Typical Rust error handling should match the regular kernel IS_ERR/ERR_PTR/PTR_ERR model fairly well, although the syntax is fairly different (and it's not limited to pointers). Linus