From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCCC638582AE; Fri, 16 Feb 2024 09:47:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCCC638582AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708076850; bh=LB4cwXAKLgu7jd3zaLWyBjCDbP5+5SMIJZlfL4DD4zY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Yos1e0tZpdXZ++ahX2g889Iol9dKZMpZ0zfnECziiYl/bNWpRD6k8OCjhFTQTKkKu dl400zpd1TItw1WKu0E6z78DH8woX5q/6KMah3sKWTHFXA22/Awt3BhBq2aJFP9NDy 2a+yU9T4A5QGMIcNJNF8fIvvxCwJCZ3mg/+mat+E= From: "adrian.ratiu at collabora dot com" To: gdb-prs@sourceware.org Subject: [Bug server/30453] gdbserver cannot set breakpoints when /proc/pid/mem is not writable Date: Fri, 16 Feb 2024 09:47:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: server X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adrian.ratiu at collabora dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30453 --- Comment #18 from Adrian Ratiu --- I would like to point out one more thing, which I found interesting on this subject. According to [1], a very long time ago the upstream Linux kernel used to restrict writes to /proc/pid/mem similar to how ChromeOS is doing in their kernel. Eventually in 2011 the upstream kernel allowed writes to mem citing "there = is no longer a security hazard" in commit [2], which was incorrect because CVEs and drama ensued [3], which apparently continues to this day. Personally I can understand the case ChromeOS is making for restricting /proc/pid/mem, and I think it would even make sense to have those kconfig options in the upstream kernel. I can't be the judge of what GDB supports or not, but perhaps if I get the kconfig options to restring /proc/pid/mem upstreamed in the mainline kernel, that would help settle the matter? :) [1] https://github.com/torvalds/linux/blob/8b0db9db19858b08c46a84540acfd35f6e64= 87b8/fs/proc/base.c#L860 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?= id=3D198214a7 [3] https://lwn.net/Articles/476947/ --=20 You are receiving this mail because: You are on the CC list for the bug.=