From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 866B4C83F03 for ; Fri, 4 Jul 2025 13:50:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 172756B804A; Fri, 4 Jul 2025 09:50:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 05B196B803F; Fri, 4 Jul 2025 09:50:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E3E8B6B804A; Fri, 4 Jul 2025 09:50:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id CA09E6B803F for ; Fri, 4 Jul 2025 09:50:01 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 213C5B7EF0 for ; Fri, 4 Jul 2025 13:50:01 +0000 (UTC) X-FDA: 83626715802.14.E4BA9B3 Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf23.hostedemail.com (Postfix) with ESMTP id 6EB2D140006 for ; Fri, 4 Jul 2025 13:49:59 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=QeBTJcLv; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1751636999; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+/PJzJRgOx92wC1oE9nsQSpPNj64N/k61pJKPgbG0bU=; b=SNU278FGxI51LYobZpg1IWI9xkt6IR0HDB8emhs5XgNE++g/IUgUN5s/H5QafIVZG046Lv 65L8r6hS03IGoYPW43k9oVYm2Sv+WvxOmUN4n5CeF0E/131UZkBwe6ARkpvtg3srl8XJ1j ML1CsYMgwOFDJ+CU/XhpcTebxy+hwB0= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=QeBTJcLv; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1751636999; a=rsa-sha256; cv=none; b=0hvOq5EGP3ahF9NP0xu7Qn6GErz5A/DLwhHCWFYKdMqDS+u5finmdiDMgckKmgtZUzOoyN +Knjh4buyAobGQrjH3ikHcOvP1iZHUVyCOKoBbOhJR58NFNYD+kxVd6oCjgT3ogZGomGrm Rm1USXUK92AnA6+JmYi16mbbYvm2CS4= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 19EDE46973; Fri, 4 Jul 2025 13:49:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 047A4C4CEEB; Fri, 4 Jul 2025 13:49:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751636998; bh=vyVIGCtc0jVROOiaoRDc63+XloT/k7Y60usHpVt467Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QeBTJcLvOcdLQq7prI/RVYQdCGmN/+LTcJOHYLGUX8iY+VcLj1yRa98RNlHOzXWEc ahn08iR5xHokPzlcUIAQ73+776hKf0+qcyFdT/8o5hlTSDaQwAugpnB5JtC3IAobcX +sv9y+8AF034fxCW04J8WnEoYTtST/7KDtzaw5uONIaj515sxtShlw5M70yHDGXuQY o+wESRph61IDDV5a41OwvMIOX8gkyBtSS/wldo76STb0T8DALcWfrKpxx6fy/tDwji KJt6L3V/XNSl5c40uACeUCc3k/fm9uDz3F+fVnpGfPKjRjBJ/DAPUPDKbjSuYnuedr PJBDR6Xylg8Pg== From: Mike Rapoport To: Andrew Morton Cc: Andy Lutomirski , Borislav Petkov , Daniel Gomez , Dave Hansen , Ingo Molnar , Luis Chamberlain , Mark Rutland , Masami Hiramatsu , Mike Rapoport , "H. Peter Anvin" , Peter Zijlstra , Petr Pavlu , Sami Tolvanen , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org, x86@kernel.org Subject: [PATCH 1/8] execmem: drop unused execmem_update_copy() Date: Fri, 4 Jul 2025 16:49:36 +0300 Message-ID: <20250704134943.3524829-2-rppt@kernel.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250704134943.3524829-1-rppt@kernel.org> References: <20250704134943.3524829-1-rppt@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 6EB2D140006 X-Stat-Signature: q69nym6w4qas5qdmj7n41wbhgrgnqhe3 X-Rspam-User: X-HE-Tag: 1751636999-533486 X-HE-Meta: U2FsdGVkX19+kqZ8wzdY30bzxNsgiybqFs91WBefZ4Va1gS9/DK69VBoi4y6ui5fecqQGX5JBPdwfY87yubQuK4aoT3LrxQTOQuimy7OC28KYcThaswdkfZH9GANXt9yt/lswbjC0zkOTA7iTnAuSk4ndOPiPdjcD3DfycaAcSz3h0l8+MV7Dm74byGcWmsTj9KbOjt+gdHPpazImqB9z5wg4BM3bTZoEGrKNhNRTkiRttj5YBqjcOQ13GwjFddh+lC+MCKjas5cvfj79YA5h0EGSvs10t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-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: "Mike Rapoport (Microsoft)" The execmem_update_copy() that used text poking was required when memory allocated from ROX cache was always read-only. Since now its permissions can be switched to read-write there is no need in a function that updates memory with text poking. Remove it. Signed-off-by: Mike Rapoport (Microsoft) --- include/linux/execmem.h | 13 ------------- mm/execmem.c | 5 ----- 2 files changed, 18 deletions(-) diff --git a/include/linux/execmem.h b/include/linux/execmem.h index 3be35680a54f..734fbe83d98e 100644 --- a/include/linux/execmem.h +++ b/include/linux/execmem.h @@ -185,19 +185,6 @@ DEFINE_FREE(execmem, void *, if (_T) execmem_free(_T)); struct vm_struct *execmem_vmap(size_t size); #endif -/** - * execmem_update_copy - copy an update to executable memory - * @dst: destination address to update - * @src: source address containing the data - * @size: how many bytes of memory shold be copied - * - * Copy @size bytes from @src to @dst using text poking if the memory at - * @dst is read-only. - * - * Return: a pointer to @dst or NULL on error - */ -void *execmem_update_copy(void *dst, const void *src, size_t size); - /** * execmem_is_rox - check if execmem is read-only * @type - the execmem type to check diff --git a/mm/execmem.c b/mm/execmem.c index 2b683e7d864d..0712ebb4eb77 100644 --- a/mm/execmem.c +++ b/mm/execmem.c @@ -399,11 +399,6 @@ void execmem_free(void *ptr) vfree(ptr); } -void *execmem_update_copy(void *dst, const void *src, size_t size) -{ - return text_poke_copy(dst, src, size); -} - bool execmem_is_rox(enum execmem_type type) { return !!(execmem_info->ranges[type].flags & EXECMEM_ROX_CACHE); -- 2.47.2