Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3894954rwl; Tue, 27 Dec 2022 17:38:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXsnIZwftMKCQUYyBUbps2D2Ki+HEMfxfF1cNofW+WgAbLlNWA+oUoCFuL45bBV+UPBLFk2Q X-Received: by 2002:a05:6a20:9e0f:b0:9d:efbe:52b2 with SMTP id ms15-20020a056a209e0f00b0009defbe52b2mr28988718pzb.34.1672191512660; Tue, 27 Dec 2022 17:38:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672191512; cv=none; d=google.com; s=arc-20160816; b=q+T3o6F2MIG6QAEjDvIFzTcr168bCeTd2vxJZcIcFd4TwhKlcRN0RU8vV4FqZmz4Ja t6ln0YxEAKrgUROGTj+/DZo3f0HTbfWfPU3NZOi2BrBc8LervdAVqWvyeDrs4xuXkzY4 ZgMjRtiPovGr37iTNCucn5Iuhpmnts3AjGCGX8U0k9pEboQM4bJpSFuGYKeDunmMiAQy ax98b3H4IRQzjgOTmjhRmNUK3OCEveW+FWQYOvBULusE2/k5v03tqKmWmZTtgF3JFotT L7Rtzgn8uaRHibclNEQlO8MrRIOCLp4D+6j+dZQGAUC0ZsPjqbLA+cyKrMhH5PtvL77v +v0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:comments:references:in-reply-to:subject:cc :to:from; bh=G4fqnconnXMlaBvzDooRBIQFrG4SwvXDlEgnzUbw0O0=; b=jBxBF6iUpDQ3uI3LL1vUZCQpvOscXdQ6oBx5jpJ+L3dL2i+MLuVBeKJ1cJq9G7GWL9 /0O3gFEeyw8d8q+yfbe111dEA8q6Fua0T1TAPBodyO22nlyxrO3yr5j56KflmJYrA3bA afeHkPkUFyO9tlpM/Jm53NaGjw5glpBhxXV4l4Tn00pIhxTTtjyklTCGwM6ur9n/ELXn LagAJy3qcC5IiqdvqQPkPlgC/JEeyeYgsok1hU0+731v1dykYGxzRePE6YR4gE/fMPO6 JyD6RBaOXRhi6WAPjl+qoYSrhLHjjRekdG0G18nxAyHJF9Li9TR8hwDxYq6eWNd7z0Rr jsPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y72-20020a638a4b000000b0047841428c4esi15042327pgd.787.2022.12.27.17.38.24; Tue, 27 Dec 2022 17:38:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229891AbiL1Avt convert rfc822-to-8bit (ORCPT + 66 others); Tue, 27 Dec 2022 19:51:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbiL1Ava (ORCPT ); Tue, 27 Dec 2022 19:51:30 -0500 X-Greylist: delayed 399 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 27 Dec 2022 16:51:30 PST Received: from orthanc.ca (orthanc.ca [208.79.93.154]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2113565AE; Tue, 27 Dec 2022 16:51:29 -0800 (PST) Received: from orthanc.ca (localhost [127.0.0.1]) by orthanc.ca (OpenSMTPD) with ESMTP id c95c0320; Tue, 27 Dec 2022 16:44:49 -0800 (PST) From: "Lyndon Nerenberg (VE7TFX/VE6BBM)" To: oss-security@lists.openwall.com cc: Alejandro Colomar , Michael Kerrisk , linux-kernel@vger.kernel.org, linux-man@vger.kernel.org Subject: Re: [oss-security] [patch] proc.5: tell how to parse /proc/*/stat correctly In-reply-to: References: Comments: In-reply-to Dominique Martinet message dated "Fri, 23 Dec 2022 07:03:17 +0900." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <93771.1672188289.1@orthanc.ca> Content-Transfer-Encoding: 8BIT Date: Tue, 27 Dec 2022 16:44:49 -0800 Message-ID: <1a1963aa1036ba07@orthanc.ca> X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dominique Martinet writes: > But, really, I just don't see how this can practically be said to be parsable... In its current form it never will be. The solution is to place this variable-length field last. Then you can "cut -d ' ' -f 51-" to get the command+args part (assuming I counted all those fields correctly ...) Of course, this breaks backwards compatability. --lyndon