Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1969122ybh; Tue, 14 Jul 2020 11:56:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUgcz7/uhx/RAv/0E/k+9v1C2PZYlS3I7LA+HzyY2UvP8D/2ys4cXl35aH6wKrkBt6xC3p X-Received: by 2002:a17:906:1357:: with SMTP id x23mr6223985ejb.148.1594753000111; Tue, 14 Jul 2020 11:56:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594753000; cv=none; d=google.com; s=arc-20160816; b=AWOnfZStFUFV55/i475wcAfWf5yxHbnkuvBEz+JoOoEf/SHm53WBDRWM1iuKCG7Tb8 88IJgqPEdb7U4bSw4i2inwQ9NB6F7QCDBMVoJnVl99UgX4EdkBEXuTrPnyL3AiBI+Rwn arKRWGhEJGleLT3i1Y57N0PeFhx3lS9aOIxohUIEx8i8XEbtJ+45GXHdfhg5g8hmHv5f Bkmm5IzJRg/uODMpZmMiMIrOuf019SVfkmy3a9CRglb8vXfunTHN0WyJy4O2FuOw2u5w DnKW/Pd/DZSSlt2c21zJHnd3s1+/MH/kimRN1RiWoi+kW8KRTdCHXvLLjkcVDSOJqjLN HCrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1cVJkNowY/nbw9nH5B3aOBLVcRed0aIGODgtcxOikaE=; b=hOHQIYgpPLmRqUrlgCmYqMJwH+73lGEcwb80ZdEyAY01QrcCYGFNQEIH8zM7JPcRmr 8NdEY5pDV26gUW6DfkhvrqVy0pJPTqiv8c2cn9pwhejdnSjhnHqqJld6bBtVfOI5blAZ hkGdI0h+sHMbkMxUKUud25I8qNpxMtL2kqH2puBiO4AZMVLJfQ6Gg/7OwOxH9sYqt5E/ lDTTnwehOr4CGcSor1fI5RreZ/wQ6vDk0HZwOwc+ztfvoRq/xgHmk3R753Ito7aL+hhX 7o+99JpUYyHZpQVmdlYGLWz8aZLoFvl9G7IuadDC21xZLgKLNBreUZIQBsVDO/coeBTI bqzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QTMcU6zn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb9si10987276ejb.176.2020.07.14.11.56.15; Tue, 14 Jul 2020 11:56:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QTMcU6zn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730567AbgGNSwr (ORCPT + 99 others); Tue, 14 Jul 2020 14:52:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:49578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730125AbgGNSwp (ORCPT ); Tue, 14 Jul 2020 14:52:45 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EE00622B2B; Tue, 14 Jul 2020 18:52:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594752765; bh=GzXMa+oOgx/9PPybBTdvrlfwVo8zIPCQTjDYGhEhxTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QTMcU6zni7eDxE2nicnOuEsmylGYpww3kOfwHDMH2dITgiQMlb1ierBKY1ZUp2RVR YEEfSRxc0uhbckRurX2pzOBphawTncGhLjxPw7SyvYmcNBkVphGBoJE+b8xyxGYk7H q0Q3tjVYVS1IipJqvd7OrbRKgSgTFNapJfNWi0T4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heiko Carstens , Vasily Gorbik Subject: [PATCH 5.4 101/109] s390/setup: init jump labels before command line parsing Date: Tue, 14 Jul 2020 20:44:44 +0200 Message-Id: <20200714184110.387166565@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200714184105.507384017@linuxfoundation.org> References: <20200714184105.507384017@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vasily Gorbik commit 95e61b1b5d6394b53d147c0fcbe2ae70fbe09446 upstream. Command line parameters might set static keys. This is true for s390 at least since commit 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options"). To avoid the following WARN: static_key_enable_cpuslocked(): static key 'init_on_alloc+0x0/0x40' used before call to jump_label_init() call jump_label_init() just before parse_early_param(). jump_label_init() is safe to call multiple times (x86 does that), doesn't do any memory allocations and hence should be safe to call that early. Fixes: 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options") Cc: # 5.3: d6df52e9996d: s390/maccess: add no DAT mode to kernel_write Cc: # 5.3 Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Greg Kroah-Hartman --- arch/s390/kernel/setup.c | 1 + 1 file changed, 1 insertion(+) --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -1120,6 +1120,7 @@ void __init setup_arch(char **cmdline_p) if (IS_ENABLED(CONFIG_EXPOLINE_AUTO)) nospec_auto_detect(); + jump_label_init(); parse_early_param(); #ifdef CONFIG_CRASH_DUMP /* Deactivate elfcorehdr= kernel parameter */