From patchwork Sun Jul 12 17:42:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Salvaterra X-Patchwork-Id: 1327575 X-Patchwork-Delegate: rsalvaterra@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=vmCZKfTT; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=VNGTGKZR; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B4Z0N3th9z9sRK for ; Mon, 13 Jul 2020 03:44:20 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=myXiufbWl6qVmKiEX8fUqqeQDgfOfLFpYpu9Hw56fAA=; b=vmCZKfTTeUW55WQ/Fw1dUp/4Qi mL6WLSaRNWvrkJB8q/pn39XvleQrhRe0W2pqUgnObS1b2vzqQGv+k0zyrA/yBwZ/6W882+SozEgd3 GFimpm0ZytfTaRkgpgeyU8yFJ+tSjJub1VTNqohHjX1b0umBfuSga2TnzHUD4XhEu6Ov1CVWYSbL7 h6y7xAjTEmiy2I291Qrnw1+zX894RnR0cd8iQJ0bF2RfhF/WLb70I1gnfu7+Hh9YM1JEL9FpZAl05 Bgda/x4hfR9VVsM8GoDS43o5QgM7kylclstDnvcStgncfwUuinbGPIZ6kle3sfFjpq93WItdoTaxt maUFIkpw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jug0K-0001QH-N9; Sun, 12 Jul 2020 17:43:08 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jug0H-0001Ps-C0 for openwrt-devel@lists.openwrt.org; Sun, 12 Jul 2020 17:43:06 +0000 Received: by mail-pj1-x1044.google.com with SMTP id ls15so4998298pjb.1 for ; Sun, 12 Jul 2020 10:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OU8pZ8PmJRkGdNEGPt1w2xnXwQqes8Onn83BBrnwOVs=; b=VNGTGKZRVzdfbwYM/7JEPZbTbCif9z24xyObpytUVhgrPL0FkwxYFD4aQvwRnQMsvB GuRJcqgL6jeBBXPAR1EDWMsAPqVUWzW5E1TdfJnaOuFJF+E2pdk/3v38GEDjA0RPt4VP JdSzxtg/6GhBW95bvzHAuE7liEwOhNRLX10f2yscRZoKdb/e5bsVlNfhFSWLJ89PV39n wgGbXb8GTMEF4c75g5KqMI4xcFo9tyneuvyzqlqb3qyuGUv02w4BYcKfSO82NZYVnnmB sMwOjpZFKVvW8n4pSSaQem+fEl0swIarisinodPaxgAYBNHxJSx3D7N/rQAO6j7WZZ6Y K28Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OU8pZ8PmJRkGdNEGPt1w2xnXwQqes8Onn83BBrnwOVs=; b=I1SmFofAXbVG7pVQ3Xyl2dl3vdE+qPiInd1JRmYp7NLlmySReObXvv3y0a4QcRV4kP qHENZosxRGBIikhPl2vch7t6RBhp6P7p4JKvZqTuvQvFpB0l9Pd6yyIiP0iyjTvaaROs ub9YmqHS9xbzTXTp0yU8Bn1y7EP1tQOJnTMjmEJehx7DrIIERFxYD+MqFXvXH8CS8HX1 9FsqKZXDuKt7zHpDFbhB70QqW9MNS8RzLDGK17V6gBxpb+xL8JgYl02aaEHcA1sFTrrM G4aFpgjwbYTmsVhBzVShMOUKgfYcT+vmaV6HShf1O9sLdbzXSGVZnSqzlgc9YRaNQgVI hQMg== X-Gm-Message-State: AOAM532qmEltVKaFjMKECnuhwyOi16332Zj8Sholz6cawIA1S5TXqRPf G4MZ88cebR7ap1eDSayHrmOAXfo= X-Google-Smtp-Source: ABdhPJxgLEJp06XTUvRe3jAt+XfIPl2x8MXVqAEf6sogQpqmTMdaINH1MBKmWTzkvvouBstceHMt8w== X-Received: by 2002:a17:90a:db4a:: with SMTP id u10mr17505699pjx.67.1594575783472; Sun, 12 Jul 2020 10:43:03 -0700 (PDT) Received: from presler.lan (a95-93-116-221.cpe.netcabo.pt. [95.93.116.221]) by smtp.gmail.com with ESMTPSA id k63sm12362148pge.0.2020.07.12.10.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2020 10:43:03 -0700 (PDT) From: Rui Salvaterra To: openwrt-devel@lists.openwrt.org Subject: [PATCH] procd: don't let the user choose to mount /tmp on zram Date: Sun, 12 Jul 2020 18:42:49 +0100 Message-Id: <20200712174248.1479-1-rsalvaterra@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200712_134305_437426_E8BC03C5 X-CRM114-Status: UNSURE ( 9.22 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1044 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rsalvaterra[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rui Salvaterra Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The /tmp directory is mounted as tmpfs. The tmpfs filesystem is backed by anonymous memory, which means it can be swapped out at any time, if there is memory pressure [1]. For this reason, a zram swap device is a much better choice than mounting /tmp on zram, since it's able to compress all anonymous memory, and not just the memory assigned to /tmp. We already have the zram-swap package for this specific purpose, which means procd's tmp-on-zram is both redundant and more limited. For the time being, don't allow the user to select this feature. Follow-up patches will remove procd tmp-on-zram support altogether. [1] https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt Signed-off-by: Rui Salvaterra --- package/system/procd/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 3b88c76144..78b2450a04 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -90,7 +90,6 @@ config PROCD_SHOW_BOOT config PROCD_ZRAM_TMPFS bool default n - prompt "Mount /tmp using zram." endmenu endef