From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) by sourceware.org (Postfix) with ESMTPS id C03373858C36 for ; Thu, 27 Jul 2023 13:41:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C03373858C36 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-563531a3ad2so716493eaf.3 for ; Thu, 27 Jul 2023 06:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690465297; x=1691070097; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=UtmLa/vQYatw0LqjR5tyvYgvuKSMtHa5kEJsfgAYr2Y=; b=EJlj39fDj7s3SeURxkVOwmfn4580XqyfkstHdJai8/wEMi2HeSXxkk2iuVgdV+fx1u K1vbNTUfV0NW30i76WcZJXFK0IBKAI+TFUZWigYd6nwwjcJcotLTzlY2FTg4dspilMCO +DqWQ1KA8fZjHc6Yx8qLWqBmoH8+q5i/sB/gzOEZPioVNBZHDz+ByC2lPg2eIZ32K6NP wH0MUbLhssRvt0hmcVv8fIm6serAn5FGLgCFlejkyOLHD8tt/ahKgnU1OHxcB13aM9lf T3+cbLRoy6uZn4vo9wwsR8gmy3ghHr1Uk9y6tX2H4Ch+rFdjPgwhy98fDpPyEQO0QynW DMtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690465297; x=1691070097; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UtmLa/vQYatw0LqjR5tyvYgvuKSMtHa5kEJsfgAYr2Y=; b=ahp729mP/rSEsQWm+WROpQjzqGnoi5tbbCAXW9LYksZbCFOHy4H4KHh8d7V2Orgmfx ioYTiE7kzTIgOd0s5OnLI443LArSqi2pifulf6rCeUiPoTfnv2YYZQM0nOYaaKpPLcSM cRHj4pmugBhLc/97PBJfmbTaffShhP/eCm5ZlwoOmYs105i2R4kAW1Pc2GG+F3stn9ds 1StKlcpMwILxfjOC9GWhL1UYrJlFQffOfgKu0nQXEzQlGCYn+PtChrIrFl1Xze4YF87C bzGPd0eLaGcRVSEEz7gKkrjqQX3NKfyNQOvg0UL4zCFQmW7ldJSRO0jy8OWIAH4TkgCl 664A== X-Gm-Message-State: ABy/qLbnB4IoYN4u3P+xcAJvCkVdXmsFCCzi4F37xYta+gWdR/+HRR8x Ii+RVoQSAr7uVR3wfEfA13l3nQ== X-Google-Smtp-Source: APBJJlFBeRP3QYYH+VwTwqrRZGUMmnHXM1yJ/YFZ/yw+TEg3vkCCDZe4BHB2R3x8TS4SBnGxqwN26w== X-Received: by 2002:a4a:6b09:0:b0:566:f9ff:57f with SMTP id g9-20020a4a6b09000000b00566f9ff057fmr3969104ooc.8.1690465296865; Thu, 27 Jul 2023 06:41:36 -0700 (PDT) Received: from [192.168.15.31] (189-46-1-220.dsl.telesp.net.br. [189.46.1.220]) by smtp.gmail.com with ESMTPSA id w34-20020a4a97a5000000b00569c5eadf15sm628260ooi.26.2023.07.27.06.41.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jul 2023 06:41:35 -0700 (PDT) Message-ID: <24c738fb-f223-52c6-e339-e53fc32bfc00@linaro.org> Date: Thu, 27 Jul 2023 10:40:16 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] tst-personality: Check for ENOSYS Content-Language: en-US To: Xi Ruoyao , Joe Simmons-Talbott Cc: Carlos O'Donell , libc-alpha@sourceware.org References: <20230725175714.1727827-1-josimmon@redhat.com> <8ff6322d-a18e-38f2-5d3d-2772cd35540f@redhat.com> <225e4509406caf972befe14fca56485c6e43b1d0.camel@xry111.site> <20230727130253.GH6392@oak> <5702e3ad23924aaa4c3f320397a7f7a471c3254f.camel@xry111.site> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <5702e3ad23924aaa4c3f320397a7f7a471c3254f.camel@xry111.site> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,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 server2.sourceware.org List-Id: On 27/07/23 10:25, Xi Ruoyao via Libc-alpha wrote: > On Thu, 2023-07-27 at 09:02 -0400, Joe Simmons-Talbott wrote: >> On Thu, Jul 27, 2023 at 10:20:37AM +0800, Xi Ruoyao wrote: >>> On Wed, 2023-07-26 at 22:16 -0400, Carlos O'Donell via Libc-alpha wrote: >>>> On 7/25/23 13:57, Joe Simmons-Talbott via Libc-alpha wrote: >>>>> Return UNSUPPORTED if personality fails with ENOSYS. >>>> >>>> Where did you see this? >>> >>> Some "container environment" I guess.  Note that personality is added in >>> Linux 1.1.20 so there is no way a Linux system does not have this >>> syscall today. >>> >>> To me we really should not try to support all these container >>> environments with too-clever seccomp filters. >> >> Yes it is a podman container on x86_64-linux-gnu.  This is my main >> developement envrionment where I'm seeing a handful of testcases that >> fail. > > Seccomp filter can block arbitrary syscall and we have no way to support > all the seccomp filters in the wild. > > More generally, if you've specified --with-kernel=x.y but the a syscall > available in Linux x.y returns ENOSYS, the situation is considered > "broken kernel ABI" and not a Glibc bug. So there is nothing to be > fixed here. > > Try to disable seccomp filter (I'm not sure if podman has an option to > control it, but if not I'd be very surprised). > We have this policy on glibc code itself, so we can use any fallback safely without the need to evaluate whether EPERM does make sense or if it should be reported to caller. This symbol is not used internally, so filtering is possible without much trouble. For tests I think it is feasible to work around Linux security filters and we already have a bug report to track it [1]. As I said in last patch review meeting, this kind of environment should be ok for CI/patchwork but we still need to occasionally and specially on release workflow to run make check on environment with maximum coverage to avoid having too much UNSUPPORTED tests. Also, the personality syscall is a trick one because Linux kABI always succeed and thus there is no easy way to correct filter it (filtering is always broken on 32 bits for instance [2]). [1] https://sourceware.org/bugzilla/show_bug.cgi?id=30603 [2] https://patchwork.sourceware.org/project/glibc/patch/20230606164830.126052-1-adhemerval.zanella@linaro.org/