Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp432077iob; Wed, 18 May 2022 05:29:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7+JzPn0jWjwiZUq7K3XuaTtm+e7gRffevTnXRom8tFol+IgmkerESkC0eT73GF+jF2Vq1 X-Received: by 2002:a17:902:dad1:b0:161:9abb:fb75 with SMTP id q17-20020a170902dad100b001619abbfb75mr10496760plx.135.1652876988816; Wed, 18 May 2022 05:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652876988; cv=none; d=google.com; s=arc-20160816; b=DIAUdoN0AxPKyL+NpQn6ax0tRyNixtMGpYbnJdGDzGWNlLy/9iMIbATjaS8P07XYPD cW3UUlzAtJnA0U4Yau+/hJnn5tgRbzh9dnJXGZA9imBKK+QCV8DGxKt3jt2YV0kWsdxW pEiiqMtTw2CtZadciFGnkWycGWzPGHLA/bC8PYNgOCXM6FBfeha27aQHgZHUAMSHacbN lESKh1UgxNKq0hdmemPGZbXRRhaoFOVNAX2Tn7RtfRni/EewtOGLutvV6euRJo3e9yw0 xsvnF6iVpS3DShtEbnkNEo4qsRz81+9WSn3D2535Gwm++RnZYjDGXTPxVSZrAGJio/tE e6Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QJsVQym+xL0e9ZE8cs4o3sRq3C2RnAjl/FhXvupRFQ0=; b=T6PUXMsPRn2OcBj1M5dMtD5v9Uz48Mxz63n8xm8NPiByM0VKF+PeXYboOWnkhnKj9i 5hvKkfViPdctGoKM8o+8D6aTEOqlIzILTUEGt4F8wMrc9WpFQfWH3/1QNPaY2fAuSlzG xNIx76O8h4b5EpJg6Muqcsr+Q0oa6H/rY1ShJXOTzuG28wtcFqokDWx6qVFs/+e1vjm4 +jBQSTS1xgNAa0ZXfgVvSnM492fykvjMQQ9GdWwtRsxZ4WTXHCXNPszPV1diiImlqbQQ NOqK+IlK4WDgziAaEJSSXpyXoKnHnoT7CDDFRjJ83jmI54qX5OPmuHMz9RILrKwJE6LP 6RbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="D/Bh+Gmz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t16-20020a17090ad15000b001deb8c89766si5576288pjw.30.2022.05.18.05.29.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 05:29:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="D/Bh+Gmz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 057D61994A5; Wed, 18 May 2022 05:28:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236679AbiERM15 (ORCPT + 99 others); Wed, 18 May 2022 08:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236482AbiERM1Q (ORCPT ); Wed, 18 May 2022 08:27:16 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38AE1AFAC7; Wed, 18 May 2022 05:27:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=QJsVQym+xL0e9ZE8cs4o3sRq3C2RnAjl/FhXvupRFQ0=; b=D/Bh+Gmzw2BN6pBNp567gS2D0/ VKxeDUt7MYxt68TtoX3genmgLQ2oeiNNKiP0kGjaIGmiJfJjrDvbEDObjF99Cs6dMhZ6RnHqXVH7+ ssMEbATCPWp8/NOivDUP4Rv4NAL42rgZGvDejwV1CjptmTPve2x2GjNuMuzzwvPD0tOg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nrIld-003K4e-Dv; Wed, 18 May 2022 14:27:05 +0200 Date: Wed, 18 May 2022 14:27:05 +0200 From: Andrew Lunn To: Vivek Kumar Cc: corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, maz@kernel.org, axboe@kernel.dk, rafael@kernel.org, akpm@linux-foundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-pm@vger.kernel.org, linux-mm@kvack.org, len.brown@intel.com, pavel@ucw.cz, paulmck@kernel.org, bp@suse.de, keescook@chromium.org, songmuchun@bytedance.com, rdunlap@infradead.org, damien.lemoal@opensource.wdc.com, pasha.tatashin@soleen.com, tabba@google.com, ardb@kernel.org, tsoni@quicinc.com, quic_psodagud@quicinc.com, quic_svaddagi@quicinc.com, Prasanna Kumar Subject: Re: [RFC 4/6] mm: swap: Add randomization check for swapon/off calls Message-ID: References: <1652860121-24092-1-git-send-email-quic_vivekuma@quicinc.com> <1652860121-24092-5-git-send-email-quic_vivekuma@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1652860121-24092-5-git-send-email-quic_vivekuma@quicinc.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 18, 2022 at 01:18:39PM +0530, Vivek Kumar wrote: > Add addtional check on swapon/swapoff sycalls to disable > randomization of swap offsets if GENHD_FL_NO_RANDOMIZE > flag is passed. Is there already a flag in the image header which tells you if the image is randomozied or not? I assume the bootloader needs to know, doing a linear read of a randomized image is not going to end well. Andrew