Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4578929ybb; Tue, 14 Apr 2020 10:00:07 -0700 (PDT) X-Google-Smtp-Source: APiQypLOzba0vf80YeM99+d8TaTSpgCsF4gud6fJhg8x6kNmkTctJZXADObJ8/FtmaivGArNDiRg X-Received: by 2002:a17:906:4c98:: with SMTP id q24mr1098152eju.140.1586883607543; Tue, 14 Apr 2020 10:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586883607; cv=none; d=google.com; s=arc-20160816; b=ZPNTFhYe6dFbV3UCKLkteDzgD32tHg15WQvl5bcZ+Pc5D9nnvpQ3AnceOs5gjn8cmr BJGHtomxx6nEaWqRikMf3HDOZmCP3QelZU+UfnnAUhDF+BG+UsyVSoVYkH1wicGQcvSy CjSOhTYbqNO2FHHZnsFeS0tB14+i2AjmYsOazkh5UemXxTVu6iYcbuKX+aKTea+ddZ06 TXhnFbwhwptFuUVnBQs7kzuBP/4bV6KiwaR1oTg5OlKY3zsU9acmBj8exTYo+AYBfjdK Z7CRBt8oNYwnqwVkOrBLHgc83XI/QAfp5fvBdZcpucDJDdAfMElg1eVhGUp4sFs53mHT xI/Q== 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 :dkim-signature; bh=XyU5kww4P4R7pwlv5Ojw2WToG2b8YcHPfP6NtT0jDgI=; b=bES8O92O7+Ova4y4qG6oCpc1kSD2mj+6y+J5swWlMnZn0KZBsGCKAfvnrGf5+giZkt KM5sRMMuykrhE85DFrilRBAeU06ohWz/lrp/Ib8R4YVR3fxqlltuyCydAb7ulbeUqOAq I7Z5z1lcydjdhRNZk85EOKd93ERyxP6ogdDI87qFFVhLz1UWTaxYWnW4ChdwK2egx15X qwUUIdKEMfdABykqSGnXrnWmcPbLeul99g5jLvOWTZZ1fp5N5sikN0LN4GY0D6aY9kzp TgfK77KAkiqXIuGphgjp/gduqt4nzrt2DiYVp9FeMdv+WXyRTLegL/Nb6rwDKieGj5kD RlFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0hDy+lq5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k17si8155103ejj.219.2020.04.14.09.59.43; Tue, 14 Apr 2020 10:00:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0hDy+lq5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440470AbgDNQvV (ORCPT + 99 others); Tue, 14 Apr 2020 12:51:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:55354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440406AbgDNQtV (ORCPT ); Tue, 14 Apr 2020 12:49:21 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CEC8420656; Tue, 14 Apr 2020 16:49:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586882956; bh=/mHARHeWczRi1L5tDKAwMG7VRaHqjAqAAZDBdAFAoJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0hDy+lq50lzxBnb1keJMR5ZhFNyRO3L5S+NZ2mJbZ9CvgWUzIy8B54nSUvEB+alk0 Re541EWfc0j6Tb16rBoCNcTAebnm8RfcqirAPj0KXXFfTjMp18BAokdGxigUE8Fe0P laYaWpwb1nCHHo8BEQoRQoRLm76mv1dm0gLvdB8k= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , Christian Brauner , Tejun Heo Subject: [PATCH 05/15] tools headers UAPI: Sync sched.h with the kernel Date: Tue, 14 Apr 2020 13:48:44 -0300 Message-Id: <20200414164854.26026-6-acme@kernel.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200414164854.26026-1-acme@kernel.org> References: <20200414164854.26026-1-acme@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo To get the changes in: ef2c41cf38a7 ("clone3: allow spawning processes into cgroups") Add that to 'perf trace's clone 'flags' decoder. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/sched.h' differs from latest version at 'include/uapi/linux/sched.h' diff -u tools/include/uapi/linux/sched.h include/uapi/linux/sched.h Cc: Adrian Hunter Cc: Christian Brauner Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tejun Heo Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/uapi/linux/sched.h | 5 +++++ tools/perf/trace/beauty/clone.c | 1 + 2 files changed, 6 insertions(+) diff --git a/tools/include/uapi/linux/sched.h b/tools/include/uapi/linux/sched.h index 2e3bc22c6f20..3bac0a8ceab2 100644 --- a/tools/include/uapi/linux/sched.h +++ b/tools/include/uapi/linux/sched.h @@ -35,6 +35,7 @@ /* Flags for the clone3() syscall. */ #define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */ +#define CLONE_INTO_CGROUP 0x200000000ULL /* Clone into a specific cgroup given the right permissions. */ /* * cloning flags intersect with CSIGNAL so can be used with unshare and clone3 @@ -81,6 +82,8 @@ * @set_tid_size: This defines the size of the array referenced * in @set_tid. This cannot be larger than the * kernel's limit of nested PID namespaces. + * @cgroup: If CLONE_INTO_CGROUP is specified set this to + * a file descriptor for the cgroup. * * The structure is versioned by size and thus extensible. * New struct members must go at the end of the struct and @@ -97,11 +100,13 @@ struct clone_args { __aligned_u64 tls; __aligned_u64 set_tid; __aligned_u64 set_tid_size; + __aligned_u64 cgroup; }; #endif #define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */ #define CLONE_ARGS_SIZE_VER1 80 /* sizeof second published struct */ +#define CLONE_ARGS_SIZE_VER2 88 /* sizeof third published struct */ /* * Scheduling policies diff --git a/tools/perf/trace/beauty/clone.c b/tools/perf/trace/beauty/clone.c index 062ca849c8fd..f4db894e0af6 100644 --- a/tools/perf/trace/beauty/clone.c +++ b/tools/perf/trace/beauty/clone.c @@ -46,6 +46,7 @@ static size_t clone__scnprintf_flags(unsigned long flags, char *bf, size_t size, P_FLAG(NEWNET); P_FLAG(IO); P_FLAG(CLEAR_SIGHAND); + P_FLAG(INTO_CGROUP); #undef P_FLAG if (flags) -- 2.21.1