Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1045261rdb; Fri, 9 Feb 2024 08:41:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IG60BMzFmGbYj52koixR7RhtfU1BJGOaSSbi7hS/iWuQXqeGqlDZH8BS/lgU5SDqX2fpxsI X-Received: by 2002:a17:902:6b8b:b0:1d9:6895:81b6 with SMTP id p11-20020a1709026b8b00b001d9689581b6mr2117265plk.16.1707496890026; Fri, 09 Feb 2024 08:41:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707496890; cv=pass; d=google.com; s=arc-20160816; b=EOe61ooIkl7uCGXZBEaUSZ3aDx7eQ6S7cTXsy4VzYrO8sD7ejga4Z0ddoGrDHlibzT mQCwLYndAkGI30Oiq3GA9Iv3hg090hTlKsgiZYIncWQ4Tct7hx1JkGiKGzx5xWH0rMPa rvV/izUCZp/BJjBWUewEgPBmguqTIyF0n3MM1YjFQ/D8tOIEIxoCFMa97X8cL6aPQHoI zAGSsRxX0WrcfobX4tP82CeVaAdyx1zj/mykeR2lw2C/f0LkL6FGtUgof3hqI4axiSWI S1Pg2VAHnNhHelY16vNVOVuwEHxTBLdlXIv4xf4Z/nMqn2QAA2zvZSEMKqFbb0rnW/Zp 9FcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5G421tyom6sWcG+XY6TfN5lZaMdP8BvN/8TI1sJrx5Q=; fh=QDM80FVRguCOF9HbxpZNzhLP1Djvja5Sjmj+Fr91neo=; b=f/0C2tavnKFRxfBd2FfSMf1SVZl4/gECZQ3rK3d+zQuyP7w8rJfyctXuCG/YTBYwa5 OmsuIt/VY/lyhF8Ya3lu3QmHZpn2oAemX2DSyiLIdtdsEouO2Tcx+OQFrqfFcZ1PcfEB iwyNOMEc6/9va0IV1P0Vobo1f9PtZDPG4eBla7cOiYR4qPdbk8AGDucDBILAIqkfp/LG kjZOahD0NEa18e9SO0d7xz5z+Az/ELG1KJ5CQdjiHct/PaPlGeVhsJ0q9Fk7PtaNK9Kt g6cQ0h5rX70kioUhl2RIDM1jKn7U5fDcrjQiELoekEyPB8txrhPUV5SIlVmrnouqIThu 1+pg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=euNl0Jo4; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-59628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59628-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com X-Forwarded-Encrypted: i=2; AJvYcCXQETe1KzacEDf6nBll9C9vCJ2V2l3hVmMI9386Dvc7GFhqZpD5qIJAy2e5zFsS/VFMcpb0I4PJB5Ek42IL0R5EJvZbsvrGVN7b5wjO+w== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i19-20020a170902eb5300b001d99acc35afsi1867389pli.192.2024.02.09.08.41.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 08:41:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=euNl0Jo4; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-59628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59628-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A7EB9287EA9 for ; Fri, 9 Feb 2024 16:41:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB2697E78F; Fri, 9 Feb 2024 16:41:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="euNl0Jo4" Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE3117BB08 for ; Fri, 9 Feb 2024 16:40:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707496859; cv=none; b=oMOYoHWEnJOrrKZZL9co5+kCPoxiFsYNAvc85b3RAgcBRpdmlm2hfZtVlQYOVjZ/tfRIxJkrHPerwW3giwVbHDg2dxDDXny9aKf5wSTTmxHiw1gg/Q5iPAcBPgjav7Ey98XQDQu2jiCXKKur0JKkyxnRV7Sf/xwnW9A4DWf1zmw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707496859; c=relaxed/simple; bh=TbG+/HcM8WovU8Lw/yGM7zI7b8AZCr+y1GKAEztebFU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZNdy6kAbfejbfSSVw2IOaaFIXcp1Bx5zjBR9ZakV2sqbDG+uG1ir5KAL58mI+9mIqz9Ku26EuNHcBH+JUyoXtP+a/qHcC9Gwhfuvkq3Mp1rCvTI78xnlYAd1z+sRh5ZlLUvU9rQPFKVp0Z/UwztwstpPBkt6DU4iDb5ffZPwSwA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=euNl0Jo4; arc=none smtp.client-ip=209.85.208.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2d0512f6e32so15802481fa.1 for ; Fri, 09 Feb 2024 08:40:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1707496855; x=1708101655; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5G421tyom6sWcG+XY6TfN5lZaMdP8BvN/8TI1sJrx5Q=; b=euNl0Jo40ozoUCp0+RdyrZsGQlvmWUv/tKK0s/bLpHeWq0Sp0aeyAhh+Fd2Qn/GUJQ Og3zVb9FFc3xuyVQGU/xSkrOXJ7R0tl/D98dnvGMT3HHLsIBnypx+ke4KEXIlvNsL8Ff 36zUhLBd2Lccea9WRbvlMRVlLsWmCpu/AFCWJAjqvBvU8fv34MrMD2YZ/TEY2FbOhUvx HFV47bgEZmd4J+mvYjEMtutHRtvN2FwITLdF7A/74xMJmdLr1raw/Ah6+hKtzj/cKjf0 +QmKSNT+MOA6upt/nt4zT/EuO5HZnotcmLiJnCszjmpd6GN7i9aBnkZsn5xtCnWlxTcq QAaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707496855; x=1708101655; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5G421tyom6sWcG+XY6TfN5lZaMdP8BvN/8TI1sJrx5Q=; b=wAWm0LPUqNbmaxoUDydGvS84rmNmZD70fta5n9uvH+kn//WNeHSLpNNVkNI1aIKLeF cQg9pkXJdSgguLvuwZ60iU8P//4x8Sx/UQxXdOVtGLgvSFxKAEu9HEkNpITzraOQpNor M1ypnj8F4hj3wi8OKyUZpUE2POfw6SJ6HUuVpQEV6k0H71PrOcWLRJdn/7nKeXlvdyCN aAe5R11tnF6ldrNraYMSfBPa0ygfpzMTXLl60IWuC2e9w+WcPZq+iJ2RsEiyk/jCDIV0 NBykMg8MpjCFZR/EXAdaVEn01jJgALBkFeg0dfaxrm6+XmJRD04RWsIE8fIM6kGC+kDp 8oDA== X-Gm-Message-State: AOJu0YwmRy/arD99TGE1z+MKTBUS8CPWSJSg1NDHyZvI5PHoNfwMwhRA go43KaZhYnDL1ad+s9noxxgZcj/+/ZwRETisPdTGXk/1fC8PqEDK+uHW0Tf4k7aEqIADjjBD4F6 X X-Received: by 2002:a2e:a70e:0:b0:2cc:c6e0:fbb with SMTP id s14-20020a2ea70e000000b002ccc6e00fbbmr1505970lje.20.1707496854729; Fri, 09 Feb 2024 08:40:54 -0800 (PST) Received: from raven.intern.cm-ag (p200300dc6f267100023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f26:7100:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id tl27-20020a170907c31b00b00a3bfe97fe27sm477724ejc.218.2024.02.09.08.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 08:40:53 -0800 (PST) From: Max Kellermann To: linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v2 10/35] uprobes.h: move declarations to uprobes_types.h Date: Fri, 9 Feb 2024 17:40:02 +0100 Message-Id: <20240209164027.2582906-11-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240209164027.2582906-1-max.kellermann@ionos.com> References: <20240209164027.2582906-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit By providing declarations in a lean header, we can reduce header dependencies. Signed-off-by: Max Kellermann --- arch/arm64/kernel/signal.c | 1 + include/linux/mm_types.h | 2 +- include/linux/uprobes.h | 10 +--------- include/linux/uprobes_types.h | 25 +++++++++++++++++++++++++ kernel/entry/common.c | 1 + kernel/trace/bpf_trace.c | 1 + mm/memory.c | 1 + 7 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 include/linux/uprobes_types.h diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index 0e8beb3349ea..8990975d0c37 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index ed764511bc23..54caee378e77 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index a76155cf8ceb..6ab950cce8a9 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h @@ -11,6 +11,7 @@ * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra */ +#include #include #include @@ -94,12 +95,6 @@ enum rp_check { RP_CHECK_RET, }; -struct xol_area; - -struct uprobes_state { - struct xol_area *xol_area; -}; - extern void __init uprobes_init(void); extern int set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); extern int set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); @@ -137,9 +132,6 @@ extern bool arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs); extern void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, void *src, unsigned long len); #else /* !CONFIG_UPROBES */ -struct uprobes_state { -}; - static inline void uprobes_init(void) { } diff --git a/include/linux/uprobes_types.h b/include/linux/uprobes_types.h new file mode 100644 index 000000000000..0ce0fe3801ea --- /dev/null +++ b/include/linux/uprobes_types.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef _LINUX_UPROBES_TYPES_H +#define _LINUX_UPROBES_TYPES_H +/* + * User-space Probes (UProbes) + * + * Copyright (C) IBM Corporation, 2008-2012 + * Authors: + * Srikar Dronamraju + * Jim Keniston + * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra + */ + +#ifdef CONFIG_UPROBES + +struct xol_area; + +struct uprobes_state { + struct xol_area *xol_area; +}; +#else /* !CONFIG_UPROBES */ +struct uprobes_state { +}; +#endif /* !CONFIG_UPROBES */ +#endif /* _LINUX_UPROBES_TYPES_H */ diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 88cb3c88aaa5..364ea38c868e 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "common.h" diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 241ddf5e3895..e74430389877 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/mm/memory.c b/mm/memory.c index 7c3ca41a7610..68abe5dccb5b 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #include -- 2.39.2