Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2908239rdh; Wed, 27 Sep 2023 17:26:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtGLPjQ2LYb1JhoSG1uy8Xf9HYK3TKGDME66lYAaq115egcOXNU+yEOt+U4CECyVO7aMRv X-Received: by 2002:a05:6870:8a2c:b0:1ba:bb13:d007 with SMTP id p44-20020a0568708a2c00b001babb13d007mr4208865oaq.5.1695860783687; Wed, 27 Sep 2023 17:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695860783; cv=none; d=google.com; s=arc-20160816; b=CmJYDEsM+EmxswCP4El10Gz91e9wdLzJurxV7ZPSckGbKCB4b/M8oYP3IyzWIiKlkI 6Qmnh3PcYmCvbzgloUM2L2CiRrSBHL6Br9jiE10CnlAhYm7EO2PGnSybQM/ZNR6SUA+V WbnZVDWKmQEpzh4UuKW/HkjsyZfudHX0ZaTcKQ2W7JYLaFrAUUH+N1l9flahbGu67Qva miYVp3ZE3nfGVaYe4aK7Q89oS0+SZGYFkyk0EZ3dz56Lh71uxeChXLh4DcLkqWrBoCNW MtWaVcowzBYX7kh0hETFXoZTbWIN+O4uBxjHNpZxrjOAtLmm1hl5Sxtgz7Wm6XkUIRRE v40A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=4OBZ4IYoE3UGlFGxrLn0BTpDP5IoGpepsXCJr4HwsmE=; fh=fLhVVU/Y0lWV4zt9QNOj4RoRHmNBinrZYliT2F+nK7Q=; b=vkVYlhIJCarI/aKZYacfKnek1nFtZhgkC5a2stpNa/PFTS6XT8SQpF0cXy1CvxoTbK OKaoetlbRcfREr9xGHerznEDce+McJccupYNeu6DcsRK4uc0QdNPa1k9PpXtUacW9iE9 rmqj3LO7TotX/GRY5dei+UcXTZF5v4L2dqBkSM4k1mqZfXuvQpNv9ioMav3h17NJFOtd 1zL5Zr15p8FtSJkpdiZ1n+sBjyvlkSHG5+hoIdg93H4KRtmm+dfR0TggpQ/N2a1kB8fZ ETMs4SKf7HWlgIBsK1I5j1hFtzlWSU3FrQ/JPxFnJUJ445SnIr+3Xg4kXxEY59MMU7c3 YEbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=chDU9h11; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id cm3-20020a056a020a0300b00578f7063ad6si16720069pgb.823.2023.09.27.17.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 17:26:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=chDU9h11; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 202688219C2B; Wed, 27 Sep 2023 12:35:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbjI0Tfn (ORCPT + 99 others); Wed, 27 Sep 2023 15:35:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229729AbjI0Tfl (ORCPT ); Wed, 27 Sep 2023 15:35:41 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D287E114 for ; Wed, 27 Sep 2023 12:35:39 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2c008042211so202055711fa.2 for ; Wed, 27 Sep 2023 12:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695843338; x=1696448138; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4OBZ4IYoE3UGlFGxrLn0BTpDP5IoGpepsXCJr4HwsmE=; b=chDU9h114PLb3ueLvc9KZH7uQPbYthAW/LocAwigQPI8F1pc9llAQoVC86LTm5wHho ECT30BdTiVKKwC5wBS24bYXnvGSvLgEMyRPRQVZMWYF2trKkNOrQt+Lrp04C+JIDqcnN 4vWzJ6xSf/VR/zaKp//Xu+AapByOgPC+9AWCRp+QnN2G8MAfKlJan97hzumlrpDfm5/a CT0UNa82aWOMbEGhsBUpf29JGnW29n/2X6923lIuq8AsKSonKu1N3MWuGKdp4ofeliZq Nos/HUdBm1lUnfg1JHQpu6SuWaFBMw78p6uqgEeauqXdFIDcC2rX+mk5pxWwmr/Fyzkm KWmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695843338; x=1696448138; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4OBZ4IYoE3UGlFGxrLn0BTpDP5IoGpepsXCJr4HwsmE=; b=OBhNTub2yQml3bJbjF5jya9tn9BahTS2+cEIcHoCNryTNtGgHq5HpFeaKj2fZ+WPQw zRm9ipIOdK0cu4KANwnD7hVu14QGtlsSE2Fi11MMLyA2wEIDDbE8fJMzsfdHgwDn6CDf b/zrCHmRm/0S6ptnjYft7G+8lhxMYAUAttw1x//WP2TZRWt7UyJIKtW0Ts0n16cd9W5B Xwk7xo6A2PgAjrBYNi9CvkYhVW+7cgzPPE9JNBCx3VmusX0P7eThpvpXXv6Hdiv8rFyE c5IICdPsObG99RIH2o48F5Qk/nxcIKlki1Xw/6IN9xQf7i+p38a34wQk9nWX4m3JD45y wXJQ== X-Gm-Message-State: AOJu0YyB/ORETVAs7gf/98ftJ9kPl7KnqdewPmL/zZDmjsM//7MC7lXn M/bcTRFwLFtluCCiXGoJkpUTbJZiqDEIVP2K9qotDA+MJPY= X-Received: by 2002:a05:651c:104:b0:2b9:e53f:e201 with SMTP id a4-20020a05651c010400b002b9e53fe201mr2716509ljb.31.1695843337780; Wed, 27 Sep 2023 12:35:37 -0700 (PDT) MIME-Version: 1.0 References: <20220601155702.176588-1-ariel.miculas@gmail.com> <9afcdb29-db22-3f5c-b596-da7567b707ff@csgroup.eu> In-Reply-To: <9afcdb29-db22-3f5c-b596-da7567b707ff@csgroup.eu> From: Ariel Miculas Date: Wed, 27 Sep 2023 22:35:25 +0300 Message-ID: Subject: Re: Fwd: [PATCH] powerpc/ptrace: Fix buffer overflow when handling PTRACE_PEEKUSER and PTRACE_POKEUSER To: Christophe Leroy Cc: "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 27 Sep 2023 12:35:51 -0700 (PDT) On Wed, Sep 27, 2023 at 7:01=E2=80=AFPM Christophe Leroy wrote: > > > > Le 27/09/2023 =C3=A0 17:27, Ariel Miculas a =C3=A9crit : > > I've forwarded this old email thread for visibility and discussion's > > sake around my recent blog post [1][2] > > Ah, right, it's been superseded by > https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220609133245.57= 3565-1-mpe@ellerman.id.au/ > > So I mark the new one superseded as well. > > By the way, is your other patch still applicable, ref > https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220610102821.25= 2729-1-ariel.miculas@belden.com/ > ? Well, I think it's better to explicitly access fpscr than to implicitly overflow fpr into fpscr. Because in the implicit case you need to make sure fpscr comes directly after fpr and this relationship is never modified (e.g= . someone refactors the code and puts fpscr before fpr). Regards, Ariel > > Thanks > Christophe > > > > > Regards, > > Ariel > > > > [1] https://news.ycombinator.com/item?id=3D37671991 > > [2] https://www.reddit.com/r/programming/comments/16tf5ne/how_i_got_rob= bed_of_my_first_kernel_contribution/?ref=3Dshare&ref_source=3Dlink