Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3821635imm; Mon, 17 Sep 2018 03:54:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYaUi3md9sMkwvANV7w199Cb5hCCUXbbxDBzLIVOmm/MId1ouR/BO+NxtZyN62NPa536mwQ X-Received: by 2002:a17:902:9693:: with SMTP id n19-v6mr24335221plp.282.1537181660729; Mon, 17 Sep 2018 03:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537181660; cv=none; d=google.com; s=arc-20160816; b=Y/w0CQRpN4wIFOo+BEEhukONqGrFLRIjfEGn0jlXF6W0elBZFiW2T1ADk1bLMEcJu9 0TBA6jQdwgoobykD9+YX5B2dtfXyl7HKtlOjOzFcUmKHtoYyb1IT1rO9lF6MeKWqrgG5 Zne9R1ZALnwGlKvVT+Vcey9YO4gAiCDfy8koiHvmZg1QH+STv+DO8DkRmDg3QKKzL+fB hKMMDuAomNOV8i68a3+qxElDuMNw0KSUMuCDm7MpiZRQ4WZz2KikdhfL8wkaHQEuNHYM lrJBQRaEgfdjvVcicaRNA3fUNNnmfhWIKGpmdbEPTzwrfTsigk60yleqhmLNWhYbOTeb jfkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fA1nUlEz+N7M2D+tDxOVeSk+U0bT/2oDobcJWPqYKkc=; b=fDQz2CNACfaPszd/Eyq648G5iHRtduC5OSmikjbiwvCaZfPljjBc/+eVSv4MMGszMm Fe9vQoobhzscgJ4sP8JBFJ8bjCysI56ZHUMJZubV2CFju3d4pUkI1R97yehAL8sTd5js 0GZfEO52DIxabvOTEhe1upz2aUt3JTBlz5b/UjrAas7k7BSvkN0Il+wSsHwpdEU+MSl6 seQSza7Es5IiV5ihQX9Ac+lyVfvSPOhidlcWeJ3sme4IvkRGBuIjibKmtV5APqsPfBma FMV9ZWo20Rk/rpFWr/zAaEs6WSJFEemB2trlCXKqP0o1LAB0mORUx8q83JYxDsPQzrK0 bWpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YeNZ+zPn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5-v6si16891378pfk.2.2018.09.17.03.54.05; Mon, 17 Sep 2018 03:54:20 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YeNZ+zPn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727168AbeIQQUu (ORCPT + 99 others); Mon, 17 Sep 2018 12:20:50 -0400 Received: from mail-yw1-f66.google.com ([209.85.161.66]:34533 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726894AbeIQQUu (ORCPT ); Mon, 17 Sep 2018 12:20:50 -0400 Received: by mail-yw1-f66.google.com with SMTP id y134-v6so5236368ywg.1; Mon, 17 Sep 2018 03:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fA1nUlEz+N7M2D+tDxOVeSk+U0bT/2oDobcJWPqYKkc=; b=YeNZ+zPnD0T6T90U4afBQVGaCVmKknBTAuu6PLvrr/mLBYMEZAyLEW4FpJHoccLMdt CZnIeBp6Xz7cGVhp7CzBYD+FYTr1juw7gv/kqoqVOTqmvETtZoFW6sxMEGUCURPhlP3F uKFMBliPEcsrO/y9qCp+rcaVuo+xnVWKyyitdTPz7laHeVk7/LW8Nqfgcq3T5gC+y14J yjeo44ksjnRHuUaDYnLaXyoh+45TK5iwNbRVfJNEeFhlHt7prr/t6tWJpBfMyPvNrv/V BpUVP0AMC8bdLFFECKeYk8redJoPiNi61311lqdB2vvxt5sJ+x9A8V0eyxRReTJGE2ZP 5M7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fA1nUlEz+N7M2D+tDxOVeSk+U0bT/2oDobcJWPqYKkc=; b=JhhzcyXdctrj+zAbKvEjq1NQHTqOJdSxTrmoGHFZpTfjyzS85LFOj35obvhR89B+4u rrS9gmBLup8OgP5sJ436gw7eRgyGb9wkqRpOW/qXb41Wkbf84/Z7evf8vAbfQx5NadF9 hI8mMOx1LbZjTvl0hH1jeWuXw4XMpnZUvM+D1GB9Lgnb1G1lb8cF/oV2wFU/GVdXm6cC E1Te6XZMQXAOW71P06/WLQ1fR67NAGFwZWRNsTWAAT9uWt9XlbwQyQAR/QEOqo1Cne1r jPqINg9pUq97EB1Ei1KLKVk9ccrrmfCr5UEYnyGyaFvoAgQLlPMSbDWQ8PT4p452GfJ/ b8uw== X-Gm-Message-State: APzg51CwlfwQExUMAG08RsjHQiUihCCpx5qZWSZ3dlmygd09HQVsm7Y/ yjxMdRuebUrOZYwpqWNplyE5Ft45ForEYgexPQw= X-Received: by 2002:a81:ac09:: with SMTP id k9-v6mr10119806ywh.409.1537181640112; Mon, 17 Sep 2018 03:54:00 -0700 (PDT) MIME-Version: 1.0 References: <20180917091602.21531-1-nixiaoming@huawei.com> In-Reply-To: <20180917091602.21531-1-nixiaoming@huawei.com> From: Amir Goldstein Date: Mon, 17 Sep 2018 13:53:48 +0300 Message-ID: Subject: Re: [PATCH] fanotify support save thread id To: nixiaoming@huawei.com Cc: Jan Kara , linux-fsdevel , linux-kernel , Steve Grubb Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 17, 2018 at 1:02 PM nixiaoming wrote: > > Added FAN_EVENT_INFO_TID to select the thread id of the event trigger > Maybe "to report the thread id of the task that caused the event". Also in commit title, I think "reporting thread id" is more to the point than "save thread id". > Signed-off-by: nixiaoming > --- > --- a/include/uapi/linux/fanotify.h > +++ b/include/uapi/linux/fanotify.h > @@ -18,6 +18,7 @@ > > #define FAN_ONDIR 0x40000000 /* event occurred against dir */ > > +#define FAN_EVENT_INFO_TID 0x02000000 /* event save thread id replace tgid */ > #define FAN_EVENT_ON_CHILD 0x08000000 /* interested in child events */ > nixiaoming, You misunderstood me. I meant that you should add support for flag FAN_EVENT_INFO_TID for the fanotify_init() syscall, not the fanotify_mark() syscall. See this commit from Steve Grubb for example of adding new opt-in behavior to fanotify: de8cd83e91bc audit: Record fanotify access control decisions BTW, Steve, did you ever follow up with a man-pages patch? Thanks, Amir.