From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jared Finder via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74220: invisible cursor Date: Thu, 28 Nov 2024 10:21:53 -0800 Message-ID: References: <87ldxwmppm.fsf@gmail.com> <86o72ssfm4.fsf@gnu.org> <87bjyscp5e.fsf@gmx.net> <2b5006ac22491fd8c509120ad653117d@finder.org> <8b70d54cd579f33d1e698a0f8927dc4f@finder.org> Reply-To: Jared Finder Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34953"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74220@debbugs.gnu.org, gerd.moellmann@gmail.com, ampinkas@gmail.com, eliz@gnu.org, rpluim@gmail.com To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 28 19:22:29 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tGj9o-0008wT-CD for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Nov 2024 19:22:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGj9R-0002I0-LM; Thu, 28 Nov 2024 13:22:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGj9O-0002Hf-LF for bug-gnu-emacs@gnu.org; Thu, 28 Nov 2024 13:22:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tGj9O-0004I2-CS for bug-gnu-emacs@gnu.org; Thu, 28 Nov 2024 13:22:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:MIME-Version:To:Subject; bh=4KXGEY7NoXykI+PR4+k0iLKbYq+rFZyHh8x5WaLzMbQ=; b=Il3/XLkLuOiVA6WrJeedPcVEEjjCsXgeNArbEGHcxAyM/Gn3x/jMdKZvRkQD9Ro0grswPE25KSVEZW//5Xxy5E6BphYJH7bN/7if6jdLiCDTYYgT3f206QKKmQajev2vT9Fi6KOtgsXF04BYAXjJQI05ofZGZQSodmolBBhWcvNtFSn8r7hqnhei4ODssqBCVVkmfCjM6evXn59Xp9W97vcLwgL8Ryl6WectpFQHGlUL9NdzKN/6jcXBpASOFrRHLqhOHC/PrbmQuF/7Ulhrf1T1DJKsSRJKPt2eD+i+bkLA5zIj+Q2nRQCJN2qyJoL7FPshEguTGIVdMZNbMKZSCw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tGj9N-0000uP-R8 for bug-gnu-emacs@gnu.org; Thu, 28 Nov 2024 13:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jared Finder Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Nov 2024 18:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74220 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: "Jared Finder via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" , Gerd =?UTF-8?Q?M=C3=B6llmann?= , 74220 <74220@debbugs.gnu.org>, Avraham Pinkas , Eli Zaretskii , Robert Pluim Original-Received: via spool by 74220-submit@debbugs.gnu.org id=B74220.17328181183478 (code B ref 74220); Thu, 28 Nov 2024 18:22:01 +0000 Original-Received: (at 74220) by debbugs.gnu.org; 28 Nov 2024 18:21:58 +0000 Original-Received: from localhost ([127.0.0.1]:39664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGj9K-0000u0-9H for submit@debbugs.gnu.org; Thu, 28 Nov 2024 13:21:58 -0500 Original-Received: from greenhill.hpalace.com ([192.155.80.58]:53028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGj9H-0000tq-U4 for 74220@debbugs.gnu.org; Thu, 28 Nov 2024 13:21:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=finder.org; s=2018; t=1732818114; bh=XrPkiYlrNJPrUy+4WpMHyfk2pOV6McYwBDV2pDHQ7wY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ahiYwZBbZrPw1tQLrUDBx5ja0Nwuf02ldzpNqz57e884WDkm7g1FmUcouVsUw8TWj u78TFrMK3x6N86yPfIADFhdSGE6N6RUVGJoxI2T1D8i4y9FlMoMEVBnuJF1vqh7Lnc ASjEtrKogC0VYeVERx+upZuj5HLeAQkV5NREinUS7hetJd8XOe0QNqrvhfpslI8IeT SquP7Fpa/1+2fyLQGUEReXIICkd2PeXY6vY9HMYkelvYgSSRzw51/GySUgiG0fRE+S j9Ys2rGxk9SgPvW9NsT+jpNxjz2ECP7RoSLT4F+WbZ+AQtAl0I8UsOeBXc+/GIttlz 4w+cj/MraVyRQ== Original-Received: from mail.finder.org (unknown [192.155.80.58]) by greenhill.hpalace.com (Postfix) with ESMTPSA id 01BFF138A; Thu, 28 Nov 2024 18:21:53 +0000 (UTC) In-Reply-To: <8b70d54cd579f33d1e698a0f8927dc4f@finder.org> X-Sender: jared@finder.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296061 Archived-At: On 2024-11-27 19:13, Jared Finder wrote: > On 2024-11-17 17:37, Jared Finder wrote: >> On 2024-11-06 08:17, Stephen Berman wrote: >>> On Wed, 06 Nov 2024 07:38:52 -0800 Jared Finder via "Bug reports for >>> GNU Emacs, the Swiss army knife of text editors" >>> wrote: >>> >>>> I tested this locally at HEAD (b5845e) on Linux debian >>>> 6.1.0-13-amd64 and >>>> everything is working fine. >>>> >>>> Could you please describe what terminal (the output of "echo $TERM") >>>> and >>>> kernel version (the output of "uname -a") you are using when you >>>> have this >>>> issue? Can you try toggling M-x gpm-mouse-mode on and off and share >>>> if any >>>> errors are reported? >>> >>> I can reproduce the issue in the Linux terminal (echo $TERM => linux, >>> uname -a => Linux strobelfssd 6.10.6 #1 SMP PREEMPT_DYNAMIC Mon Aug >>> 19 >>> 12:15:23 CEST 2024 x86_64 GNU/Linux). When I start emacs there with >>> -Q, >> >> Thank you, I am able to reproduce the issue locally on "Linux debian >> 6.11.5+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.11.5-1~bpo12+1 >> (2024-11-11) x86_64 GNU=Linux". I will investigate. > > This appears to be due to something happening at a lower level than > Emacs, though perhaps Emacs is not interfacing with GPM correctly. > > This started happening in multiple Emacs versions with Linux 6.7. I > tested HEAD, 29.4, and 28.2 -- all three versions worked fine with > Linux 6.6.63 and then exhibit this bug starting with Linux 6.7. > GPM_DrawPointer is still being called, of course (since this works in > previous Linux versions), but is no longer having any effect. > > I will keep investigating here. AH HA! This was an intentional change to Linux 6.7 to avoid a potential privilege escalation. Specifically, apps without the capability CAP_SYS_ADMIN are no longer able to set the kernel selection buffer. Across Emacs versions, granting the Emacs binary the CAP_SYS_ADMIN capability (sudo setcap cap_sys_admin+ep path/to/emacs) fixes the issue. But is this the right fix? CAP_SYS_ADMIN grants many dangerous capabilities on Linux. An alternative fix would be to update redisplay on terminals to draw the mouse cursor. Perhaps this is what is done on other OSes? I would like guidance here on which path is recommended. -- MJF