{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":207181317,"defaultBranch":"rust-next","name":"linux","ownerLogin":"Rust-for-Linux","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2019-09-08T22:26:32.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/54721195?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1715545006.0","currentOid":""},"activityList":{"items":[{"before":"eb6e9e8f065b0c5d426065688dd83cde36edfd7e","after":"59bb93a093f6ba25c1a484b69acb7060e890063b","ref":"refs/heads/staging/dev","pushedAt":"2024-05-20T01:24:48.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add firmware abstractions\n\nAdd an abstraction around the kernels firmware API to request firmware\nimages. The abstraction provides functions to access the firmware\nbuffer and / or copy it to a new buffer allocated with a given allocator\nbackend.\n\nThe firmware is released once the abstraction is dropped.\n\nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add firmware abstractions"}},{"before":"80ebc4f0ad9a6ed252fbcf80563984a65fca25c2","after":"22f7b179d5fe89fbca59a1f1e91086972939f7e6","ref":"refs/heads/staging/rust-device","pushedAt":"2024-05-20T01:23:49.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add devres abstraction\n\nAdd a Rust abstraction for the kernel's devres (device resource\nmanagement) implementation.\n\nThe Devres type acts as a container to manage the lifetime and\naccessibility of device bound resources. Therefore it registers a\ndevres callback and revokes access to the ressource on invokation.\n\nUsers of the Devres abstraction can simply free the corresponding\nresources in their Drop implementation, which is invoked when either the\nDevres instance goes out of scope or the devres callback leads to the\nresource being revoked, which implies a call to drop_in_place().\n\nCo-developed-by: Philipp Stanner \nSigned-off-by: Philipp Stanner \nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add devres abstraction"}},{"before":"1dc9b303c0905c5e3f0a6a7a0f52af8d913db1af","after":"eb6e9e8f065b0c5d426065688dd83cde36edfd7e","ref":"refs/heads/staging/dev","pushedAt":"2024-05-19T18:23:57.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add firmware abstractions\n\nAdd an abstraction around the kernels firmware API to request firmware\nimages. The abstraction provides functions to access the firmware\nbuffer and / or copy it to a new buffer allocated with a given allocator\nbackend.\n\nThe firmware is released once the abstraction is dropped.\n\nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add firmware abstractions"}},{"before":"79ba0717e1abffee278c8bae264d91f00e0ba3b2","after":"1dc9b303c0905c5e3f0a6a7a0f52af8d913db1af","ref":"refs/heads/staging/dev","pushedAt":"2024-05-19T15:10:21.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add firmware abstractions\n\nAdd an abstraction around the kernels firmware API to request firmware\nimages. The abstraction provides functions to access the firmware\nbuffer and / or copy it to a new buffer allocated with a given allocator\nbackend.\n\nThe firmware is released once the abstraction is dropped.\n\nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add firmware abstractions"}},{"before":"d724d981145c61ec57ba039aac91f2f3b73a7b04","after":"79ba0717e1abffee278c8bae264d91f00e0ba3b2","ref":"refs/heads/staging/dev","pushedAt":"2024-05-18T01:21:07.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add firmware abstractions\n\nAdd an abstraction around the kernels firmware API to request firmware\nimages. The abstraction provides functions to access the firmware\nbuffer and / or copy it to a new buffer allocated with a given allocator\nbackend.\n\nThe firmware is released once the abstraction is dropped.\n\nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add firmware abstractions"}},{"before":"a3444b9510cbc419caaf0fb380d5fe9424e88be9","after":"d724d981145c61ec57ba039aac91f2f3b73a7b04","ref":"refs/heads/staging/dev","pushedAt":"2024-05-17T22:23:20.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add firmware abstractions\n\nAdd an abstraction around the kernels firmware API to request firmware\nimages. The abstraction provides functions to access the firmware\nbuffer and / or copy it to a new buffer allocated with a given allocator\nbackend.\n\nThe firmware is released once the abstraction is dropped.\n\nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add firmware abstractions"}},{"before":"33e3e16426fc5eb3a54aa4275b6812b546ae0dbe","after":"a3444b9510cbc419caaf0fb380d5fe9424e88be9","ref":"refs/heads/staging/dev","pushedAt":"2024-05-17T22:16:47.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add firmware abstractions\n\nAdd an abstraction around the kernels firmware API to request firmware\nimages. The abstraction provides functions to access the firmware\nbuffer and / or copy it to a new buffer allocated with a given allocator\nbackend.\n\nThe firmware is released once the abstraction is dropped.\n\nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add firmware abstractions"}},{"before":"0631b9556bc7b0786e5dc58166e16a3f563a6d14","after":"80ebc4f0ad9a6ed252fbcf80563984a65fca25c2","ref":"refs/heads/staging/rust-device","pushedAt":"2024-05-17T22:15:26.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add devres abstraction\n\nAdd a Rust abstraction for the kernel's devres (device resource\nmanagement) implementation.\n\nThe Devres type acts as a container to manage the lifetime and\naccessibility of device bound resources. Therefore it registers a\ndevres callback and revokes access to the ressource on invokation.\n\nUsers of the Devres abstraction can simply free the corresponding\nresources in their Drop implementation, which is invoked when either the\nDevres instance goes out of scope or the devres callback leads to the\nresource being revoked, which implies a call to drop_in_place().\n\nCo-developed-by: Philipp Stanner \nSigned-off-by: Philipp Stanner \nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add devres abstraction"}},{"before":"45120beb55d0fd093fae935862daf8e266b7c43c","after":null,"ref":"refs/tags/rust-6.10","pushedAt":"2024-05-12T20:16:34.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"}},{"before":"dba37bff996c0f3cc32ef3da80eb2e77ab48baed","after":"33e3e16426fc5eb3a54aa4275b6812b546ae0dbe","ref":"refs/heads/staging/dev","pushedAt":"2024-05-08T16:46:20.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: pci: add BAR request and ioremap\n\nTo perform IO on PCI devices it is necessary to have memory mapped PCI\nBARs. Before mapping those, a region request should be performed so that\ncollisions with other drivers can be avoided.\n\nImplement 'Bar', a container for requested and ioremapped PCI BARs.\n\nImplement the Drop() trait such that the memory request and IO-mapping\nget freed if Bar goes out of scope.\n\nImplement Deref() so that the container is transparent.\n\nImplement iomap_region() to create such a Bar and have the result\nreturned through a Devres container, ensuring that the resources are\nlatest freed in the driver's remove() callback and access to the Bar is\nrevoke()d for outstanding users.\n\nCo-Developed-by: Danilo Krummrich \nSigned-off-by: Philipp Stanner ","shortMessageHtmlLink":"rust: pci: add BAR request and ioremap"}},{"before":"d2e60c9461dde6bc438112b10a8ee170f7214aea","after":"0631b9556bc7b0786e5dc58166e16a3f563a6d14","ref":"refs/heads/staging/rust-device","pushedAt":"2024-05-08T15:45:03.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add devres abstraction\n\nAdd a Rust abstraction for the kernel's devres (device resource\nmanagement) implementation.\n\nThe Devres type acts as a container to manage the lifetime and\naccessibility of device bound resources. Therefore it registers a\ndevres callback and revokes access to the ressource on invokation.\n\nUsers of the Devres abstraction can simply free the corresponding\nresources in their Drop implementation, which is invoked when either the\nDevres instance goes out of scope or the devres callback leads to the\nresource being revoked, which implies a call to drop_in_place().\n\nCo-developed-by: Philipp Stanner \nSigned-off-by: Philipp Stanner \nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add devres abstraction"}},{"before":"1161057f53f643b63060835d46461ef09e8abe2f","after":"97ab3e8eec0ce79d9e265e6c9e4c480492180409","ref":"refs/heads/rust-next","pushedAt":"2024-05-07T22:45:51.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"rust: alloc: fix dangling pointer in VecExt::reserve()\n\nCurrently, a Vec's ptr value, after calling Vec::new(), is\ninitialized to Unique::dangling(). Hence, in VecExt::reserve(), we're\npassing a dangling pointer (instead of NULL) to krealloc() whenever a new\nVec's backing storage is allocated through VecExt extension\nfunctions.\n\nThis only works as long as align_of::(), used by Unique::dangling() to\nderive the dangling pointer, resolves to a value between 0x0 and\nZERO_SIZE_PTR (0x10) and krealloc() hence treats it the same as a NULL\npointer however.\n\nThis isn't a case we should rely on, since there may be types whose\nalignment may exceed the range still covered by krealloc(), plus other\nkernel allocators are not as tolerant either.\n\nInstead, pass a real NULL pointer to krealloc_aligned() if Vec's\ncapacity is zero.\n\nFixes: 5ab560ce12ed (\"rust: alloc: update `VecExt` to take allocation flags\")\nReviewed-by: Alice Ryhl \nReviewed-by: Boqun Feng \nReviewed-by: Benno Lossin \nSigned-off-by: Danilo Krummrich \nReviewed-by: Wedson Almeida Filho \nLink: https://lore.kernel.org/r/20240501134834.22323-1-dakr@redhat.com\n[ Solved `use` conflict and applied the `if`-instead-of-`match` change\n discussed in the list. - Miguel ]\nSigned-off-by: Miguel Ojeda ","shortMessageHtmlLink":"rust: alloc: fix dangling pointer in VecExt<T>::reserve()"}},{"before":"56f64b370612d8967df2c2e0cead805444d4e71a","after":"1161057f53f643b63060835d46461ef09e8abe2f","ref":"refs/heads/rust-next","pushedAt":"2024-05-06T22:25:12.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"rust: alloc: fix dangling pointer in VecExt::reserve()\n\nCurrently, a Vec's ptr value, after calling Vec::new(), is\ninitialized to Unique::dangling(). Hence, in VecExt::reserve(), we're\npassing a dangling pointer (instead of NULL) to krealloc() whenever a new\nVec's backing storage is allocated through VecExt extension\nfunctions.\n\nThis only works as long as align_of::(), used by Unique::dangling() to\nderive the dangling pointer, resolves to a value between 0x0 and\nZERO_SIZE_PTR (0x10) and krealloc() hence treats it the same as a NULL\npointer however.\n\nThis isn't a case we should rely on, since there may be types whose\nalignment may exceed the range still covered by krealloc(), plus other\nkernel allocators are not as tolerant either.\n\nInstead, pass a real NULL pointer to krealloc_aligned() if Vec's\ncapacity is zero.\n\nFixes: 5ab560ce12ed (\"rust: alloc: update `VecExt` to take allocation flags\")\nReviewed-by: Alice Ryhl \nReviewed-by: Boqun Feng \nReviewed-by: Benno Lossin \nSigned-off-by: Danilo Krummrich \nReviewed-by: Wedson Almeida Filho \nLink: https://lore.kernel.org/r/20240501134834.22323-1-dakr@redhat.com\n[ Solved `use` conflict. - Miguel ]\nSigned-off-by: Miguel Ojeda ","shortMessageHtmlLink":"rust: alloc: fix dangling pointer in VecExt<T>::reserve()"}},{"before":"8ccee0cffe72aea7142d56ed688d4de934546396","after":"c6bf07236e57f3a4a87418caab9afff7d4010dd3","ref":"refs/heads/rust-dev","pushedAt":"2024-05-06T18:32:28.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"fbq","name":"Boqun Feng","path":"/fbq","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/673448?s=80&v=4"},"commit":{"message":"Merge patch series \"Memory management patches needed by Rust Binder\"\n\nAlice Ryhl says:\n\nThis patchset contains some abstractions needed by the Rust\nimplementation of the Binder driver for passing data between userspace,\nkernelspace, and directly into other processes.\n\nThese abstractions do not exactly match what was included in the Rust\nBinder RFC - I have made various improvements and simplifications since\nthen. Nonetheless, please see the Rust Binder RFC [1] to get an\nunderstanding for how this will be used:\n\nUsers of \"rust: add userspace pointers\"\n and \"rust: add typed accessors for userspace pointers\":\n\trust_binder: add binderfs support to Rust binder\n\trust_binder: add threading support\n\trust_binder: add nodes and context managers\n\trust_binder: add oneway transactions\n\trust_binder: add death notifications\n\trust_binder: send nodes in transactions\n\trust_binder: add BINDER_TYPE_PTR support\n\trust_binder: add BINDER_TYPE_FDA support\n\trust_binder: add process freezing\n\nUsers of \"rust: add abstraction for `struct page`\":\n\trust_binder: add oneway transactions\n\trust_binder: add vma shrinker\n\nLink: https://lore.kernel.org/r/20240418-alice-mm-v6-0-cb8f3e5d688f@google.com\n[boqun: Resolve conflicts with File patchset]","shortMessageHtmlLink":"Merge patch series \"Memory management patches needed by Rust Binder\""}},{"before":"2c1092853f163762ef0aabc551a630ef233e1be3","after":"56f64b370612d8967df2c2e0cead805444d4e71a","ref":"refs/heads/rust-next","pushedAt":"2024-05-05T22:26:23.000Z","pushType":"push","commitsCount":12,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"rust: upgrade to Rust 1.78.0\n\nThis is the next upgrade to the Rust toolchain, from 1.77.1 to 1.78.0\n(i.e. the latest) [1].\n\nSee the upgrade policy [2] and the comments on the first upgrade in\ncommit 3ed03f4da06e (\"rust: upgrade to Rust 1.68.2\").\n\nIt is much smaller than previous upgrades, since the `alloc` fork was\ndropped in commit 9d0441bab775 (\"rust: alloc: remove our fork of the\n`alloc` crate\") [3].\n\n# Unstable features\n\nThere have been no changes to the set of unstable features used in\nour own code. Therefore, the only unstable features allowed to be used\noutside the `kernel` crate is still `new_uninit`.\n\nHowever, since we finally dropped our `alloc` fork [3], all the unstable\nfeatures used by `alloc` (~30 language ones, ~60 library ones) are not\na concern anymore. This reduces the maintenance burden, increases the\nchances of new compiler versions working without changes and gets us\ncloser to the goal of supporting several compiler versions.\n\nIt also means that, ignoring non-language/library features, we are\ncurrently left with just the few language features needed to implement the\nkernel `Arc`, the `new_uninit` library feature, the `compiler_builtins`\nmarker and the few `no_*` `cfg`s we pass when compiling `core`/`alloc`.\n\nPlease see [4] for details.\n\n# Required changes\n\n## LLVM's data layout\n\nRust 1.77.0 (i.e. the previous upgrade) introduced a check for matching\nLLVM data layouts [5]. Then, Rust 1.78.0 upgraded LLVM's bundled major\nversion from 17 to 18 [6], which changed the data layout in x86 [7]. Thus\nupdate the data layout in our custom target specification for x86 so\nthat the compiler does not complain about the mismatch:\n\n error: data-layout for target `target-5559158138856098584`,\n `e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128`,\n differs from LLVM target's `x86_64-linux-gnu` default layout,\n `e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128`\n\nIn the future, the goal is to drop the custom target specifications.\nMeanwhile, if we want to support other LLVM versions used in `rustc`\n(e.g. for LTO), we will need to add some extra logic (e.g. conditional on\nLLVM's version, or extracting the data layout from an existing built-in\ntarget specification).\n\n## `unused_imports`\n\nRust's `unused_imports` lint covers both unused and redundant imports.\nNow, in 1.78.0, the lint detects more cases of redundant imports [8].\nThus one of the previous patches cleaned them up.\n\n## Clippy's `new_without_default`\n\nClippy now suggests to implement `Default` even when `new()` is `const`,\nsince `Default::default()` may call `const` functions even if it is not\n`const` itself [9]. Thus one of the previous patches implemented it.\n\n# Other changes in Rust\n\nRust 1.78.0 introduced `feature(asm_goto)` [10] [11]. This feature was\ndiscussed in the past [12].\n\nRust 1.78.0 introduced `feature(const_refs_to_static)` [13] to allow\nreferencing statics in constants and extended `feature(const_mut_refs)`\nto allow raw mutable pointers in constants. Together, this should cover\nthe kernel's `VTABLE` use case. In fact, the implementation [14] in\nupstream Rust added a test case for it [15].\n\nRust 1.78.0 with debug assertions enabled (i.e. `-Cdebug-assertions=y`,\nkernel's `CONFIG_RUST_DEBUG_ASSERTIONS=y`) now always checks all unsafe\npreconditions, though without a way to opt-out for particular cases [16].\nIt would be ideal to have a way to selectively disable certain checks\nper-call site for this one (i.e. not just per check but for particular\ninstances of a check), even if the vast majority of the checks remain\nin place [17].\n\nRust 1.78.0 also improved a couple issues we reported when giving feedback\nfor the new `--check-cfg` feature [18] [19].\n\n# `alloc` upgrade and reviewing\n\nAs mentioned above, compiler upgrades will not update `alloc` anymore,\nsince we dropped our `alloc` fork [3].\n\nLink: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1780-2024-05-02 [1]\nLink: https://rust-for-linux.com/rust-version-policy [2]\nLink: https://lore.kernel.org/rust-for-linux/20240328013603.206764-1-wedsonaf@gmail.com/ [3]\nLink: https://github.com/Rust-for-Linux/linux/issues/2 [4]\nLink: https://github.com/rust-lang/rust/pull/120062 [5]\nLink: https://github.com/rust-lang/rust/pull/120055 [6]\nLink: https://reviews.llvm.org/D86310 [7]\nLink: https://github.com/rust-lang/rust/pull/117772 [8]\nLink: https://github.com/rust-lang/rust-clippy/pull/10903 [9]\nLink: https://github.com/rust-lang/rust/pull/119365 [10]\nLink: https://github.com/rust-lang/rust/issues/119364 [11]\nLink: https://lore.kernel.org/rust-for-linux/ZWipTZysC2YL7qsq@Boquns-Mac-mini.home/ [12]\nLink: https://github.com/rust-lang/rust/issues/119618 [13]\nLink: https://github.com/rust-lang/rust/pull/120932 [14]\nLink: https://github.com/rust-lang/rust/pull/120932/files#diff-e6fc1622c46054cd46b1d225c5386c5554564b3b0fa8a03c2dc2d8627a1079d9 [15]\nLink: https://github.com/rust-lang/rust/issues/120969 [16]\nLink: https://github.com/Rust-for-Linux/linux/issues/354 [17]\nLink: https://github.com/rust-lang/rust/pull/121202 [18]\nLink: https://github.com/rust-lang/rust/pull/121237 [19]\nReviewed-by: Alice Ryhl \nLink: https://lore.kernel.org/r/20240401212303.537355-4-ojeda@kernel.org\n[ Added a few more details and links I mentioned in the list. - Miguel ]\nSigned-off-by: Miguel Ojeda ","shortMessageHtmlLink":"rust: upgrade to Rust 1.78.0"}},{"before":"3d9a5b0823fc4d1f4e92a6f68f16e06a741fdd4e","after":"dba37bff996c0f3cc32ef3da80eb2e77ab48baed","ref":"refs/heads/staging/dev","pushedAt":"2024-05-01T14:46:52.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"Merge branch 'staging/rust-pci' into staging/dev","shortMessageHtmlLink":"Merge branch 'staging/rust-pci' into staging/dev"}},{"before":"029171cf755a6db8b795cb3617643987e88fc648","after":"d2e60c9461dde6bc438112b10a8ee170f7214aea","ref":"refs/heads/staging/rust-device","pushedAt":"2024-05-01T14:10:47.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add device::Data\n\nThis allows access to registrations and io resources to be automatically\nrevoked when devices are removed, even if the ref count to their state\nis non-zero.\n\nCo-developed-by: Andreas Hindborg \nSigned-off-by: Andreas Hindborg \nSigned-off-by: Wedson Almeida Filho \nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add device::Data"}},{"before":"9135973515d349f1606d31234ff770835be187cd","after":"029171cf755a6db8b795cb3617643987e88fc648","ref":"refs/heads/staging/rust-device","pushedAt":"2024-05-01T14:06:38.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dakr","name":"Danilo Krummrich","path":"/dakr","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3908202?s=80&v=4"},"commit":{"message":"rust: add revocable objects\n\nThis implements the Revocable and AsyncRevocable types.\n\nRevocable allows access to objects to be safely revoked at run time.\n\nThis is useful, for example, for resources allocated during device probe;\nwhen the device is removed, the driver should stop accessing the device\nresources even if other state is kept in memory due to existing\nreferences (i.e., device context data is ref-counted and has a non-zero\nrefcount after removal of the device).\n\nAsyncRevocable allows access to objects to be revoked without having to\nwait for existing users to complete. This will be used to drop futures\nin tasks when executors are being torn down.\n\nCo-developed-by: Andreas Hindborg \nSigned-off-by: Andreas Hindborg \nSigned-off-by: Wedson Almeida Filho \nSigned-off-by: Danilo Krummrich ","shortMessageHtmlLink":"rust: add revocable objects"}},{"before":"19843452dca40e28d6d3f4793d998b681d505c7f","after":"e67572cd2204894179d89bd7b984072f19313b03","ref":"refs/heads/rust-fixes","pushedAt":"2024-04-29T09:12:56.000Z","pushType":"push","commitsCount":1917,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"Linux 6.9-rc6","shortMessageHtmlLink":"Linux 6.9-rc6"}},{"before":"56b70b91a161b9490da96f9931249b27e5c0a8ed","after":"19843452dca40e28d6d3f4793d998b681d505c7f","ref":"refs/heads/rust-fixes","pushedAt":"2024-04-25T15:36:06.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"rust: remove `params` from `module` macro example\n\nRemove argument `params` from the `module` macro example, because the\nmacro does not currently support module parameters since it was not sent\nwith the initial merge.\n\nSigned-off-by: Aswin Unnikrishnan \nReviewed-by: Alice Ryhl \nCc: stable@vger.kernel.org\nFixes: 1fbde52bde73 (\"rust: add `macros` crate\")\nLink: https://lore.kernel.org/r/20240419215015.157258-1-aswinunni01@gmail.com\n[ Reworded slightly. ]\nSigned-off-by: Miguel Ojeda ","shortMessageHtmlLink":"rust: remove params from module macro example"}},{"before":"6221cdcee48d89d234118fc25df7b243c23b84b1","after":"56b70b91a161b9490da96f9931249b27e5c0a8ed","ref":"refs/heads/rust-fixes","pushedAt":"2024-04-23T00:37:46.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"rust: remove `params` from `module` macro example\n\nRemove argument `params` from the `module` macro example, because the\nmacro does not currently support module parameters since it was not sent\nwith the initial merge.\n\nSigned-off-by: Aswin Unnikrishnan \nReviewed-by: Alice Ryhl \nCc: stable@vger.kernel.org\nFixes: 1fbde52bde73 (\"rust: add `macros` crate\")\nLink: https://lore.kernel.org/r/20240419215015.157258-1-aswinunni01@gmail.com\n[ Reworded slightly. ]\nSigned-off-by: Miguel Ojeda ","shortMessageHtmlLink":"rust: remove params from module macro example"}},{"before":"fed40cbb341227c3194572518efc64962b87dd89","after":"6221cdcee48d89d234118fc25df7b243c23b84b1","ref":"refs/heads/rust-fixes","pushedAt":"2024-04-23T00:31:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"rust: remove `params` from `module`'s macro example\n\nRemove argument `params` from the `module` macro example, because the\nmacro does not currently support module parameters since it was not sent\nwith the initial merge.\n\nSigned-off-by: Aswin Unnikrishnan \nReviewed-by: Alice Ryhl \nCc: stable@vger.kernel.org\nFixes: 1fbde52bde73 (\"rust: add `macros` crate\")\nLink: https://lore.kernel.org/r/20240419215015.157258-1-aswinunni01@gmail.com\n[ Reworded slightly. ]\nSigned-off-by: Miguel Ojeda ","shortMessageHtmlLink":"rust: remove params from module's macro example"}},{"before":"876cea3c1eac67ef3971206e0d03e1b25b214c73","after":"fed40cbb341227c3194572518efc64962b87dd89","ref":"refs/heads/rust-fixes","pushedAt":"2024-04-22T22:40:45.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"kbuild: rust: force `alloc` extern to allow \"empty\" Rust files\n\nIf one attempts to build an essentially empty file somewhere in the\nkernel tree, it leads to a build error because the compiler does not\nrecognize the `new_uninit` unstable feature:\n\n error[E0635]: unknown feature `new_uninit`\n --> :1:9\n |\n 1 | feature(new_uninit)\n | ^^^^^^^^^^\n\nThe reason is that we pass `-Zcrate-attr='feature(new_uninit)'` (together\nwith `-Zallow-features=new_uninit`) to let non-`rust/` code use that\nunstable feature.\n\nHowever, the compiler only recognizes the feature if the `alloc` crate\nis resolved (the feature is an `alloc` one). `--extern alloc`, which we\npass, is not enough to resolve the crate.\n\nIntroducing a reference like `use alloc;` or `extern crate alloc;`\nsolves the issue, thus this is not seen in normal files. For instance,\n`use`ing the `kernel` prelude introduces such a reference, since `alloc`\nis used inside.\n\nWhile normal use of the build system is not impacted by this, it can still\nbe fairly confusing for kernel developers [1], thus use the unstable\n`force` option of `--extern` [2] (added in Rust 1.71 [3]) to force the\ncompiler to resolve `alloc`.\n\nThis new unstable feature is only needed meanwhile we use the other\nunstable feature, since then we will not need `-Zcrate-attr`.\n\nCc: stable@vger.kernel.org # v6.6+\nReported-by: Daniel Almeida \nReported-by: Julian Stecklina \nCloses: https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/topic/x/near/424096982 [1]\nFixes: 2f7ab1267dc9 (\"Kbuild: add Rust support\")\nLink: https://github.com/rust-lang/rust/issues/111302 [2]\nLink: https://github.com/rust-lang/rust/pull/109421 [3]\nReviewed-by: Alice Ryhl \nLink: https://lore.kernel.org/r/20240422090644.525520-1-ojeda@kernel.org\nSigned-off-by: Miguel Ojeda ","shortMessageHtmlLink":"kbuild: rust: force alloc extern to allow \"empty\" Rust files"}},{"before":"8933cf4651e02853ca679be7b2d978dfcdcc5e0c","after":"876cea3c1eac67ef3971206e0d03e1b25b214c73","ref":"refs/heads/rust-fixes","pushedAt":"2024-04-22T22:35:21.000Z","pushType":"push","commitsCount":4,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"kbuild: rust: force `alloc` extern to allow \"empty\" Rust files\n\nIf one attempts to build an essentially empty file somewhere in the\nkernel tree, it leads to a build error because the compiler does not\nrecognize the `new_uninit` unstable feature:\n\n error[E0635]: unknown feature `new_uninit`\n --> :1:9\n |\n 1 | feature(new_uninit)\n | ^^^^^^^^^^\n\nThe reason is that we pass `-Zcrate-attr='feature(new_uninit)'` (together\nwith `-Zallow-features=new_uninit`) to let non-`rust/` code use that\nunstable feature.\n\nHowever, the compiler only recognizes the feature if the `alloc` crate\nis resolved (the feature is an `alloc` one). `--extern alloc`, which we\npass, is not enough to resolve the crate.\n\nIntroducing a reference like `use alloc;` or `extern crate alloc;`\nsolves the issue, thus this is not seen in normal files. For instance,\n`use`ing the `kernel` prelude introduces such a reference, since `alloc`\nis used inside.\n\nWhile normal use of the build system is not impacted by this, it can still\nbe fairly confusing for kernel developers [1], thus use the unstable\n`force` option of `--extern` [2] (added in Rust 1.71 [3]) to force the\ncompiler to resolve `alloc`.\n\nThis new unstable feature is only needed meanwhile we use the other\nunstable feature, since then we will not need `-Zcrate-attr`.\n\nCc: stable@vger.kernel.org # v6.6+\nReported-by: Daniel Almeida \nReported-by: Julian Stecklina \nCloses: https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/topic/x/near/424096982 [1]\nFixes: 2f7ab1267dc9 (\"Kbuild: add Rust support\")\nLink: https://github.com/rust-lang/rust/issues/111302 [2]\nLink: https://github.com/rust-lang/rust/pull/109421 [3]\nReviewed-by: Alice Ryhl \nLink: https://lore.kernel.org/r/20240422090644.525520-1-ojeda@kernel.org\nSigned-off-by: Miguel Ojeda ","shortMessageHtmlLink":"kbuild: rust: force alloc extern to allow \"empty\" Rust files"}},{"before":"3f27cd3193d389a64a799055baa11002460c4fd4","after":"8ccee0cffe72aea7142d56ed688d4de934546396","ref":"refs/heads/rust-dev","pushedAt":"2024-04-18T23:06:02.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"fbq","name":"Boqun Feng","path":"/fbq","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/673448?s=80&v=4"},"commit":{"message":"Merge patch series \"Memory management patches needed by Rust Binder\"\n\nAlice Ryhl says:\n\nThis patchset contains some abstractions needed by the Rust\nimplementation of the Binder driver for passing data between userspace,\nkernelspace, and directly into other processes.\n\nThese abstractions do not exactly match what was included in the Rust\nBinder RFC - I have made various improvements and simplifications since\nthen. Nonetheless, please see the Rust Binder RFC [1] to get an\nunderstanding for how this will be used:\n\nUsers of \"rust: add userspace pointers\"\n and \"rust: add typed accessors for userspace pointers\":\n\trust_binder: add binderfs support to Rust binder\n\trust_binder: add threading support\n\trust_binder: add nodes and context managers\n\trust_binder: add oneway transactions\n\trust_binder: add death notifications\n\trust_binder: send nodes in transactions\n\trust_binder: add BINDER_TYPE_PTR support\n\trust_binder: add BINDER_TYPE_FDA support\n\trust_binder: add process freezing\n\nUsers of \"rust: add abstraction for `struct page`\":\n\trust_binder: add oneway transactions\n\trust_binder: add vma shrinker\n\nLink: https://lore.kernel.org/r/20240418-alice-mm-v6-0-cb8f3e5d688f@google.com\n[boqun: Resolve conflicts with File patchset]","shortMessageHtmlLink":"Merge patch series \"Memory management patches needed by Rust Binder\""}},{"before":"d04978a267b968a474ff09da301340edf4650beb","after":"3f27cd3193d389a64a799055baa11002460c4fd4","ref":"refs/heads/rust-dev","pushedAt":"2024-04-16T21:26:18.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"fbq","name":"Boqun Feng","path":"/fbq","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/673448?s=80&v=4"},"commit":{"message":"TEMP: rust: Adjustment of allocation API changes\n\nSigned-off-by: Boqun Feng ","shortMessageHtmlLink":"TEMP: rust: Adjustment of allocation API changes"}},{"before":"8db31d3f3bd5dbc8cf3a22bba04b4b4add7f984e","after":"2c1092853f163762ef0aabc551a630ef233e1be3","ref":"refs/heads/rust-next","pushedAt":"2024-04-16T21:02:50.000Z","pushType":"push","commitsCount":10,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"rust: kernel: remove usage of `allocator_api` unstable feature\n\nWith the adoption of `BoxExt` and `VecExt`, we don't need the functions\nprovided by this feature (namely the methods prefixed with `try_` and\ndifferent allocator per collection instance).\n\nWe do need `AllocError`, but we define our own as it is a trivial empty\nstruct.\n\nReviewed-by: Benno Lossin \nSigned-off-by: Wedson Almeida Filho \nLink: https://lore.kernel.org/r/20240328013603.206764-11-wedsonaf@gmail.com\nSigned-off-by: Miguel Ojeda ","shortMessageHtmlLink":"rust: kernel: remove usage of allocator_api unstable feature"}},{"before":"198cc1abb1e04d81c1d7b2437934c6c882cd426e","after":"d04978a267b968a474ff09da301340edf4650beb","ref":"refs/heads/rust-dev","pushedAt":"2024-04-16T19:58:41.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"fbq","name":"Boqun Feng","path":"/fbq","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/673448?s=80&v=4"},"commit":{"message":"TEMP: rust: Adjustment of allocation API changes\n\nSigned-off-by: Boqun Feng ","shortMessageHtmlLink":"TEMP: rust: Adjustment of allocation API changes"}},{"before":"761a8f0a776b5d5f5816e6c6e5f7f18d1b3d52f9","after":"8933cf4651e02853ca679be7b2d978dfcdcc5e0c","ref":"refs/heads/rust-fixes","pushedAt":"2024-04-16T19:30:31.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ojeda","name":"Miguel Ojeda","path":"/ojeda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1054456?s=80&v=4"},"commit":{"message":"rust: make mutually exclusive with CFI_CLANG\n\nOn RISC-V and arm64, and presumably x86, if CFI_CLANG is enabled,\nloading a rust module will trigger a kernel panic. Support for\nsanitisers, including kcfi (CFI_CLANG), is in the works, but for now\nthey're nightly-only options in rustc. Make RUST depend on !CFI_CLANG\nto prevent configuring a kernel without symmetrical support for kfi.\n\n[ Matthew Maurer writes [1]:\n\n This patch is fine by me - the last patch needed for KCFI to be\n functional in Rust just landed upstream last night, so we should\n revisit this (in the form of enabling it) once we move to\n `rustc-1.79.0` or later.\n\n Ramon de C Valle also gave feedback [2] on the status of KCFI for\n Rust and created a tracking issue [3] in upstream Rust. - Miguel ]\n\nFixes: 2f7ab1267dc9 (\"Kbuild: add Rust support\")\nCc: stable@vger.kernel.org\nSigned-off-by: Conor Dooley \nAcked-by: Nathan Chancellor \nLink: https://lore.kernel.org/rust-for-linux/CAGSQo024u1gHJgzsO38Xg3c4or+JupoPABQx_+0BLEpPg0cOEA@mail.gmail.com/ [1]\nLink: https://lore.kernel.org/rust-for-linux/CAOcBZOS2kPyH0Dm7Fuh4GC3=v7nZhyzBj_-dKu3PfAnrHZvaxg@mail.gmail.com/ [2]\nLink: https://github.com/rust-lang/rust/issues/123479 [3]\nLink: https://lore.kernel.org/r/20240404-providing-emporium-e652e359c711@spud\n[ Added feedback from the list, links, and used Cc for the tag. ]\nSigned-off-by: Miguel Ojeda ","shortMessageHtmlLink":"rust: make mutually exclusive with CFI_CLANG"}},{"before":"0bde2cc7d49a7d4979d2ea45da7b36579fe91758","after":"75baacba5738262a3c786886eff455c2a26f9c77","ref":"refs/heads/staging/rust-pci","pushedAt":"2024-04-16T11:03:58.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"metaspace","name":"Andreas Hindborg","path":"/metaspace","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1032242?s=80&v=4"},"commit":{"message":"rust: pci: Fix a build system bug when PCI_MSI is not enabled\n\nWhen enabling PCI without PCI_MSI, Rust pci code would fail to build. Fix this\nby requiring both PCI and PCI_MSI to build Rust pci abstractions.\n\nReported-by: Philipp Stanner \nSigned-off-by: Andreas Hindborg ","shortMessageHtmlLink":"rust: pci: Fix a build system bug when PCI_MSI is not enabled"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAETlURAAA","startCursor":null,"endCursor":null}},"title":"Activity ยท Rust-for-Linux/linux"}