Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6024747ybe; Tue, 17 Sep 2019 18:21:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTRReQViEFY1Sk0g/DG3iA9neRhZqFuvo6+Ci/OuEWoFDLxSYGfqtUeq7eTWmyU5JaW1av X-Received: by 2002:a05:6402:1f4:: with SMTP id i20mr7768272edy.137.1568769679342; Tue, 17 Sep 2019 18:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568769679; cv=none; d=google.com; s=arc-20160816; b=0o7xeCH1u2bfeZzuqoQ60TCJ2vmqDvU1HOEgrnwnfHwRlTue7DIb4ghrik0glng+NQ 9zPWKBtXUpoEcHXLQQugZT3jSpKedYPIGUF5bnUuXv1pDXD92woqm6tmeDOa2N3aQQ5e UmgXBvGxdBiJ0pGdE4cniTiid8x5ayU2LdYedOojes8srX038lIkv9rZ3Pku0l5qB6FK G4+VBlDktpy4OhS+8kJlNNV41vivgRuhZdJ/UO/x7VXcmgnbfKLkvd2iTseL/9MvZ5ZO aeYY9ylfeKRYSSwpzvOVZFzxUjcud3B6K8rHOXX+nUXN6POhYMWhKed2ZDlgBs7cXgRq SVfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3aN9d+Fe6syiEDInZ8ED0LW4p8PW0rT4aXtj3AdNGuE=; b=T9C4rnAe5OHGbaYnigjlPL3Ws9IjPRjPia60Eb0SYJ9VSyr7TsyG6yfE5sA4OWHN9W 8E47Au4M4mj5pX4Oug26b5XDjea0vjhJOZX/zO5tO/WzrEEhRQptajN1rnVOGcDSXMif pfDBiQz3fUr9/Zz0Q7+gute/vhVNd8nWHckbDWAu9jyHx7mSUVg+tlWNltZOlPORkKq8 Swv4qVrsgJlZ1Y22CUrZyIY70PUOID9MmNrr/KE2jFtbCXp2heHhN9iZTZQmMu1umhVJ kQEMNqGaQvldJG8UAUgC06Zko3H+Ph1RFQIKR/QtPd5cu2LDnCQuBEv9f9eoCSCr8Bao NY9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18si2387749edq.209.2019.09.17.18.20.46; Tue, 17 Sep 2019 18:21:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726362AbfIQN5G (ORCPT + 99 others); Tue, 17 Sep 2019 09:57:06 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:60408 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726151AbfIQN4o (ORCPT ); Tue, 17 Sep 2019 09:56:44 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 640E3BA41774567C9DD2; Tue, 17 Sep 2019 21:56:42 +0800 (CST) Received: from huawei.com (10.175.104.232) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Tue, 17 Sep 2019 21:56:33 +0800 From: KeMeng Shi To: , , , , , , , , , CC: Subject: Re: Re: [PATCH] connector: report comm change event when modifying /proc/pid/task/tid/comm Date: Tue, 17 Sep 2019 09:56:28 -0400 Message-ID: <20190917135628.3054-1-shikemeng@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190916211008.ipqe3j7s22aannta@willie-the-truck> References: <20190916211008.ipqe3j7s22aannta@willie-the-truck> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.104.232] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org on 2019/9/17 at 5:10, Will Deacon wrote: >The rough idea looks ok to me but I have two concerns: > > (1) This looks like it will be visible to userspace, and this changes > the behaviour after ~8 years of not reporting this event. This do bother for users who only care the comm change via prctl, but it also benefits users who want all comm changes. Maybe the best way is add something like config or switch to meet the both conditions above. In my opinion, users cares comm change event rather than how it change. >(2) What prevents proc_comm_connector(p) running concurrently with itself > via the prctl()? The locking seems to be confined to set_task_comm(). To be honest, I did not consider the concurrence problem at beginning. And some comm change events may lost or are reported repeatly as follows: set name via procfs set name via prctl set_task_comm set_task_comm proc_comm_connector proc_comm_connector Comm change event belong to procfs losts and the fresh comm change belong to prctl is reported twice. Actually, there is also concurrence problem without this update as follows: set name via procfs set name via prctl set_task_comm set_task_comm proc_comm_connector Comm change event from procfs is reported instead of prctl, this may bothers user who only care the comm change via prctl. There is no matter if user only care the latest comm change otherwise, put setting name and reporting event in crtical region may be the only answer. I'm sorry the response to (1) concern is missing in last mail. This is a full version. Apologize again for my mistake. Thanks for review. KeMeng Shi