Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3393693rwp; Sat, 15 Jul 2023 01:32:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlHEMA9JaCNoi0esTTrYPyFEXtN1tM67K4YxthPlK70sYAywJ2gRaer4t1DP1Xhn6zdonkzU X-Received: by 2002:a05:6402:35d3:b0:51e:5390:9166 with SMTP id z19-20020a05640235d300b0051e53909166mr1281973edc.2.1689409941724; Sat, 15 Jul 2023 01:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689409941; cv=none; d=google.com; s=arc-20160816; b=LCHyOObZk1nDWsPIGdpB3jDpTTk0rso1ctM6hh4GpU3jO9b1++fjm7Q2RZFCMX/i1w aJIR4yRvbilvFsShGOcR8eA6ZiAeVflwJbp/p5UBZSloi4Wn4m9d0aOBjEmNWP59IGAz H2aBwbq34+D3Lzb8V32eawRzLT34iyVo3KyqYSr/1txqECsS/72ZtgMh4lkxwtODXyBo ONZjwBUKUQyUwPnr4DxD42x381LlDWH8Rxg0EUQ3Fs9it7oCpMb+OY5huznH9qC7kB34 NwohCzRqITmoUsx5/rv+U3SazQYK30SMuKqaMFTjJpxW3KUCutDicsUYjTWxbOtlx7OI MBxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:feedback-id:dkim-signature:dkim-signature; bh=Xoj9Xm8/Xd98EhXuvKJw7gbcAWTuMt5qlTzhZaCUcZA=; fh=0HU98pmedQrK3V/phKG1uSHPLcsLGm1ymNWg6W2RPkA=; b=HKnzIB/b5zSD3h5FX3Ofs3YNaDa9lxFdlVV+YUzH7GQrkR5hBa3xEgaYxvRc77oEwR C6WG5uiBVWqtUDprHzcloLzgMU+haBe0SpsMal7ol3wSZmiulrW/Yv1Nkuz7s+/tns0a Epd8QmDCYHgFfwhx+WBxPiaa9FEJlOEgq5QaMh/DQJ7b0SKVC4e/DCLJ0/+VK9GW3WwA 1U3AtnVLi+4qHR8EPyPskNQjc2swVtxERfywIP5epFnpUwcbSsP4/RNTvwZxZvxBgC4a +Uu+GWacSL6LCQ2GNAYF31qEofgSfhMPMVs/GVQaAxi/j8v7BFlPHiIGBmfPEpzwsN2g UWLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ryhl.io header.s=fm3 header.b=czFIb1Ix; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="gmeQg4/7"; 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=ryhl.io Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q26-20020aa7d45a000000b0051e029c13efsi10277858edr.365.2023.07.15.01.31.57; Sat, 15 Jul 2023 01:32:21 -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=@ryhl.io header.s=fm3 header.b=czFIb1Ix; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="gmeQg4/7"; 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=ryhl.io Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229767AbjGOIOR (ORCPT + 99 others); Sat, 15 Jul 2023 04:14:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjGOIOQ (ORCPT ); Sat, 15 Jul 2023 04:14:16 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2371835AE; Sat, 15 Jul 2023 01:14:14 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id F41985C0100; Sat, 15 Jul 2023 04:14:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 15 Jul 2023 04:14:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ryhl.io; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1689408849; x=1689495249; bh=Xoj9Xm8/Xd98EhXuvKJw7gbcAWTuMt5qlTz hZaCUcZA=; b=czFIb1Ix5sBw+Rqrc0P3Peeqt0KeEURhXqDTthtOOBeUl9DvOuy bEWb4uA2Bh6Pm37J7v7HCYowYHWxa0c1Y7OGzJGRh0IBk1NlTfGijlbNnp/noqmY 8dCtQJrn17wgj1qK0cLdwwW4b51NGP7SsxODD8o4dzlkXcdsz2H1E1/8WyXBVVq4 cRxd74RBWVkRQaIzefTOZcxf50OFDfLs/F7JyGyLB4wSe/ci0daNyJjdz7LHS+sj /yblcF8x6vlAHH18XiyjY6RsMIzj8BYKdMImX/4BkoknrSTXIpHIkpfWGL/4Vec0 GFZlB/BpiJnieWC2YCw/5t9LkC42Pdpo5Qw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1689408849; x=1689495249; bh=Xoj9Xm8/Xd98EhXuvKJw7gbcAWTuMt5qlTz hZaCUcZA=; b=gmeQg4/7x7VYZZrbBBgR60o0iPUsDUGHvlK3EnRnOp5kd5k6Evn vyMM/w4/4/p4FkwBheuRofnr1p9aoRPizjlQMUjH7LxxmDxhk6QpDtZ4RQNXTJzT nncO6Qor3DtZ2HOnKUljXNOroJoLDDA3qZfkUCyexBW+JEaf946uWn04I+iahg2f EtJGYw+AA+N3GIXBcapXfGFiIf84ajxGq441FJ/3XShLT08lUnRg5asIanG6jE1X o2+nwvlo0H6uxaryfSxdxzzWC0gwA+ZTBxwi5n489QZ6zGvv6THIXzBgQblB14zc qzlvRQRfXGrWwFJI3hmomiBHkYqjjqgcvmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrfeekgddtvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheptehlihgt vgcutfihhhhluceorghlihgtvgesrhihhhhlrdhioheqnecuggftrfgrthhtvghrnhephe duuddvteekvdektdduledugfffhfdugeejgeeuvdevtdetveejheehiefffeegnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihgtvgesrh ihhhhlrdhioh X-ME-Proxy: Feedback-ID: i56684263:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 15 Jul 2023 04:14:06 -0400 (EDT) Message-ID: <37795dc7-a121-b30b-76de-1ba6dd705c5e@ryhl.io> Date: Sat, 15 Jul 2023 10:14:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2] rust: time: New module for timekeeping functions Content-Language: en-US, da To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, asahi@lists.linux.dev, Asahi Lina , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=c3=b6rn_Roy_Baron?= , John Stultz , Stephen Boyd , Josh Stone , Gaelan Steele , Heghedus Razvan References: <20230714-rust-time-v2-1-f5aed84218c4@asahilina.net> <87r0pax9a6.ffs@tglx> From: Alice Ryhl In-Reply-To: <87r0pax9a6.ffs@tglx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 7/15/23 03:17, Thomas Gleixner wrote: > On Fri, Jul 14 2023 at 16:55, Asahi Lina wrote: >> +ktime_t rust_helper_ktime_get_real(void) { >> + return ktime_get_real(); >> +} >> +EXPORT_SYMBOL_GPL(rust_helper_ktime_get_real); > > Colour me confused. But why does this need another export? > > This just creates yet another layer of duct tape. If it's unsafe from > the rust perspective then wrapping it into rust_"unsafe_function" does not > make it any better. > > Why on earth can't you use the actual C interfaces diretly which are > already exported? Currently, you can't call inline C functions directly from Rust. So we wrap them in non-inline functions for now. It's something we definitely want to fix, but it hasn't been fixed yet. Alice