Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1927965pxk; Tue, 1 Sep 2020 11:03:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZMGRIifTn/tPNerwHJKCPlangTGbhR0OJgw18egcWhe7TcmmnQfGk/g9qcbeHOFA57eA0 X-Received: by 2002:a17:906:4993:: with SMTP id p19mr2753966eju.277.1598983436700; Tue, 01 Sep 2020 11:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598983436; cv=none; d=google.com; s=arc-20160816; b=nHWRu/FewBLADpa+WTvW8ttqQsSJPBTvj574VFSp9bEyeOr0etVi2rSdxi3I3IS2Gn QJ2qIIsJiNB4Eea6SicmZOyzfBl9Lu6EXj2yZGDZPpt9t7WK/zr/uvSwTfdlvu3oJOcG 8D8mry0da5+B6kvSOxvM3zHsarfg5eLZqvHgJWDetI1+z/+HcWcy1d+hYgTmbOh0qRZu jEytImXF0G/76hlWQ1LMD+ulNwI1XIMmINADSIz8RsJ8yhX2/C0SC6Oa4oxdaa4FxazL hH4v7VTJkbOfh3kIVUwyVMIO8uxB+fXcVj4CjCmkhjxWGOnIqaWf1lNX5yY62JBsDq/h LfCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=85apg5NRwahAocGqqv4gi+n4yORybk6Y48nEDadq/2g=; b=DKoQNFoEwhpk4DnFyusUXCMb4XI+KXoPXOlQGf/THdhqu/3ptDxRBdbJwjpOympiLq 6VIVvrm7lkSyXc+2g388+gQ4PymuOxEduEzkg7wrIRFTMPTW/KFg0RWgoFclRUW97B8g Hx7LjnbmHdv4Mf0QG+jjsdB7AtCmHZfhev7mVjY2tO+xuln9PSeD8Iay9Vr8rA7f7li5 S8kA2cs5UkcsZQbqWZP2T4qeBKQzi/lrsBP/RVt7e/05OTBGJ+jYbOimGL9Q6/txt5w1 oy98g2jbZOu9JG8x0GP11jf1zlqSmFA919QnO+iFdAw4J6PFAZieYbCN1vyeiOnuIgNs SpnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ubDddq84; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si960952eds.102.2020.09.01.11.03.32; Tue, 01 Sep 2020 11:03:56 -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=@google.com header.s=20161025 header.b=ubDddq84; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729886AbgIASCU (ORCPT + 99 others); Tue, 1 Sep 2020 14:02:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726377AbgIASCS (ORCPT ); Tue, 1 Sep 2020 14:02:18 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98E4CC061246 for ; Tue, 1 Sep 2020 11:02:15 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id g29so1096612pgl.2 for ; Tue, 01 Sep 2020 11:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=85apg5NRwahAocGqqv4gi+n4yORybk6Y48nEDadq/2g=; b=ubDddq84UdfD6pp9neg2X/djSllMkEZgfNKHLcl+/8Tqh7gB+v1dXHMnCbcajfMT5r B7/HeT9cdXORcYS9REmjQuFYNKX/+HwMqwfjFIrSj0bnWwsMrw7vrC0SUO/iJmurMuzm +CsE7mT59ZRE14OUZf5ZSXV//2DBLTrM+8uvBGzWpbTeqBZl1ytvNHFJw8W5Gg8v2q3Y 5KDAf5GVHYDlOxIl2Ji6J7BYxCQ1bTXLn463uNqsLhwWqC8XCfeJMcIOMRJrQ9eu5qTq L3SbQ00tnlmCMr6xPqxE9U+UouLTzvhmY2jkp7o2QQgSXT1HsSWTbgmMXHD2Ekx0imif 6JbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=85apg5NRwahAocGqqv4gi+n4yORybk6Y48nEDadq/2g=; b=TB6dbns1NKwInd+Z81YqmZnP8GLepEenbk/iHb9r2KFfLQfnVE5RQtbFPcwycqKlAR FUZ4vWQIo3dW0zLk5u242hhvV1cd9wZpj3idU9650XEaOiJXjm7JRMD0v1b3o2CatDTX 94KATGdZaD0uAh/xZ5TaU9D8rCbKIVk2qknqpnyKr0YlPUJomxDs7OSBEiKvy8GzzTnJ n6DgGtIvP+G8VK3XVAfrsGOZhohFn8M/qMSNoJX02IvTLDdqL9Grsx+3PClmIJ1yjUyl sot0j1bff9UkWDvqpeJbQ51xE0v46uD+ybZ93PcMjWFgnyF9Q9G4nurmvfur7zi59Mlt DH2Q== X-Gm-Message-State: AOAM530J3SLd+pBGxLm333RXpUgExLjdNMzj60wHVvrXPWu+rz4lNULm H4xw/zRD9w1GpDRg23mxag/6W4qYvM3ldlB4ncavjQ== X-Received: by 2002:a63:9d09:: with SMTP id i9mr2397873pgd.381.1598983334165; Tue, 01 Sep 2020 11:02:14 -0700 (PDT) MIME-Version: 1.0 References: <20200821194310.3089815-1-keescook@chromium.org> <202008311240.9F94A39@keescook> <20200901071133.GA3577996@gmail.com> <20200901075937.GA3602433@gmail.com> <20200901081647.GB3602433@gmail.com> <202009010816.80F4692@keescook> In-Reply-To: <202009010816.80F4692@keescook> From: Nick Desaulniers Date: Tue, 1 Sep 2020 11:02:02 -0700 Message-ID: Subject: Re: [PATCH v6 00/29] Warn on orphan section placement To: Kees Cook , Michael Ellerman , Masahiro Yamada , Nicholas Piggin Cc: Ingo Molnar , Borislav Petkov , Catalin Marinas , Mark Rutland , Ard Biesheuvel , Peter Collingbourne , James Morse , Ingo Molnar , Russell King , Arvind Sankar , Nathan Chancellor , Arnd Bergmann , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , clang-built-linux , linux-arch , linux-efi , Linux ARM , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 1, 2020 at 8:17 AM Kees Cook wrote: > > On Tue, Sep 01, 2020 at 10:16:47AM +0200, Ingo Molnar wrote: > > > > * Ingo Molnar wrote: > > > > > > > > * Ingo Molnar wrote: > > > > > > > > > > > * Kees Cook wrote: > > > > > > > > > On Fri, Aug 21, 2020 at 12:42:41PM -0700, Kees Cook wrote: > > > > > > Hi Ingo, > > > > > > > > > > > > Based on my testing, this is ready to go. I've reviewed the feedback on > > > > > > v5 and made a few small changes, noted below. > > > > > > > > > > If no one objects, I'll pop this into my tree for -next. I'd prefer it > > > > > go via -tip though! :) > > > > > > > > > > Thanks! > > > > > > > > I'll pick it up today, it all looks very good now! > > > > > > One thing I found in testing is that it doesn't handler older LD > > > versions well enough: > > > > > > ld: unrecognized option '--orphan-handling=warn' > > Oh! Uhm, yikes. Thanks for noticing this. > > > > Could we just detect the availability of this flag, and emit a warning > > > if it doesn't exist but otherwise not abort the build? > > Yeah, I'll respin those patches. > > > > This is with: > > > > > > GNU ld version 2.25-17.fc23 > > (At best, this is from 2015 ... but yes, min binutils in 2.23.) Ah, crap! Indeed arch/powerpc/Makefile wraps this in ld-option. Uh oh, the ppc vdso uses cc-ldoption which was removed! (I think by me; let me send patches) How is that not an error? Yes, guilty, officer. commit 055efab3120b ("kbuild: drop support for cc-ldoption"). Did I not know how to use grep, or? No, it is commit f2af201002a8 ("powerpc/build: vdso linker warning for orphan sections") that is wrong. -- Thanks, ~Nick Desaulniers