Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp625439pxu; Thu, 7 Jan 2021 13:51:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3mKlvMKEGshFdnOl8/cIxszVPQ72vB/eu/3W+ZuGDCa27xZTkL4I9u3bn8wveT0eiAFvN X-Received: by 2002:a17:906:1d0f:: with SMTP id n15mr605686ejh.26.1610056270457; Thu, 07 Jan 2021 13:51:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610056270; cv=none; d=google.com; s=arc-20160816; b=HGEhjQp3Av8dsIxHogqZjxdIOOQVpXjWmwdDmyd4eEjHX4jaWrgXkytVTxqMlNM9Je UHKx+qzh2ksPXX1DXvinXtGRinWZiTRZ2cGkULIib7kFZ32PKj/v0C+ImxNbo0G8ipSG LFVQf0uqhc7yZirk1xRWE6kPvRk7HMh+Od70K5YXPRgwfpHQ5F2ajVtwU3p+JKKtDGvD IM31jHBvyf0JOi+GJ+shi3J9I+ccDguDEWpK+XWuN1VveMmD+TVtf3aUjKMuriS4oEur vsgN0WO7ezt6IyYZlOLAJ1pTlbGgd6ocYtIqeybEa4rFS09mxl8NCBRQ+Jabph1fewJ+ Qssg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=M2y5ldgOdSGehetTiBK+U8i5swyTNR/kRJ3FUEfcFsM=; b=rJ2vk7GpTXWCnPK2axW5/6PjeoswSeEMIR/Nk7j9FkksQxKfNzZnbwY5yo+qkC13ba 8p9nny/R4/Afs20RrN0fUaw0kUaIgT7MqMkUBUEZfd+4G/jB6NDivlTt58AHeDP1rsiM zkx8nlCD8zZcWItrr2RYWSJMPAXMmJwmDBLbzgFQSIUAs2SRWJQpFbmyuCykWF2Ke12d QkLmbCTktMaJD6ZwB9gyyMefF/vTgQOZ4U3T3XbaFKO1hZ5UhXTPJHCgxfSWoSucEVLy h5Tk9Gj4+V7ezSeNij4m5KHpFNlY+UBqzYFIAtzpG1yN3Gmc4cU7O6329txo3B9jXNPu 0++w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PV5pr53s; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si2748296ejn.15.2021.01.07.13.50.47; Thu, 07 Jan 2021 13:51:10 -0800 (PST) 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=@chromium.org header.s=google header.b=PV5pr53s; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727928AbhAGVt7 (ORCPT + 99 others); Thu, 7 Jan 2021 16:49:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727227AbhAGVt6 (ORCPT ); Thu, 7 Jan 2021 16:49:58 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 798E1C0612FB for ; Thu, 7 Jan 2021 13:48:55 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id i5so6178592pgo.1 for ; Thu, 07 Jan 2021 13:48:55 -0800 (PST) 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=M2y5ldgOdSGehetTiBK+U8i5swyTNR/kRJ3FUEfcFsM=; b=PV5pr53syG3dJsfA06CxIQT0gd9pQVQsuR4CvYMsj3OJ+auH8BqHVAvz2r/fIBJU8/ XShYvN5UqNLnFx2Bm/nywgy5zgJN8CqkWY58vc97jKtFG4u28IOAf1lOB32Bw2kAPnEk ZkNpANy4OUDLzobPKA1GBex5W1U6laQmIc84Q= 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=M2y5ldgOdSGehetTiBK+U8i5swyTNR/kRJ3FUEfcFsM=; b=o3dcZyGIGYqLmUrOOhAMxRNworcKZqu3jQhPG6OHdgomGIIy9n9NfGv0xFg91weRIw Syf3rCypoXIzTIKVhH64WoKzlSZNmqboZHJb+rAqyfpofgVlOp3u3ITgPsAGEwEyEeLk xO+b7hBsrqv8j7FR65yhqORik/oVlZaw4A15AsESTMy3a0XopfCLxvpbzVocv6PpFeMH +PenMecc8J6q818wv69ca+BbLSVaBAChYByt9vMW7PnEoyr8xyU2IL88vkSZcre2FzYm g1k0PDC7O0PdAKKr+fNJfgM+aitWhuUMwBOe298ZARc25RgReHb8r6VWCfjNRbxbB0rC nFDA== X-Gm-Message-State: AOAM531d7MGH2ngz5AZfpfnTvMLINzrJNX4Niaeabd//Z9BLfswNqgYM /+wtBQqOB5g1ABV2oCcq7ACalQ== X-Received: by 2002:a63:720c:: with SMTP id n12mr3815960pgc.97.1610056135097; Thu, 07 Jan 2021 13:48:55 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id 17sm6393784pfj.91.2021.01.07.13.48.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 13:48:54 -0800 (PST) Date: Thu, 7 Jan 2021 13:48:53 -0800 From: Kees Cook To: Alexander Lobakin Cc: Thomas Bogendoerfer , Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Fangrui Song , Huacai Chen , Pei Huang , Jiaxun Yang , Sami Tolvanen , Ingo Molnar , Ralf Baechle , Corey Minyard , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, stable@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH v4 mips-next 4/7] MIPS: vmlinux.lds.S: catch bad .rel.dyn at link time Message-ID: <202101071348.301DA51@keescook> References: <20210107123331.354075-1-alobakin@pm.me> <20210107132010.463129-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210107132010.463129-1-alobakin@pm.me> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 07, 2021 at 01:20:33PM +0000, Alexander Lobakin wrote: > Catch any symbols placed in .rel.dyn and check for these sections > to be zero-sized at link time. > Eliminates following ld warning: > > mips-alpine-linux-musl-ld: warning: orphan section `.rel.dyn' > from `init/main.o' being placed in section `.rel.dyn' > > Adopted from x86/kernel/vmlinux.lds.S. > > Suggested-by: Fangrui Song > Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook -- Kees Cook