Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1964147imm; Sun, 15 Jul 2018 22:45:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf+EeJUyKe33xUlsqzLhlzoEQ5RmtBkV5OPHapsdyk4B9GraZniQVByvzrWM0drrNVKbnJQ X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr15707263pll.165.1531719959945; Sun, 15 Jul 2018 22:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531719959; cv=none; d=google.com; s=arc-20160816; b=Ut7RhjNv1bsykhSsp6W3jzKXyshv2u/wwmF9ETWyGsrfq/RglFyoaSi3dTA4EaABEL VsjfUKgoed+FSNCLT4HAf7Abyoi6uavAD5IFNfy+CWaqLjKXRYBa5mlBcRVumQgt5cLk 7y67NqV3FwUG6zUObRFVoYL8FpbLsUdbntK+Z8EhQfeJv6jLDTcBr0+pORhv1qDIqaJM M4fIv1QbAZsHzf4+hmMTDqtBXrDoE76tMwiLVJzSYjTKyMP5kY/fd+UwpL1tKBbNbsKT dMI8z9TYyR6e5HtEh0zb9iwuhZBtIjFt3Rfgq0sEV0JP8VI63XC07oyG5T2JTio/aYKe patQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=HYi17LsrjsC6yNUKsXGNzqN0NbdkTGZoTd2VPSXsm4o=; b=tO8Fz1lOe79e+GjZIlLiaatwPlUQJY7F/l2AHsxyS7B3+GaQEnVWyx91JEIsw+OfQe jCMKnYNc+4LIXOywfPHUd/k0l7V77grw42HxwKAkeh2gcLr28dfgGjkzYxzK7FJlojnL xUPRC/9KC/95UP14UBpaoczZAPCvVx7CkBTCNiREqb2BWLAE5FGtLN1h3vMugrxKP6v1 bE7GNovHYzw2ANJV9HHrsQr6cjKvHH9QNL/VPKDScwBtyxoeUw2rWdIAq0VczbwODXEA WbSt+dpGsA8TBqYivBdeCGPCR+UFyLEOjS72/+RvfU7LXtG2pYTjmZ84Us1koQl5cAGl D1Tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n128-v6si4249225pfn.90.2018.07.15.22.45.44; Sun, 15 Jul 2018 22:45:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727649AbeGPGKq (ORCPT + 99 others); Mon, 16 Jul 2018 02:10:46 -0400 Received: from 9pmail.ess.barracuda.com ([64.235.150.225]:40353 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726677AbeGPGKq (ORCPT ); Mon, 16 Jul 2018 02:10:46 -0400 Received: from mipsdag02.mipstec.com (mail2.mips.com [12.201.5.32]) by mx1.ess.sfj.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=NO); Mon, 16 Jul 2018 05:44:35 +0000 Received: from [10.20.78.133] (10.20.78.133) by mipsdag02.mipstec.com (10.20.40.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Sun, 15 Jul 2018 22:44:42 -0700 Date: Mon, 16 Jul 2018 06:44:23 +0100 From: "Maciej W. Rozycki" To: Paul Burton CC: Alexander Viro , James Hogan , Ralf Baechle , , , , Subject: Re: [PATCH 1/3] binfmt_elf: Respect error return from `regset->active' In-Reply-To: <20180629171330.4giikc5x2cbxxuyc@pburton-laptop> Message-ID: References: <20180629171330.4giikc5x2cbxxuyc@pburton-laptop> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [10.20.78.133] X-ClientProxiedBy: mipsdag02.mipstec.com (10.20.40.47) To mipsdag02.mipstec.com (10.20.40.47) X-BESS-ID: 1531719874-298552-23289-155744-1 X-BESS-VER: 2018.9-r1807111811 X-BESS-Apparent-Source-IP: 12.201.5.32 X-BESS-Envelope-From: maciej.rozycki@uk.mips.com X-BESS-Outbound-Spam-Score: 0.01 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.195800 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.01 BSF_SC0_SA_TO_FROM_DOMAIN_MATCH META: Sender Domain Matches Recipient Domain X-BESS-Outbound-Spam-Status: SCORE=0.01 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND, BSF_SC0_SA_TO_FROM_DOMAIN_MATCH X-BESS-Orig-Rcpt: viro@zeniv.linux.org.uk,jhogan@kernel.org,ralf@linux-mips.org,linux-fsdevel@vger.kernel.org,linux-mips@linux-mips.org,linux-kernel@vger.kernel.org,stable@vger.kernel.org X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, > > --- linux-jhogan-test.orig/fs/binfmt_elf.c 2018-03-21 17:14:55.000000000 +0000 > > +++ linux-jhogan-test/fs/binfmt_elf.c 2018-05-09 23:25:50.742255000 +0100 > > @@ -1739,7 +1739,7 @@ static int fill_thread_core_info(struct > > const struct user_regset *regset = &view->regsets[i]; > > do_thread_regset_writeback(t->task, regset); > > if (regset->core_note_type && regset->get && > > - (!regset->active || regset->active(t->task, regset))) { > > + (!regset->active || regset->active(t->task, regset) > 0)) { > > int ret; > > size_t size = regset_size(t->task, regset); > > void *data = kmalloc(size, GFP_KERNEL); > > > > This looks obviously right to me, although I don't think it affects > anything until commit 25847fb195ae ("powerpc/ptrace: Enable support for > NT_PPC_CGPR") in v4.8-rc1 & even then not in a harmful way so I'd drop > the stable tag. I'm fine with dropping the tag FWIW. Thanks for taking care of my patch. Maciej