Received: by 2002:a89:2d5:0:b0:1ef:f8eb:5d24 with SMTP id d21csp150184lqs; Sun, 17 Mar 2024 15:15:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlF6BnKvX1f3NIsJSLf5DPkQhUptE6+KS524a+zgIZ0q2xYa4p/Z/6bA/vsQqKg8bLFJPScLDTl4Gr91FwZAAgI32Q/pkvAzSs1iw6Ig== X-Google-Smtp-Source: AGHT+IHNsjzvuOJEVWCerRvi0Mxbmz3iy2yALCJhsRyyWfNaC9o0YGcaFoi2mHwTsP7rM7o/TNM7 X-Received: by 2002:a05:6870:46a6:b0:221:98ef:6c05 with SMTP id a38-20020a05687046a600b0022198ef6c05mr12735134oap.55.1710713757255; Sun, 17 Mar 2024 15:15:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710713757; cv=pass; d=google.com; s=arc-20160816; b=BbXiSE+Bqpa9kjpzqGJGwo2ownoYEDJvDNY95uA/bL8DRQPY50/jdxly0T1m7sSjfL be/Cdm3ntLFwaWFnXzViIulYK2qIGyOAbTayfrwmTTSzEcwpj21OESgEgKu5l0nSlaTI 5P0GT7GgrvYnfNDPZcEd42OEInnTH0oiSXUu2isNjnf0FmbKh2Jv2aqICZCGzdYTl2Zo doawOUtBMhz2+qBAqOAzyv99h7JH5HPT+IZDPnocHw15YsssiF8CXqnJnZ5TeLjTaRG/ rr6WoV8xyK7xcbUzZ6NKt/0tDLRJdnKfKqzVQV/BGnCqGNUTpY+Ph5VZzfb8/X4xfpZS 8pdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=X2JEuG0AZF0MAOLSKLcKLKNaQIvFupZs8LUprgw+gE4=; fh=IqTYbQbz+MiHDIMaLs08dCLDwD5xX2vh1VgaCR/5XWg=; b=jiNlKo4EmLkOh4wjmvOue7RpCLmlIOnMgcUQoLJCc4+zXYkn31Q333Qwij9tyT3i0M d0l2WT2lowZ/J96nzKLtvbTorJs2RAgzQtoaEL3RakLDSkmzS0H7gYLzFgec+Dyy2U6J cH7xFtv90dwYqU0Rbc/dCYrAYMUwHXuwGqXhXir5bltLP1O5HYpFYrrKsS2kNxVkoDI/ RC6lrZgxR/EIh8viYi8aReNv7kxy/JDxYxjdldpT/PZ3PkEAIWjCN0rbBwwXiAzdn0lt WidLthlYnDGA5v55MggLxmP65OvydGB/d/C2IZHNYsftbuwDBV0ttwybImsT4VuWoNr+ 1kWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=hJTeERWS; arc=pass (i=1 spf=pass spfdomain=flex--jsperbeck.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-105575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105575-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id j3-20020a056a00174300b006e7079adf0fsi3801760pfc.339.2024.03.17.15.15.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 15:15:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=hJTeERWS; arc=pass (i=1 spf=pass spfdomain=flex--jsperbeck.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-105575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105575-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8929AB21803 for ; Sun, 17 Mar 2024 22:15:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8449F21103; Sun, 17 Mar 2024 22:15:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="hJTeERWS" Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67EAF208C3 for ; Sun, 17 Mar 2024 22:15:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710713744; cv=none; b=Ry9bQJumJbJXuvw0l64l6Z0oqMECfVOsiIXX1L4rV0jCfVoFkEu/dY9fXOa5IvYTR0KybFeDnDg3QoZMPFiQIRJM5PT9D3plXR02l3LuRZyYseey4kOGb8xaplSo16zKtpxRHsa0nu0iOuRTcVjp74ggpHb2KHT6v23810WUWFs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710713744; c=relaxed/simple; bh=fCtYvy28FaAej3ITUauy8DKmshf/fP8+we1BlTQCf1w=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=cYyjfV+9mVJSVGHvt1t5yinQ01kboLQpw411kOq+6hZWN3MEFx2+7yaWrkC1IQ/WWh9O53wV6MSU74OghqRHvF+23wgktVOR6Z3C78M7s7vs6kHsHrFtxpvEtx4DO3pjxB7vkLbD+8BYKXtNz0hni477+biOcPFkpyD6tA4XSbY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jsperbeck.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=hJTeERWS; arc=none smtp.client-ip=209.85.210.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jsperbeck.bounces.google.com Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-6e6bf91a8dfso4092082b3a.1 for ; Sun, 17 Mar 2024 15:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710713743; x=1711318543; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=X2JEuG0AZF0MAOLSKLcKLKNaQIvFupZs8LUprgw+gE4=; b=hJTeERWS7EajtqBqi48gcqOee3UxsCteETIv57erATm8SeTB3/a+IXlLLRhQWV/Ivh FRNXnzz1Dwi0B/HXFU6V9JN2mADZ3riHrGgYfccTQK0jh5YjY12BPtkJl/ZY4k0JSyZy jxj1Q1jdcMT7jC3TtBya38H9hfUFN7RO34FnBqEM+OBINTpLHhjWlMcLGzXm3HLbDnqA 2O3pmlYOEE0XgKqYwUVnZG/0ufyYE2FdD0dKS5gTwcPIJycA3RKFB+BZHBSzTqCSpfPX wfxnlT6OxxJ/s3eXqEE4VbLCxGVhLucR0BpRlo/bycBP+FTj1zhmuoAEIEI3RVD9Yihj hrVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710713743; x=1711318543; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=X2JEuG0AZF0MAOLSKLcKLKNaQIvFupZs8LUprgw+gE4=; b=qgyjz16S1D+IU/kzEzvVbhmqFtP7RLxgNJNh180hUbFQ9pxoLhHi5YThPse0lSKcs3 hRc1sM4tujd6epN92iryvUieohCaYK28R+CTZvjzhS5HaYeTtgcbU+xaX+nmiUAUbuUZ 2G+4xlsK+idz/kiHvTpoJ0uxiF9+VSrGvGFzHiQQdmQNSkTEo2xacuVXszQG1V+9OrRf PICV9OUetNjdzDGqhIBQzagYBxLI/iPwDxm/uoH5c3TiYct1QkwNIN8310hBXliiJvrh z2B7BCX+Z5yBUk2kVoMGG8nHxP+JN2iVrBxyxljlpT8O6i5NZwLPwZpjIYEBB663hjDW yjWQ== X-Gm-Message-State: AOJu0YwW6Mm1qzmhwwJm0wcPGUBjBz1ZeAeFqmrAT763JP972Ly4zvW0 /81ZO1I7ENR/RAs52nzm9kbUx4ZVBYA8yB4RjwYFolldZEyb8yK8755qqBfLB1k74DYT8xas87L dxL6632jB2Stt9g== X-Received: from jsperbeck7.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:26dc]) (user=jsperbeck job=sendgmr) by 2002:a05:6a00:399f:b0:6e5:3e08:cbeb with SMTP id fi31-20020a056a00399f00b006e53e08cbebmr226316pfb.2.1710713742502; Sun, 17 Mar 2024 15:15:42 -0700 (PDT) Date: Sun, 17 Mar 2024 15:15:22 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.291.gc1ea87d7ee-goog Message-ID: <20240317221522.896040-1-jsperbeck@google.com> Subject: [PATCH] init: open /initrd.image with O_LARGEFILE From: John Sperbeck To: Andrew Morton , Jens Axboe , "Peter Zijlstra (Intel)" , Thomas Gleixner , "ndesaulniers@google.com" Cc: linux-kernel@vger.kernel.org, John Sperbeck Content-Type: text/plain; charset="UTF-8" If initrd data is larger than 2Gb, we'll eventually fail to write to the /initrd.image file when we hit that limit, unless O_LARGEFILE is set. Signed-off-by: John Sperbeck --- init/initramfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/initramfs.c b/init/initramfs.c index 76deb48c38cb..b607d3463b47 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -683,7 +683,7 @@ static void __init populate_initrd_image(char *err) printk(KERN_INFO "rootfs image is not initramfs (%s); looks like an initrd\n", err); - file = filp_open("/initrd.image", O_WRONLY | O_CREAT, 0700); + file = filp_open("/initrd.image", O_WRONLY|O_CREAT|O_LARGEFILE, 0700); if (IS_ERR(file)) return; -- 2.44.0.291.gc1ea87d7ee-goog