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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 079BBC48BE8 for ; Tue, 15 Jun 2021 06:56:27 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 133456141F for ; Tue, 15 Jun 2021 06:56:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 133456141F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4G3zcn3fsjz3bvj for ; Tue, 15 Jun 2021 16:56:25 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=gMNzpGI3; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=casper.srs.infradead.org (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=batv+01b1093948f83d17b939+6505+infradead.org+hch@casper.srs.infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=gMNzpGI3; dkim-atps=neutral Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4G3zcK20Zmz2xVt for ; Tue, 15 Jun 2021 16:56:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GCTN830Yp9doPgPY7pu2XF+Fwldsm+mzIOYdbShiloE=; b=gMNzpGI3YiXqfEOvxDoQ/kfFiy xwichaSc9hs+Oh//p75TJLSFdwWG4+mPqDVSZnXmmfIx0lQmouL8L27PQyduFKtudue5EW0s1a/Dv LrU6ZE/x1U6rz+Rzkx2Cfbhs4ooUh1kBl1NVoHdaYxlrnBeOD8gPmWGUW3+6Rkfv3bOTtH6vU+awZ a39leE69VA2pzrgLSWj+LJIOlxfDzf96fSClPQSj4El+Nc4eCJ0l812CcwakOMa9OAAzk/YLNDDVL eW26t4P1Jvwm6r4VLAEUZric599ENx7GpAQUgvO5E1KOtptJ0qPZq82OKj6vDTgrfLN72II8KDlw0 TylkxA9w==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lt2yw-006BSj-GV; Tue, 15 Jun 2021 06:55:37 +0000 Date: Tue, 15 Jun 2021 07:55:30 +0100 From: Christoph Hellwig To: Christophe Leroy Subject: Re: [PATCH 7/7] powerpc/signal: Use unsafe_copy_siginfo_to_user() Message-ID: References: <8b4b640746523f5efb1c9a9fd97465bac4f00cae.1623739212.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8b4b640746523f5efb1c9a9fd97465bac4f00cae.1623739212.git.christophe.leroy@csgroup.eu> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" > @@ -836,14 +830,19 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset, > asm("dcbst %y0; sync; icbi %y0; sync" :: "Z" (mctx->mc_pad[0])); > } > unsafe_put_sigset_t(&frame->uc.uc_sigmask, oldset, failed); > +#ifndef CONFIG_COMPAT > + unsafe_copy_siginfo_to_user(&frame->info, &ksig->info, failed); > +#endif > > /* create a stack frame for the caller of the handler */ > unsafe_put_user(regs->gpr[1], newsp, failed); > > user_access_end(); > > - if (copy_siginfo_to_user(&frame->info, &ksig->info)) > +#ifdef CONFIG_COMPAT > + if (copy_siginfo_to_user32(&frame->info, &ksig->info)) > goto badframe; > +#endif Shouldn't the compat case be handled the same way?