From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CEE22D5A07 for ; Thu, 13 Nov 2025 09:14:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763025262; cv=none; b=WhvDUo51TSKSoC5VUqMyYQb+b59eBeqI6g2ftOh9QERAkg/N1BB65CGZzr38NXAqSxRLA2ZORkFUKGe/iuxedFGKfuidlGT0WVNfHQV7Lv0lZeAsyjYXf0x4bZvRAmt5pweS7x/XhT/UzwPCNNvYi3MI74oxvTF2QYvbufTmG6k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763025262; c=relaxed/simple; bh=ixMIOZhD0/70JnbtzbP6Xma0+jz+MweJQXVsIXaeEkg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=TRrtVuTcBH7fpDAVuIUHBbKnfFWzkmU8+W/5NMY8sknlTgXCwz1SRZYciomQTCfuvKeiOfjH2/IAauVQ1gPihQYdrO5zSc1v1UoyzkHS/GGBCcxhIhbCVYi7zZZKslfumFVXAYV2i0XKd12OGCUXqQT138nkCMEUtgaDYntsJLE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=IPwhSTpJ; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="IPwhSTpJ" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-429c93a28ebso430131f8f.1 for ; Thu, 13 Nov 2025 01:14:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1763025259; x=1763630059; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=ixMIOZhD0/70JnbtzbP6Xma0+jz+MweJQXVsIXaeEkg=; b=IPwhSTpJ4h9CBul70I0nCXAHS5/QCsuJrsCqmEaFt+muovAfLMJk2wi6h+3uEgAHA/ LeTOhgPLaX49QjQFO+Mfmii3iHQmlI9R7rMgwu6/7WmH2QNxfyTfWaL32ft8Mbn7IOzL ccHaIzGtgUnfOtOmFVAO4fl11LL6mODb+UOybhGdlQPX/AH0WEf//6OriCY7m0V1Uby7 1D+oHQNmj4krqRxjshvp3ALsrME/3u7f15isEd0Al3SY3ZsW3T5A21aAGHFBapGQkSrx dAJYR0Sv7/LJ/fMFQPHqvejz4fqHj9VRhU7rLNlwJv7YeP7K/s9AFfKIYW4F2/0313/q G/Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763025259; x=1763630059; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=ixMIOZhD0/70JnbtzbP6Xma0+jz+MweJQXVsIXaeEkg=; b=guoQowk9Fv55FuGqGd+sYebEDBzBhCFyISKmnqcDC59mY+mvWVGEU5ZEnusRYDoJKM r+w/tQi4F/itV69U1zA1jasvT4G2rQe56AwaWkb9ipV11jNGvNwtciGKPUh+RXYm+iTK mKTUaZmLwe1MInl3pbewte2oHbOcGRv//czW1rwsw271Fc1ZqxFVtIJQ08Q5RZ0HUQQy AY+L47BkNusX8ulYYitDtZyFbaiKs/T+5+BfArF4N/Cse861tjt2fPgKNJZdwvchIz/9 EOH5ItuKMpD99i7EjbLKOJA/3XgZ3xKDZTJSE8hHqfTtvJ4S5xYdcD5eS3GoYDRnVwqW QKcA== X-Forwarded-Encrypted: i=1; AJvYcCWprUSIK8vAPe7S4amsPTxA0YZZRe78QPIGJN2Le5//3mt8sEJGNZyvz3C83z5c4ytahudn9PcdXFlMSfgepw==@vger.kernel.org X-Gm-Message-State: AOJu0YyQ6DyInXmyWSRAWxEaWyeuo+F6cnUwFKLjJQ16h0rqEkL3ohFv cOXAFisuTCioeAqc3ttskyI+craotOzxPjCst0k1UhpVWvU2OwB6iV6HW1inH0U5b4Dta1ZEPN/ u5UC/V2mCmBNl+mf9zg== X-Google-Smtp-Source: AGHT+IFW/uK7rukH8lOhBTxny9oRqQsJbj1R6wN/AoqVDmx+yvVrDe0Qkq27CvYv7nilaGtcLciqMLlKNMvRLUs= X-Received: from wrtp18.prod.google.com ([2002:a5d:4e12:0:b0:42b:3a01:7810]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2086:b0:42b:4247:b07e with SMTP id ffacd0b85a97d-42b4bd90a34mr5310747f8f.25.1763025259157; Thu, 13 Nov 2025 01:14:19 -0800 (PST) Date: Thu, 13 Nov 2025 09:14:18 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251112-binder-bitmap-v5-0-8b9d7c7eca82@google.com> <20251112-binder-bitmap-v5-6-8b9d7c7eca82@google.com> Message-ID: Subject: Re: [PATCH v5 6/6] rust_binder: use bitmap for allocation of handles From: Alice Ryhl To: Miguel Ojeda Cc: Yury Norov , Greg Kroah-Hartman , "Arve =?utf-8?B?SGrDuG5uZXbDpWc=?=" , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Carlos Llamas , Suren Baghdasaryan , Burak Emir , Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 13, 2025 at 09:32:10AM +0100, Miguel Ojeda wrote: > On Thu, Nov 13, 2025 at 12:35=E2=80=AFAM Alice Ryhl wrote: > > > > Although we should never hit this codepath in real code, I don't think > > we need to kill the kernel. We can treat the r/b tree as source of trut= h > > and adjust the bitmap when mismathces are detected. > > > > I could add a kernel warning, though. That shouldn't kill an Android > > device. >=20 > I guess you mean warning in the sense of `pr_warn!` instead of > `warn_on!`, right? I was thinking of warn_on!. There is already a pr_err call. > If so, could you please add as well a `debug_assert!(false)` on that path= ? >=20 > Thanks! >=20 > I will create a first issue for the combination, since I hope we can > use it more and more. >=20 > Cheers, > Miguel