From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86A952F6586 for ; Tue, 25 Aug 2026 11:15:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787656542; cv=none; b=m2BUjNV/dOMAJpte2YYKH7YPNXHFGNIArfr5NXY4NAbkBd2lX9QD5GNqrTKyZYF6tMj0GPCIll2ODVBRjElgJo2O/Cj4sGcDkKVOF5D/KdLTS5tzJs6/kawE1TurTM7VJkLViMLQLxuPUGqQmqm+Fhcn/UQg9+w9/8BLJnfDmqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787656542; c=relaxed/simple; bh=ji2w9T6yHWzYADdM/IwL6vUAEOI43Jf6TQZTGuMSB9o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=U3UDwBLtuBWpM6gWWAjKXEU4zYitFZkJAs9cOR3vptGVx8au20Ghvjuz1XLyZnwiHJo5X3cddUipJf53mXih+qI4Mz7c4bMduzzU60kTXMHBcvc+BpZ7FsPzSyJJYUy6yzWuEELeI+A0fYukIJ2lB27+Ktx2T53JHXgOcg//Xtw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sTrSMk+i; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sTrSMk+i" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2556B1F000E9; Tue, 25 Aug 2026 11:15:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787656541; bh=u7YqiZL5dCbJBbbp0Xw3Hy8wQPvT7Lf7gh/tgXt+w3Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=sTrSMk+iINdVmpy697QQgOSwh7sFntXklRfyiceJ9c8NRl2FdHFTTVVyHR55WmxK1 /fsAcmJkPU7SlxTWWDrgYaQ3AmNh7JL1Jgjx/iWOjNEifwcGJslJU5552o6s8U1aNm 2QF5RYv2bCkhP5YkDxNXOK6RTupntWReukf+TS6Q= Date: Tue, 25 Aug 2026 13:15:35 +0200 From: Greg KH To: Linus Torvalds Cc: Andrew Morton , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: [GIT PULL] Char/Misc/IIO driver driver updates for 7.3-rc1 Message-ID: <2026082525-spoils-gutless-f1ff@gregkh> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Aug 25, 2026 at 01:14:22PM +0200, Greg KH wrote: > The following changes since commit f5098b6bae761e346ebcd9da7f95622c04733cff: > > Linux 7.2-rc5 (2026-07-26 14:45:48 -0700) > > are available in the Git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git tags/char-misc-7.3-rc1 > > for you to fetch changes up to 8992f32c57607bdfaf5de2a2cd26b3b71f3a9d55: > > Merge tag 'coresight-next-v7.3' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next (2026-08-19 09:57:51 +0200) > > ---------------------------------------------------------------- > Char/Misc/IIO/etc driver update for 7.3-rc1 > > Here is the big set of char, misc, iio, counter, fpga, and other small > driver subsystems for 7.3-rc1. > > Overall, due to some driver removals we only added a bit more code than > removed, which was a nice change. Highlights in this merge request are: > - Loads of IIO driver updates and additions > - binder driver updates (more on that below...) > - Removal of the SGI XP and GRU drivers as they are not used anymore > and turn out to be pretty insecure overall > - Removal of the obsolete ibmasm driver as it's not being used anymore > - Coresight driver updates and additions > - Mei driver udpates > - Counter driver updates > - FPGA driver updates > - ICC driver updates > - lots and lots of other tiny driver updates to resolve reported > issues > > All of these have been in linux-next for a while, with the only reported > issues being some major merge conflicts. Miguel pointed out some of > these with the Rust tree merge, which is the majority of them. I'll > follow up with a diffstat of the merge resolution I made against your > most recent tree, which works for me. And here below is my merge resolution. Watchout for the drivers/android/binder/netlink.rs fixup that is needed to get things to build properly. It's not a merge conflict, but still is required due to the module ownership changes coming from the rust tree. thanks, greg k-h diff --cc rust/kernel/sync/poll.rs index 5aa0ce9ba01b,684dfa242b1a..000000000000 --- a/rust/kernel/sync/poll.rs +++ b/rust/kernel/sync/poll.rs @@@ -8,13 -9,14 +9,18 @@@ use crate:: bindings, fs::File, prelude::*, - sync::{CondVar, LockClassKey}, + sync::{ + rcu::synchronize_rcu, + CondVar, + LockClassKey, // + }, // + types::Opaque, // + }; + use core::{ + marker::PhantomData, + mem::ManuallyDrop, + ops::Deref, // }; - use core::{marker::PhantomData, ops::Deref}; /// Creates a [`PollCondVar`] initialiser with the given name and a newly-created lock class. #[macro_export] @@@ -103,6 -106,72 +110,70 @@@ impl PinnedDrop for PollCondVar unsafe { bindings::__wake_up_pollfree(self.inner.wait_queue_head.get()) }; // Wait for epoll items to be properly removed. - // - // SAFETY: Just an FFI call. - unsafe { bindings::synchronize_rcu() }; + synchronize_rcu(); } } + + /// A [`KBox`] that uses `kfree_rcu`. + /// + /// [`KBox`]: PollCondVar + pub struct PollCondVarBox { + inner: ManuallyDrop>>, + } + + #[pin_data] + #[repr(C)] + struct PollCondVarBoxInner { + #[pin] + inner: PollCondVar, - rcu: Opaque, ++ rcu: Opaque, + } + + // SAFETY: PollCondVar is Send + unsafe impl Send for PollCondVarBoxInner {} + // SAFETY: PollCondVar is Sync + unsafe impl Sync for PollCondVarBoxInner {} + + impl PollCondVarBox { + /// Constructs a new boxed [`PollCondVar`]. + pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> Result { + let b = KBox::pin_init( + pin_init!(PollCondVarBoxInner { + inner <- PollCondVar::new(name, key), + rcu: Opaque::uninit(), + }), + GFP_KERNEL, + ) + .map_err(|_| AllocError)?; + + Ok(PollCondVarBox { + inner: ManuallyDrop::new(b), + }) + } + } + + impl Deref for PollCondVarBox { + type Target = PollCondVar; + fn deref(&self) -> &PollCondVar { + &self.inner.inner + } + } + + impl Drop for PollCondVarBox { + #[inline] + fn drop(&mut self) { + // SAFETY: ManuallyDrop::take ok because not already taken. + let boxed = unsafe { ManuallyDrop::take(&mut self.inner) }; + + // SAFETY: The code below frees the box without calling the actual destructor of the type, + // but it's okay because it re-implements the destructor using `kfree_rcu()` in place of + // `synchronize_rcu()`. + let ptr = KBox::into_raw(unsafe { Pin::into_inner_unchecked(boxed) }); + + // SAFETY: The pointer points at a valid `wait_queue_head`. + unsafe { bindings::__wake_up_pollfree((*ptr).inner.inner.wait_queue_head.get()) }; + + // SAFETY: This was allocated using `KBox::pin_init`, so it can be freed with `kvfree`. + unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::()) }; + } + } diff --cc rust/kernel/task.rs index c2b3457b700c,1b290c61714d..000000000000 --- a/rust/kernel/task.rs +++ b/rust/kernel/task.rs @@@ -210,7 -210,14 +210,14 @@@ impl Task unsafe { *ptr::addr_of!((*self.as_ptr()).pid) } } + /// Returns the TGID (Thread Group ID / Process ID) of the given task. + pub fn tgid(&self) -> Pid { + // SAFETY: The tgid of a task never changes after initialization, so reading this field is + // not a data race. + unsafe { *ptr::addr_of!((*self.as_ptr()).tgid) } + } + - /// Returns the UID of the given task. + /// Returns the objective real UID of the given task. #[inline] pub fn uid(&self) -> Kuid { // SAFETY: It's always safe to call `task_uid` on a valid task. diff --cc rust/uapi/uapi_helper.h index 1c4aa4292dce,86c7b6b284b0..000000000000 --- a/rust/uapi/uapi_helper.h +++ b/rust/uapi/uapi_helper.h @@@ -10,7 -11,7 +10,8 @@@ #include #include #include + #include +#include #include #include #include diff --git a/drivers/android/binder/netlink.rs b/drivers/android/binder/netlink.rs index beb7ea2edaff..f34e1009432c 100644 --- a/drivers/android/binder/netlink.rs +++ b/drivers/android/binder/netlink.rs @@ -13,7 +13,7 @@ }; pub static BINDER_NL_FAMILY: Family = Family::const_new( - &crate::THIS_MODULE, + kernel::module::this_module::(), kernel::uapi::BINDER_FAMILY_NAME, kernel::uapi::BINDER_FAMILY_VERSION, &BINDER_NL_FAMILY_MCGRPS, * Unmerged path drivers/misc/sgi-xp/xpc_uv.c