Message ID | 20241101165719.1074234-7-mcanal@igalia.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 3D0B8E6F06F for <linux-mm@archiver.kernel.org>; Fri, 1 Nov 2024 16:58:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C9AA96B009B; Fri, 1 Nov 2024 12:58:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C4A556B009C; Fri, 1 Nov 2024 12:58:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC4C66B009D; Fri, 1 Nov 2024 12:58:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 919D96B009B for <linux-mm@kvack.org>; Fri, 1 Nov 2024 12:58:29 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 36A64402C5 for <linux-mm@kvack.org>; Fri, 1 Nov 2024 16:58:29 +0000 (UTC) X-FDA: 82738133478.19.225ABBB Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf24.hostedemail.com (Postfix) with ESMTP id 7348D180018 for <linux-mm@kvack.org>; Fri, 1 Nov 2024 16:58:23 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=Hd0ON5do; spf=pass (imf24.hostedemail.com: domain of mcanal@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=mcanal@igalia.com; dmarc=pass (policy=none) header.from=igalia.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730480262; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=SzEBSUiqX9q6QOwH+3lfpF0a+846J9p9dlVHwog/yj4=; b=3Rm4D581ERT+4MeRJqX/1bcmp7q0xYmLwfC5ZzAWnwu5ki8pV47sUoJQ4ZfVxMapWf/Pvf sG+sd6GXwoq1Ky7X3vJcP/CkuFgf1m2yi3T3SUIPdPePSrVX3Vcg+FdEJ7PQkmU64KYpav hzruRCKqsnUCv74TpPQI5mfEwjrFt8Y= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730480262; a=rsa-sha256; cv=none; b=JpVpJA7xlWorIePn/akbyYX9dE1cW/EX74tto2/wefbilkiBjKLnxlTKSpg0Xhl6l9yAWq 1nt/tg10aV4IywEPEwIFokeYWwCr4mSa6XwIenXSmlaTCHGg4Khccklvi/Vj6cKvIx+vKW G0q1yId4FCVY9pKeMq2twe3W2s5EpFU= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=Hd0ON5do; spf=pass (imf24.hostedemail.com: domain of mcanal@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=mcanal@igalia.com; dmarc=pass (policy=none) header.from=igalia.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=SzEBSUiqX9q6QOwH+3lfpF0a+846J9p9dlVHwog/yj4=; b=Hd0ON5dofM+K8sGFGpSRovkF3c FpYVxRSX8UhzNY0CqbcP+N9S74zKJ2vyl75TGIaexlVAudkVi32l77OhZLN+3H5A/5IUAo/xZUQW4 eXV4ypO5+apa0WBZJSGTeR8MJN+X45kCACF633xB4uJnmGCOZlafw+2wSn3yXxiyqQ/YnxAYuJsux E3h6yC+Xk2StrDO5W3tT3vmk/4sljHnMEGgIPSpzX/9ZYK4SnhaoOK5gwoB8PCoW2BABBcwS/8A8I Tef0giUQ9VqWFBKuSrsrAwtxOR2nCn/rmP/gGptZUZ2/Sf1EwRRpIuTwJChaa3wyMEIEcDN8ypOV0 CTQDricw==; Received: from [187.36.213.55] (helo=morissey..) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1t6uyX-000VPu-N0; Fri, 01 Nov 2024 17:58:18 +0100 From: =?utf-8?q?Ma=C3=ADra_Canal?= <mcanal@igalia.com> To: Jonathan Corbet <corbet@lwn.net>, Andrew Morton <akpm@linux-foundation.org>, Hugh Dickins <hughd@google.com>, Barry Song <baohua@kernel.org>, David Hildenbrand <david@redhat.com>, Ryan Roberts <ryan.roberts@arm.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, Lance Yang <ioworker0@gmail.com> Cc: linux-mm@kvack.org, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-dev@igalia.com, =?utf-8?q?Ma=C3=ADra_Canal?= <mcanal@igalia.com> Subject: [PATCH v5 5/5] mm: huge_memory: Use strscpy() instead of strcpy() Date: Fri, 1 Nov 2024 13:54:09 -0300 Message-ID: <20241101165719.1074234-7-mcanal@igalia.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241101165719.1074234-2-mcanal@igalia.com> References: <20241101165719.1074234-2-mcanal@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Stat-Signature: rft58jjy31ufso1r3ya3s17s38se4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lIst4owx9Bd48L//thVPEdM0XxEAxsGYFLafKw327LUv+dG7EPvrpC3gIrrE3GCPXYepfCZ6W4tqUy75ngmDM4Of6XGrHtfRlThi7GUPm6SEgU7O3NYnM00HuA7nn/yTc+/i5fariYXscf1WmGiPr+GuPjLo8Z3SkvFoYnJxApdCdkVgKxA/0EiUvCo54oSNY+/AZE+0Qe60oyj9vIipb9mmEa+xo/6qKDIwgCNXc4foWFqCAeJOx2gPB06IlSjJj553ZfLUEG+NzKfxIrRjvEH3Qia4d0zOUmGoi9pdWQPlANa6SGRFkSWXB39YxPHl+xfScUMfmL7E5HmP3Na6S/6Bvz+6/SkWnIAQS2ZmPA5YaL87LU5pWtqf21YAyB5VRwy4dCG7YMn+BTiLQrhSlySU/KM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm: add more kernel parameters to control mTHP
|
expand
|
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index a6edbd8c4f49..1ebe18ec4560 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -969,7 +969,7 @@ static int __init setup_thp_anon(char *str) if (!str || strlen(str) + 1 > PAGE_SIZE) goto err; - strcpy(str_dup, str); + strscpy(str_dup, str); always = huge_anon_orders_always; madvise = huge_anon_orders_madvise; @@ -4167,7 +4167,7 @@ static ssize_t split_huge_pages_write(struct file *file, const char __user *buf, tok = strsep(&buf, ","); if (tok) { - strcpy(file_path, tok); + strscpy(file_path, tok); } else { ret = -EINVAL; goto out;