From nobody Sun Dec 29 16:47:00 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YLlWT0Vydz5jPw4 for ; Sun, 29 Dec 2024 16:47:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YLlWS6DGTz41gJ for ; Sun, 29 Dec 2024 16:47:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735490820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pgKzejKJw/0Je9GiR+TL7i7DEqTMVnISjqE6II0P9RI=; b=Ja7NQZ5u64koK/9BMmgKOX9ngV1DZaf5PfZthIfB09kje9JP4b4krtSPdTYcK2XOXDDVDv 7RiQpEIVgXTqgJGCzDnhUiSdL1gcC3cQVveCaDn34O1tydKKUPh7DXI/8P7Pp8fpm4ouEe q/J1Y+hN6aORrD/FWcusDJ4ynBDXzFZ/J67Wemri0rteilyxKcbjyqt+5dv63v9MzJjMR1 hoBheDyeqUcXFq2kUFSBT29vhGIYJISy8ZhFQI4GoVJQqt0D4Fual9fTna8JJI7VgaR7Gl t3w7q+K6QJzDRA5BHC8x8G1Llo9JT6mOKCZYtRjBoMK/hDO9e4u5K2OEPBa/Fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735490820; a=rsa-sha256; cv=none; b=ymyKnP1LUs9ddE+71stLbTvM0oHE23J4B7wHj/KeHqtE8fOUznMZeI/42BnLHCJAeF6ICD M89/pWZFqelN0G0q8nQdv7d3u3aU/wCVWV/YsBhtJXXdIKBGc9GlgH+qUxegfMIPP8jr+j c4mdmz5MUy4tr0qqJAyNBCztLv6AmNt7eWBs8ORz7IaH7eldrxj2GTRcRKnoCrItWH/lZX paB0URHv7RaF+27qLaopXCq745RbEGB1yBAECxSIogM1HA5eLWVLSB0wrRveW7L3hz4nG0 9jyCkl0ibH0YuS/9ajA2xCPln1O3eM2bjx6Gls6H2AOEua2Qzm/AOMRabxanlg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YLlWS5gxrzHss for ; Sun, 29 Dec 2024 16:47:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4BTGl0ZU063319 for ; Sun, 29 Dec 2024 16:47:00 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4BTGl0lL063318 for bugs@FreeBSD.org; Sun, 29 Dec 2024 16:47:00 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 283726] wc(1) and other text utilities fail to read some pseudo-filesystem files Date: Sun, 29 Dec 2024 16:47:00 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rbranco@suse.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D283726 Bug ID: 283726 Summary: wc(1) and other text utilities fail to read some pseudo-filesystem files Product: Base System Version: 15.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: rbranco@suse.com To reproduce: $ wc /compat/linux/proc/self/limits wc: /compat/linux/proc/self/limits: read: Operation not permitted Both cat(1) and GNU wc run without issues: $ gwc /compat/linux/proc/self/limits 17 100 1354 /compat/linux/proc/self/limits Other problematic files: - /compat/linux/proc/self/maps Other problematic text utilities: - head - tail - maybe others. While I'm aware that files from /proc must be read in one go, this doesn't = seem to be the issue because the buffer size in wc.c is big enough (MAXBSIZE =3D 65536). At first, this bug seemed a lot like https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276043 but I tried remo= ving the code that calls kernel_sysctlbyname in linprocfs_doproclimits() and giv= es the same error. So the issue seems to be the Capsicum initialization code.= =20 The difference with cat(1) is that it calls cap_init, so maybe it needs Cas= per. --=20 You are receiving this mail because: You are the assignee for the bug.=