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=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 1384DC433E2 for ; Mon, 14 Sep 2020 20:22:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A64A5208DB for ; Mon, 14 Sep 2020 20:22:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PWKtHVnK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="oF8La/id" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A64A5208DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Z7SMqnAjZ8zYQE6KjV2yuKxgwItL+5KyyMAxruS/R1Q=; b=PWKtHVnKhGtJe5cRHXTudMGNr Wjtq2cN2KKAUZXNiElFkRdQ/L/HyE+5iFdbYzgAZeCorF0wr1mmvi/vLCnlmpWSdRTMwRTI6862vq v2fPTijziEj7HGZSJff0dIYldSGcRtYD8EfN/mNKaMYG/yr9DCzKgVUBv4G5Z5hnMjsZyFsktdrSu Jk7hcK9xm376bwAf2lj5htF70Sbf4EiJt0DzVdBhl00uzvKzgzdyd6YgKyr8z8sYBajnyvu9l/NFB +dwn9elNZTG7Lv4R2ntgiuU8e6e5xBLIlaUJ5kg60DxUJEeeI02/m3T3hM2BD+6yWsVJg4slc7wZ9 I3oT0UgXA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHuxu-0006Fn-0J; Mon, 14 Sep 2020 20:20:45 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHuxp-0006Ex-Sf for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 20:20:38 +0000 Received: by mail-pf1-x443.google.com with SMTP id w7so544351pfi.4 for ; Mon, 14 Sep 2020 13:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qEpgx25Jil12k55o2aeOued7nizFpjWJtIRv7RIrrgA=; b=oF8La/idpVXp4VfUhwPPRt9IR/o1RPig2nmeyh8YrhsmHCRvroMtluVJ4o5U4K8AFY VbIWbH4IFHNJ2TFc1OFb1H1xtGH98TXoNvfhyYpAj/BvKsAp8ayWj8ANKhK3ots4YK+n 3o6kijVtSkUUK+lTSVOjqNR35ksbqN8yyS7c8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qEpgx25Jil12k55o2aeOued7nizFpjWJtIRv7RIrrgA=; b=haso5yYUSisQ6q8ghHPMZuM3m99i0H9FTBgC9iKDiMPRdZOEV81MKTbcx60+A80N/m q5xZzGgzHN9MjYkrS1dxSntf1jU31F7Kl4ovlOVhgev7MYxrMhBEP/UY5XbUD7zZIJ7l 6BRzaJKaMm8wOeimeI7fZqzS4JviLHKWg1VupZPbbOeI4uk7jiL7K8wFAcu/kqAOeSwK 1HTGjwg4RMRJILI/NXxItN2yR8FdDUpRYO3g2NC8p5ZMno7C1b9boCGljCikzGMIHg3R QAOqu+QfRXICxRoC6uFVn2lhxngPP0P7Esx5+gbiNL1rQFngKG802w7PJ9tyOPMZiG3j b9bQ== X-Gm-Message-State: AOAM532lByoF9ykmw/JQFrEnLL0bipCaDf1tGUDTDqox4REnFpaTKKsi VdROFWKPXqDGRSGZosd9hqusCw== X-Google-Smtp-Source: ABdhPJwzC+6nA3eNHS7MaPMnpM3EiFR22Z/iXFg5GeiL+THEWa6N+D4e+5+NMXy6erXWVC35l1hZ8Q== X-Received: by 2002:a63:471b:: with SMTP id u27mr12121165pga.139.1600114835739; Mon, 14 Sep 2020 13:20:35 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id u6sm10068865pjy.37.2020.09.14.13.20.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 13:20:34 -0700 (PDT) Date: Mon, 14 Sep 2020 13:20:34 -0700 From: Kees Cook To: Michael Ellerman Subject: Re: [PATCH 13/15] selftests/seccomp: powerpc: Set syscall return during ptrace syscall exit Message-ID: <202009141319.FC017B0DB@keescook> References: <20200912110820.597135-1-keescook@chromium.org> <20200912110820.597135-14-keescook@chromium.org> <87zh5sq59a.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87zh5sq59a.fsf@mpe.ellerman.id.au> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_162037_991304_98D3E711 X-CRM114-Status: GOOD ( 15.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thadeu Lima de Souza Cascardo , Will Drewry , linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Max Filippov , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Christian Brauner Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 14, 2020 at 03:47:13PM +1000, Michael Ellerman wrote: > Kees Cook writes: > > Some archs (like ppc) only support changing the return code during > > syscall exit when ptrace is used. As the syscall number might not > > be available anymore during syscall exit, it needs to be saved > > during syscall enter. Adjust the ptrace tests to do this. > > I'm not that across all the fixture stuff, but if I'm reading it right > you're now calling change_syscall() on both entry and exit for all > arches. Correct. > That should work, but it no longer tests changing the return code on > entry on the arches that support it, which seems like a backward step? That's a good point. I wouldn't be in a position to notice a regression for the other architectures. I will refactor this one... -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel