https://universe.0xinfinity.dev/distro/kernel/atom?h=0x221E-v0.0-v7.0 2026-03-07T22:06:17Z rust: ptr: add projection infrastructure 2026-03-07T22:06:17Z Gary Guo gary@garyguo.net 2026-03-02T16:42:35Z urn:sha1:f41941aab3acd33f13d65a2ae496329bc8ae4de0 Add a generic infrastructure for performing field and index projections on raw pointers. This will form the basis of performing I/O projections. Pointers manipulations are intentionally using the safe wrapping variants instead of the unsafe variants, as the latter requires pointers to be inside an allocation which is not necessarily true for I/O pointers. This projection macro protects against rogue `Deref` implementation, which can causes the projected pointer to be outside the bounds of starting pointer. This is extremely unlikely and Rust has a lint to catch this, but is unsoundness regardless. The protection works by inducing type inference ambiguity when `Deref` is implemented. This projection macro also stops projecting into unaligned fields (i.e. fields of `#[repr(packed)]` structs), as misaligned pointers require special handling. This is implemented by attempting to create reference to projected field inside a `if false` block. Despite being unreachable, Rust still checks that they're not unaligned fields. The projection macro supports both fallible and infallible index projections. These are described in detail inside the documentation. Signed-off-by: Gary Guo <gary@garyguo.net> Reviewed-by: Benno Lossin <lossin@kernel.org> Acked-by: Miguel Ojeda <ojeda@kernel.org> Link: https://patch.msgid.link/20260302164239.284084-3-gary@kernel.org [ * Add intro-doc links where possible, * Fix typos and slightly improve wording, e.g. "as documentation describes" -> "as the documentation of [`Self::proj`] describes", * Add an empty line between regular and safety comments, before examples, and between logically independent comments, * Capitalize various safety comments. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org> Hosts the 0x221E linux distro kernel.Ubuntu
summaryrefslogtreecommitdiff
path: root/drivers/media/video/timblogiw.c
AgeCommit message (Expand)Author
2012-01-17Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds
2012-01-10[media] convert drivers/media/* to use module_platform_driver()Axel Lin
2011-11-17Merge branch 'dma_slave_direction' into next_test_dirnVinod Koul
2011-10-31drivers/media: Add module.h to all files using it implicitlyPaul Gortmaker
2011-10-31media, video: move to dma_transfer_directionVinod Koul
2011-07-27[media] Stop using linux/version.h on most video driversMauro Carvalho Chehab
2011-05-26mfd: Use mfd cell platform_data for timberdale cells platform bitsSamuel Ortiz
2011-03-23mfd: mfd_cell is now implicitly available to timberdale driversAndres Salomon
2010-12-30[media] timblogiw: fix compile warningHans Verkuil
2010-12-30[media] v4l: fix handling of v4l2_input.capabilitiesHans Verkuil
2010-12-29[media] timblogiw: too large value for strncpy()Dan Carpenter
2010-12-29[media] timblogiw: const and __devinitdata do not mixStephen Rothwell
2010-12-29[media] media: Add timberdale video-in driverRichard Röjfors