Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3080361ybk; Mon, 18 May 2020 17:25:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVHICB7DHC5FfoTiPhsedDBqfw8WVWUOkIFSXKeUUXqeHkB40+bCmqXXrPVgi0ie421a4t X-Received: by 2002:a05:6402:c2:: with SMTP id i2mr16353286edu.224.1589847913760; Mon, 18 May 2020 17:25:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589847913; cv=none; d=google.com; s=arc-20160816; b=kvJBRA/XIeiiHRMZ89uECtqYW1ZNYkF8lhBIv15uuuNxxTrSQSY9BaGxK/JYrk5iZV UoiCRF2PX/ZJiiSbaI2xGjuTZUJRv2KOCMsYgo9DuaajuMX+Cj4AQIv5Uee8vM8fkusx OK2HkoXM1Kbf9cks6mK6fWbcEzcl4IDdrL3/JtmU09UV0poYd/bB0x/t84e1HJ190+zJ IWUJdgggLzhPHawj1wsy7fChLG9+VdliBfTPcITi1N/z0JMCyWiO9JXXZ1GLQSrFM6u+ 81+JwZUoIjZlFSDZ4Afu7+P/7ozfPA4xe5oDOzIh4UrLO1UpPodz3Kb5JSoVa08TgLHh gI9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:user-agent:dkim-signature :dkim-signature; bh=6dez2inLO9ku1pNNSEEQg2wUTyCCTFZfY7XJVnTZ6zo=; b=Q3EmUce16Nqk5tDeJJ3ZmVzIPooHxceTSHhyvgHUzFmo68foMwleWipO/r53FZ26kP APjV8xk+sdy177EeaCTo8VUqKNvZyvDd+bwDYu4wTYT1564teJu1den0aQcYAs7mwrOf oVQH7CgUuLEb0noLccqe6gmlc0CHwVSrc6G/C7BedlTn00YvlB+Exrism+0g/b/VIEQF n+op10r964yJnoeMMYkoB+/HMobaO9qy/7N0cAxhP0eu/1+/NasStOJnwSHGPtuEAUh2 RGJrD750sVH9r/KvxOloVWBX1A7LVAuI0vcwnZZhLeF6Q7ExOQF8nSfSRACB4p1m9Xll NzUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm2 header.b="Jke5t/vu"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=eH1davhv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y22si7686653edv.198.2020.05.18.17.24.51; Mon, 18 May 2020 17:25:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm2 header.b="Jke5t/vu"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=eH1davhv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbgESAXL (ORCPT + 99 others); Mon, 18 May 2020 20:23:11 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:55409 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbgESAXL (ORCPT ); Mon, 18 May 2020 20:23:11 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 19F265C0073; Mon, 18 May 2020 20:23:10 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute3.internal (MEProxy); Mon, 18 May 2020 20:23:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm2; bh=6dez2inLO9ku1pNNSEEQg2wUTyCCTFZ fY7XJVnTZ6zo=; b=Jke5t/vu8yu6lIojT3aomUQNi4Fakt3uHDflIlLQnEuw67N nl1dezDfNQvJOgTEkrBZvoW5MOBynt+0ypcxoPrjSiPuVAYL+2aa1MgzMfINgL34 01bVmRbF5u0YT6loEp8zJ3HDl9R7FFH2a7Jw9RebEZOu9hMKIzzRyDHZjOJAayVO +znMhvU1Bu+DthWqE+Fvih4+w8E+hg47lo/OaMzj9kIZnpVXO6TvJQf8RMa2ub10 5H/4QTrxXBPK3gXPZpQWDiDQm0VoB4VQxPgWU8FVOaFHWUFke6YBfVrlgtx0OcN8 2dPJm9zAGwNOH5VxtwoctQQ7zh69gc9+6rKJfvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=6dez2i nLO9ku1pNNSEEQg2wUTyCCTFZfY7XJVnTZ6zo=; b=eH1davhvjbSqau6PYdxA6Z MLKj8NDL7V/T7TQ1WggrseuNjWCy/Sqwh1BSevutAAJsSGeSo+Kx7YIAVdyrgP4J YnHWk+/BnIKedl7lQEATSOfoX3tFL+/3hbzS8qMbINKkflDX65AfFBYdJZocUPgm 9UpjNb2mDmwPU64SAjWSL3L9xH0lKhmdJwtBwAmpEApD9cX42iUMr7lpKUy+kZ2K 7+0YpoyGl587b0MRquTIm3KZku1UGMf9VQFlUpXdEjbUX/J9RG9ANnZl1ZG6o8DK umcChQ7n4nqrIoDe87BuAusR4AZHoMVBSRFyjt7bKI2MFSceaigSf8WYwRmzh8GA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddtiedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdetnhgu rhgvficulfgvfhhfvghrhidfuceorghnughrvgifsegrjhdrihgurdgruheqnecuggftrf grthhtvghrnhepuddttdekueeggedvtddtueekiedutdfguedutdefieeuteefieelteet vddthfeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvgifsegrjhdrihgurdgruh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3B312E0109; Mon, 18 May 2020 20:23:09 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-dev0-464-g810d66a-fmstable-20200518v1 Mime-Version: 1.0 Message-Id: In-Reply-To: <20200518112059.c19899ffb17a4843bf4f74ab@kernel.org> References: <20200517153959.293224-1-andrew@aj.id.au> <202005171447.00CFE0C@keescook> <20200518112059.c19899ffb17a4843bf4f74ab@kernel.org> Date: Tue, 19 May 2020 09:52:48 +0930 From: "Andrew Jeffery" To: "Masami Hiramatsu" , "Kees Cook" Cc: linux-arm-kernel@lists.infradead.org, "Russell King" , labbott@redhat.com, mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org Subject: =?UTF-8?Q?Re:_[PATCH]_ARM:_kprobes:_Avoid_fortify=5Fpanic()_when_copying?= =?UTF-8?Q?_optprobe_template?= Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 May 2020, at 11:50, Masami Hiramatsu wrote: > On Sun, 17 May 2020 14:48:52 -0700 > Kees Cook wrote: > > > On Mon, May 18, 2020 at 01:09:59AM +0930, Andrew Jeffery wrote: > > > As mentioned, a couple of attempts have been made to address the issue > > > by casting a pointer to optprobe_template_entry before providing it to > > > memcpy(), however gccs such as Ubuntu 20.04's arm-linux-gnueabi-gcc > > > 9.3.0 (Ubuntu 9.3.0-10ubuntu1) see through these efforts. > > > > Ah, dang. :P > > > > How about converting them all to unsized arrays, which would also allow > > the code to drop the "&" everywhere, I think. This is untested: > > > > This looks good to me since it uses same technique in sections.h. > > Acked-by: Masami Hiramatsu > Kees, Were you planning to send resend this, or were you looking for me to polish it up? Andrew