[crd host][linux] Implement remote_session_info binary [chromium/src : main]

0 views
Skip to first unread message

Yuwei Huang (Gerrit)

unread,
Mar 10, 2026, 7:10:24 PM (4 days ago) Mar 10
to Lambros Lambrou, Joe Downing, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
Attention needed from Lambros Lambrou

Yuwei Huang voted and added 1 comment

Votes added by Yuwei Huang

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Yuwei Huang . resolved

PTAL thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Lambros Lambrou
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib35be11c4d56c80583212926cbccfda978d99202
Gerrit-Change-Number: 7651733
Gerrit-PatchSet: 5
Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
Gerrit-CC: Joe Downing <joe...@chromium.org>
Gerrit-Attention: Lambros Lambrou <lambros...@chromium.org>
Gerrit-Comment-Date: Tue, 10 Mar 2026 23:10:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Lambros Lambrou (Gerrit)

unread,
Mar 10, 2026, 7:52:24 PM (4 days ago) Mar 10
to Yuwei Huang, Chromium LUCI CQ, Joe Downing, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
Attention needed from Yuwei Huang

Lambros Lambrou voted and added 1 comment

Votes added by Lambros Lambrou

Code-Review+1

1 comment

File remoting/host/linux/login_session_server.cc
Line 60, Patchset 5 (Latest): int ret = sd_pid_get_session(pid, &session_id);
Lambros Lambrou . unresolved

Please could you add comments to explain this logic? It looks like you try `sd_pid_get_session()`, then if it fails, you test if the pid is in a graphical session. If it is, then you use `sd_uid_get_display()` and `sd_pid_get_owner_uid()`. Please could you explain why this fallback is needed?

Open in Gerrit

Related details

Attention is currently required from:
  • Yuwei Huang
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib35be11c4d56c80583212926cbccfda978d99202
    Gerrit-Change-Number: 7651733
    Gerrit-PatchSet: 5
    Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
    Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
    Gerrit-CC: Joe Downing <joe...@chromium.org>
    Gerrit-Attention: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Comment-Date: Tue, 10 Mar 2026 23:52:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yuwei Huang (Gerrit)

    unread,
    Mar 10, 2026, 8:20:22 PM (4 days ago) Mar 10
    to Chromium IPC Reviews, Lambros Lambrou, Chromium LUCI CQ, Joe Downing, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
    Attention needed from Chromium IPC Reviews

    Yuwei Huang voted and added 2 comments

    Votes added by Yuwei Huang

    Auto-Submit+1
    Commit-Queue+1

    2 comments

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Yuwei Huang . resolved

    Adding IPC reviewer

    File remoting/host/linux/login_session_server.cc
    Line 60, Patchset 5: int ret = sd_pid_get_session(pid, &session_id);
    Lambros Lambrou . resolved

    Please could you add comments to explain this logic? It looks like you try `sd_pid_get_session()`, then if it fails, you test if the pid is in a graphical session. If it is, then you use `sd_uid_get_display()` and `sd_pid_get_owner_uid()`. Please could you explain why this fallback is needed?

    Yuwei Huang

    Apparently gemini copied these from `login_session_reporter_main.cc` and decided not to copied the comments over 😅 Added them back.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Chromium IPC Reviews
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib35be11c4d56c80583212926cbccfda978d99202
      Gerrit-Change-Number: 7651733
      Gerrit-PatchSet: 6
      Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Reviewer: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
      Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
      Gerrit-CC: Joe Downing <joe...@chromium.org>
      Gerrit-Attention: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-Comment-Date: Wed, 11 Mar 2026 00:20:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Lambros Lambrou <lambros...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      gwsq (Gerrit)

      unread,
      Mar 10, 2026, 8:23:38 PM (4 days ago) Mar 10
      to Yuwei Huang, Chromium IPC Reviews, Mustafa Emre Acer, Lambros Lambrou, Chromium LUCI CQ, Joe Downing, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
      Attention needed from Mustafa Emre Acer

      Message from gwsq

      From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
      IPC: mea...@chromium.org

      📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).

      IPC reviewer(s): mea...@chromium.org


      Reviewer source(s):
      mea...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mustafa Emre Acer
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib35be11c4d56c80583212926cbccfda978d99202
      Gerrit-Change-Number: 7651733
      Gerrit-PatchSet: 6
      Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
      Gerrit-Reviewer: Mustafa Emre Acer <mea...@chromium.org>
      Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Attention: Mustafa Emre Acer <mea...@chromium.org>
      Gerrit-Comment-Date: Wed, 11 Mar 2026 00:23:28 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mustafa Emre Acer (Gerrit)

      unread,
      Mar 11, 2026, 2:19:37 PM (4 days ago) Mar 11
      to Yuwei Huang, Chromium IPC Reviews, Lambros Lambrou, Chromium LUCI CQ, Joe Downing, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
      Attention needed from Yuwei Huang

      Mustafa Emre Acer voted and added 2 comments

      Votes added by Mustafa Emre Acer

      Code-Review+1

      2 comments

      Patchset-level comments
      Mustafa Emre Acer . resolved

      LGTM

      File remoting/host/ipc_constants.h
      Line 53, Patchset 6 (Latest):// Returns the server name for LonginSessionServer.
      Mustafa Emre Acer . unresolved

      nit: typo in LonginSessionServer

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Yuwei Huang
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib35be11c4d56c80583212926cbccfda978d99202
      Gerrit-Change-Number: 7651733
      Gerrit-PatchSet: 6
      Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
      Gerrit-Reviewer: Mustafa Emre Acer <mea...@chromium.org>
      Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: Joe Downing <joe...@chromium.org>
      Gerrit-CC: gwsq
      Gerrit-Attention: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Comment-Date: Wed, 11 Mar 2026 18:19:25 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Yuwei Huang (Gerrit)

      unread,
      Mar 11, 2026, 2:48:38 PM (3 days ago) Mar 11
      to Mustafa Emre Acer, Chromium IPC Reviews, Lambros Lambrou, Chromium LUCI CQ, Joe Downing, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org

      Yuwei Huang voted and added 2 comments

      Votes added by Yuwei Huang

      Auto-Submit+1
      Commit-Queue+2

      2 comments

      Patchset-level comments
      File-level comment, Patchset 7 (Latest):
      Yuwei Huang . resolved

      Thanks!

      File remoting/host/ipc_constants.h
      Line 53, Patchset 6:// Returns the server name for LonginSessionServer.
      Mustafa Emre Acer . resolved

      nit: typo in LonginSessionServer

      Yuwei Huang

      Oops.. Done!

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib35be11c4d56c80583212926cbccfda978d99202
        Gerrit-Change-Number: 7651733
        Gerrit-PatchSet: 7
        Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
        Gerrit-Reviewer: Mustafa Emre Acer <mea...@chromium.org>
        Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Joe Downing <joe...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Comment-Date: Wed, 11 Mar 2026 18:48:28 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Mustafa Emre Acer <mea...@chromium.org>
        satisfied_requirement
        open
        diffy

        Yuwei Huang (Gerrit)

        unread,
        Mar 11, 2026, 3:01:48 PM (3 days ago) Mar 11
        to Mustafa Emre Acer, Chromium IPC Reviews, Lambros Lambrou, Chromium LUCI CQ, Joe Downing, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org

        Yuwei Huang voted Commit-Queue+2

        Commit-Queue+2
        Gerrit-Comment-Date: Wed, 11 Mar 2026 19:01:37 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Mar 11, 2026, 5:16:18 PM (3 days ago) Mar 11
        to Yuwei Huang, Mustafa Emre Acer, Chromium IPC Reviews, Lambros Lambrou, Joe Downing, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org

        Chromium LUCI CQ submitted the change with unreviewed changes

        Unreviewed changes

        6 is the latest approved patch-set.
        The change was submitted with unreviewed changes in the following files:

        ```
        The name of the file: remoting/host/ipc_constants.h
        Insertions: 1, Deletions: 1.

        The diff is too large to show. Please review the diff.
        ```

        Change information

        Commit message:
        [crd host][linux] Implement remote_session_info binary

        This is to replace the CHROME_REMOTE_DESKTOP_SESSION env var, which we
        can't reliably set for GDM-managed sessions. It makes an IPC to the
        daemon process, and the daemon process will iterate through all its
        display sessions and check if the calling process (remote_session_info)
        is run on any of the session it manages.

        The existing is-remoting-session script will be updated to point to this
        binary, i.e. `remote-session-info --is-crd-session`.
        Bug: 475611769,b/478991859
        Change-Id: Ib35be11c4d56c80583212926cbccfda978d99202
        Reviewed-by: Mustafa Emre Acer <mea...@chromium.org>
        Auto-Submit: Yuwei Huang <yuw...@chromium.org>
        Commit-Queue: Yuwei Huang <yuw...@chromium.org>
        Reviewed-by: Lambros Lambrou <lambros...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1597987}
        Files:
        • M remoting/host/BUILD.gn
        • M remoting/host/ipc_constants.cc
        • M remoting/host/ipc_constants.h
        • M remoting/host/linux/BUILD.gn
        • A remoting/host/linux/login_session_server.cc
        • A remoting/host/linux/login_session_server.h
        • M remoting/host/linux/remote_display_session_manager.cc
        • M remoting/host/linux/remote_display_session_manager.h
        • A remoting/host/linux/remote_session_info_entry_point.cc
        • A remoting/host/linux/remote_session_info_main.cc
        • A remoting/host/linux/remote_session_info_main.h
        • M remoting/host/mojo_caller_security_checker.cc
        • M remoting/host/mojom/login_session.mojom
        Change size: L
        Delta: 13 files changed, 400 insertions(+), 1 deletion(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Mustafa Emre Acer, +1 by Lambros Lambrou
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib35be11c4d56c80583212926cbccfda978d99202
        Gerrit-Change-Number: 7651733
        Gerrit-PatchSet: 8
        Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
        Gerrit-Reviewer: Mustafa Emre Acer <mea...@chromium.org>
        Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages