From patchwork Thu Apr 13 22:30:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marko_Petrovi=C4=87?= X-Patchwork-Id: 1768679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=RpyXbTgF; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=jvnBGxoV; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PyDnH6pY4z1yZn for ; Fri, 14 Apr 2023 08:30:59 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2zKf8O9TJDMIfvatSZ72f+2+jXSgiYViMgD3qzSrCCI=; b=RpyXbTgFuCEV7Q 50b+1ISIbFOWLR0piSlbhDyoEUa1+emFlvPJrmL0oU4xtOfuOWPu6f8Kfn//h2YK/CTIwKyrllhAx BezizVdw1hMRXQAPGu7nx9nSYyMa9/AYgYolDgEaMY1K1t1MpzArcEhJD/VW3VbDYTaoV/BhXwR17 hFgjtnIiD1UqUqJRrjetmmKsNHI2PQRruJF0rnnCjehfWPCGPCtS93DY1K5Jp+SbrxHDSzzfp6NNM V+O3HeUmEeqGezNYcXh+xR8xa8W1DKsmSL3wFxo+tFbtrQDIR2wmdBtUmOU0IB04irIyuHWKsvIrw qKl+8O9DErobk1GP4zdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pn5Ss-007GBz-2g; Thu, 13 Apr 2023 22:30:50 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pn5Sp-007GBQ-2y for linux-um@lists.infradead.org; Thu, 13 Apr 2023 22:30:49 +0000 Received: by mail-wr1-x42c.google.com with SMTP id g5so19052399wrb.5 for ; Thu, 13 Apr 2023 15:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681425044; x=1684017044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JVVINTZFljE3D1m9vpMFDBIoPu6/jsAxERMDUpxwJvk=; b=jvnBGxoVOaXjZWgObqoYY20QdkOzuTppeMTq11LUtrtmrH39TKI6IEjtMa18vhvbE+ V/B6Rt0J02oRGkpptjUmfUMqRoESxX4MgPDvFKD4mcK/3jlOc7U/xqWQtPEP+nwtGh6J w9liTpRWDcvVPxpIVGKJjTpI/CMqn39GhmJTbXiLxvNp5Ksfa71B93XQF+6R3065FNj3 erQznfkm+hRcv4HOKXDsv0vmSiM9OO5gyNqldRSK8JD1MyF+0RYYPxxGVoyGi7drHLW6 u/01IIzlOtSjYF2ljwl4YRfYZ1iidm0Nu7yLMiqRkdaj+EXTUXjSY7pgUOb0DDnjhZ1V kaOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681425044; x=1684017044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JVVINTZFljE3D1m9vpMFDBIoPu6/jsAxERMDUpxwJvk=; b=cvT8l2AoyxrHNHNe3zOuJNX41HvP/LC8Pkyzri5DQTfGl18HBatFdPqBEhmc3kWi6K kzs8eEjpriauvN3bxJdGw/ob6/gN2MaHV5efxjJU7ieGvYrt/8opcrEMAeNv69/95Nzz gHm3WYIXipjUW7Hqs0HIMR4/529RQRnL1pybjU55ifr/aPDZNwcGTojwWkn0eGyft4vm AIM9cArSKCwnNQWlcCykVMlM1dzsG27wDLmxrNk1T5fK/j6TmToFCqw1jeRPjlx61HrC N9JeN6gGg0hhRT892MHRpYlJS0i4+OpV+beYMFmJveXi9VI+gCx5qsvKlgGx8HVawipl KT2g== X-Gm-Message-State: AAQBX9fvLY5HDnnh7f/g8kXcz7WH4bRsxRabkZrCyXk+EP/6EC6n1PNG Ov3IlOFsWl3NTDdthTVz+jATJsDbiYWIHEKcbos= X-Google-Smtp-Source: AKy350aVcoL9hKB6wv6rez6DhxVCUF/c9Znwut2f+VDsazYCOESNHCMjqCGcXlu7/QmgaI1zzJvrgw== X-Received: by 2002:a5d:5403:0:b0:2ef:ba50:20e7 with SMTP id g3-20020a5d5403000000b002efba5020e7mr2567438wrv.43.1681425044468; Thu, 13 Apr 2023 15:30:44 -0700 (PDT) Received: from laptop-fedora.. ([79.175.90.109]) by smtp.gmail.com with ESMTPSA id e32-20020a5d5960000000b002f02dbddc26sm2133889wri.68.2023.04.13.15.30.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 15:30:41 -0700 (PDT) From: =?utf-8?q?Marko_Petrovi=C4=87?= To: linux-um@lists.infradead.org Cc: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net, =?utf-8?q?Marko_Petrovi=C4=87?= Subject: [PATCH 1/2] Document new xattrperm flag Date: Fri, 14 Apr 2023 00:30:23 +0200 Message-Id: <20230413223024.11513-2-petrovicmarko2006@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230413223024.11513-1-petrovicmarko2006@gmail.com> References: <20230413223024.11513-1-petrovicmarko2006@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230413_153047_961782_ECA4BC64 X-CRM114-Status: UNSURE ( 9.31 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?b?IENvbnRlbnQgcHJldmlldzogIFNpZ25lZC1vZmYtYnk6IE1hcmtvIFBl?= =?unknown-8bit?b?dHJvdmnEhyAtLS0gLi4udG9fdjIucnN0ID0+IHVzZXJfbW9kZV9saW51?= =?unknown-8bit?b?eF9ob3d0b192My5yc3R9?= =?unknown-8bit?q?_=7C_20_+++++++++_1_file_changed=2C_9_insertions=28+=29=2C_?= =?unknown-8bit?q?11_deletions=28-=29_rename_Documentation/virt/uml/=7Buser?= =?unknown-8bit?q?=5Fmode=5Fli?= =?unknown-8bit?b?IFsuLi5dIA==?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=280=2E1_points=2C_5=2E0_req?= =?unknown-8bit?q?uired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_no_trust?= =?unknown-8bit?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDo0MmMgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= =?unknown-8bit?q?_0=2E0_FREEMAIL=5FFROM__________Sender_email_is_commonly_ab?= =?unknown-8bit?q?used_enduser_mail?= =?unknown-8bit?q?_provider?= =?unknown-8bit?q?_=5Bpetrovicmarko2006=5Bat=5Dgmail=2Ecom=5D?= =?unknown-8bit?q?_0=2E2_FREEMAIL=5FENVFROM=5FEND=5FDIGIT_Envelope-from_freem?= =?unknown-8bit?q?ail_username_ends?= =?unknown-8bit?q?_in_digit?= =?unknown-8bit?q?_=5Bpetrovicmarko2006=5Bat=5Dgmail=2Ecom=5D?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_domain?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily?= =?unknown-8bit?q?_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Marko Petrović --- ...to_v2.rst => user_mode_linux_howto_v3.rst} | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) rename Documentation/virt/uml/{user_mode_linux_howto_v2.rst => user_mode_linux_howto_v3.rst} (99%) diff --git a/Documentation/virt/uml/user_mode_linux_howto_v2.rst b/Documentation/virt/uml/user_mode_linux_howto_v3.rst similarity index 99% rename from Documentation/virt/uml/user_mode_linux_howto_v2.rst rename to Documentation/virt/uml/user_mode_linux_howto_v3.rst index af2a97429692..709eef10dd7d 100644 --- a/Documentation/virt/uml/user_mode_linux_howto_v2.rst +++ b/Documentation/virt/uml/user_mode_linux_howto_v3.rst @@ -1007,23 +1007,21 @@ an existing root_fs file:: # mount root_fs uml_root_dir -o loop - -You need to change the filesystem type of ``/`` in ``etc/fstab`` to be -'hostfs', so that line looks like this:: - - /dev/ubd/0 / hostfs defaults 1 1 - Then you need to chown to yourself all the files in that directory -that are owned by root. This worked for me:: +that are owned by root so that the kernel can access them. +This worked for me:: - # find . -uid 0 -exec chown jdike {} \; + # find uml_root_dir -uid 0 -not -type l -exec chown jdike {} \; Next, make sure that your UML kernel has hostfs compiled in, not as a -module. Then run UML with the boot device pointing at that directory:: +module. Then run UML with the appropriate kernel command line +parameters:: - ubd0=/path/to/uml/root/directory + rootfstype=hostfs rw hostfs=uml_root_dir,xattrperm -UML should then boot as it does normally. +You should have extended attributes supported and enabled on +your host filesystem since UML uses them to store correct file +permissions. Hostfs Caveats --------------