From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B2A3C55178 for ; Tue, 27 Oct 2020 22:28:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE6CE221F7 for ; Tue, 27 Oct 2020 22:28:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603837710; bh=Sq7acSzMUyVKbpz70YHtUmBPJKD4yKfHDfXjg+tbsFg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-ID:From; b=Koy2BS/5WyP039ZZbCe4hXF8xyp41y7uX5RI6FxXT3klmab/FV4JkMDI+OwDusnpJ 06tttK3JH9YD0PMM4jI74naJsTAqmA1LEQt0fyl3CJuD5jwLAopfELODJueF0DdYix bhmTExb7iT54b7ri7v503KjOZ13swboprGe5jrPg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1832361AbgJ0W23 (ORCPT ); Tue, 27 Oct 2020 18:28:29 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:36793 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756978AbgJ0W22 (ORCPT ); Tue, 27 Oct 2020 18:28:28 -0400 Received: by mail-io1-f66.google.com with SMTP id u19so3320287ion.3 for ; Tue, 27 Oct 2020 15:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Yd2294ZBZMy4XljpTTzjUGRIXipCuL8kyBKHe5NQtNI=; b=UvStF98FJhE092zgD2uanf57kDNaIOnaSuCHnKirsofWd0aCjRO4Qy5GS3JnhbXeJd R0JIdamE6oJenSkkX6e4uPkCcRw420HhLdJjWD91oSYP5oBUv2PrnHcU21GtGHURFmaL AqzzPN//XnWoxpYoy6vkYKeKEXLuzf7F4/9rI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Yd2294ZBZMy4XljpTTzjUGRIXipCuL8kyBKHe5NQtNI=; b=KIVS2kFSmxuew3BNmrJoKjMrKRa4SbYmEi+ZTgLA3mhRqyt2THy4OuJOVPCIARfK4C VvjqIbW9ppxLJb+DkbgGEUuV61CkLP2zzWyxzz6w8sPwpGveKNEet8upogrW16+do5uF 5DAYtQ6qhzyDgvsfQp40nVizp8rYF4iXF3ktJKTwFRTwQyP3V6r1MeXD4RXy9Z11oUft cmDjvciVAyOcsR4T3ScdwrQd2/aQDUQJTuKpkSXTkMcQ+IstiLnYdVjFarLCndNHrzmw TjSDV2yvNbuqrcaVH0YP49muE8mc/SxvOYBhoHAjvIfg6jjRHgRL78uuX96u9ziZwVFo eaFQ== X-Gm-Message-State: AOAM532nx9mXVun/lVXsm3C+g1dLCC+Fm7KfWgW3QfHmhLNDCOGv+CwD yCb8OgjfM4HohefcP7YEgHPCTw== X-Google-Smtp-Source: ABdhPJySrsRO6td3S9ry6TCmbA6yj3jZ4Si223/83KN70hGwaMF2taBI3cWZWOi8+OG8ZYgPWvMvBQ== X-Received: by 2002:a5e:8349:: with SMTP id y9mr3812931iom.188.1603837707726; Tue, 27 Oct 2020 15:28:27 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id i201sm1549583ild.12.2020.10.27.15.28.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Oct 2020 15:28:27 -0700 (PDT) Subject: Re: [PATCH] openat2: reject RESOLVE_BENEATH|RESOLVE_IN_ROOT To: Aleksa Sarai , Alexander Viro , Shuah Khan Cc: stable@vger.kernel.org, Christian Brauner , containers@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20201007103608.17349-1-cyphar@cyphar.com> From: Shuah Khan Message-ID: <4ce6ba2c-8b23-78aa-47c0-8c9673273e8f@linuxfoundation.org> Date: Tue, 27 Oct 2020 16:28:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201007103608.17349-1-cyphar@cyphar.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/7/20 4:36 AM, Aleksa Sarai wrote: > This was an oversight in the original implementation, as it makes no > sense to specify both scoping flags to the same openat2(2) invocation > (before this patch, the result of such an invocation was equivalent to > RESOLVE_IN_ROOT being ignored). > > This is a userspace-visible ABI change, but the only user of openat2(2) > at the moment is LXC which doesn't specify both flags and so no > userspace programs will break as a result. > > Cc: # v5.6+ > Fixes: fddb5d430ad9 ("open: introduce openat2(2) syscall") > Acked-by: Christian Brauner > Signed-off-by: Aleksa Sarai > --- > fs/open.c | 4 +++ > tools/testing/selftests/openat2/openat2_test.c | 8 +++++++- You are combining fs change with selftest change. Is there a reason why these two changes are combined? 2 separate patches is better. thanks, -- Shuah