Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp234722rwn; Thu, 8 Sep 2022 00:13:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR7LDjZc/Tb00A2s0HGYBvcWShocP6GWocWm8hUJ0LjPaUH3eGJ0Q7PgqpfMNrQiVPXQTx2b X-Received: by 2002:a17:907:160d:b0:741:a253:422f with SMTP id hb13-20020a170907160d00b00741a253422fmr5108754ejc.640.1662621232933; Thu, 08 Sep 2022 00:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662621232; cv=none; d=google.com; s=arc-20160816; b=V7x2ct+2K7F7atsdblDr9cYJzcYqmTEDscVwImzBSRTV0z64RDOz2t3hOiajodsksR jYlB7OgqPHMfkZLEzyx9ynm2yTUUNtzF8Mw9RMz8DyoxSfXz7aE/04g+w+LY3AwKdg0b 2Du/dnwJPBVJjJVJNU+TwlDtbiga9vFTXVLe0ygIKiMZqhpzmyK3S90j88LNWpMll7I2 iPqTHVRdugmuQCKCnInrks8qnlAQn72mA2HH4BQXGjgZYZSGdGaEbfpR1BkwvOkDJKk0 l2KCVtpHjgnFkPXVCnpy33JsyC9X2AaJMbgLEzywEo9nAHCv3zGv/uQXojox2modtVFU 4MJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=gmy5/+4JSKjjn31BCUCNFwApzR9XPUHVEEwjpPd0TFU=; b=mqMLoDC4VwnmGPJ0DhKoZLbJ/yBWBUpxGzOrwlPYo5hHN+oWdiX36kHyL7EPTIROQq CU25TvmgeWs/zIbfX6y9y5U78enPkQ2k7as2kFzDf7xgdB3nzkSnZdF9m9cByhaF1umn N1W2duThob9pIUiazXKGrbh1tV6MiQY9TyyAV4P5G3o8Sx7loV7VylgnAxfjwIGLBJVT CYt5p/MGEr4QITyVMimqGycvW6JyXUl+dYDDmqovSZHPdLK6zoffd8GxPDyUqskpZl3c dh1GY2m4ponBW8M4D3b7PZ861Jn5j8owLZSKPtTYkZCmp5uuAWnKVfuW3ixS8ec2H2eN A8MA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r27-20020a50c01b000000b00447d3d95e3dsi12030063edb.492.2022.09.08.00.13.27; Thu, 08 Sep 2022 00:13:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbiIHGxn (ORCPT + 99 others); Thu, 8 Sep 2022 02:53:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230203AbiIHGxf (ORCPT ); Thu, 8 Sep 2022 02:53:35 -0400 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65A796C77B; Wed, 7 Sep 2022 23:53:33 -0700 (PDT) Received: by mail-qk1-f178.google.com with SMTP id h27so12208298qkk.9; Wed, 07 Sep 2022 23:53:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=gmy5/+4JSKjjn31BCUCNFwApzR9XPUHVEEwjpPd0TFU=; b=D6u3Hzr+/7aEbAjCLrTckGPDHBJo6R8d9uBPPxVbcpawzXV1aiP+al/j2WFiNnuF6R wm0R3Y/GA8rX9ktPsGDFDO2Lcs3XNA6avLDb4VmUa8JUh0dtH0IRNEp1t+32e7ZgI9CO TC/Z76HqaCQZNho2H6hwOhlFADsmIMRQV6Qz0+OSxHZhmKpnJFWj5WpDOdkUt8gwbO9S 5UpnIGztsrClXQp30cKmrAYvqCud8WDExn8uHwxh7GCyNp+JjfIcDtYp5VHi98X05dXe I6uy6l9PQDIVkaPITAgf1PTTqGmcX40NDolmHFSvM/JG4Ybm87woDGbEoJjQ97TFU1Sb 1JSw== X-Gm-Message-State: ACgBeo3MUvi957vxOqG6byczPNrP6iG3+Xw/KA5pW1jG6qnbeDXjCwax YBnYWxiPrYH9JLtsHuZN2ejh1tn5AXu/9A== X-Received: by 2002:a37:2d05:0:b0:6be:8620:57f with SMTP id t5-20020a372d05000000b006be8620057fmr5123469qkh.688.1662620012282; Wed, 07 Sep 2022 23:53:32 -0700 (PDT) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com. [209.85.219.170]) by smtp.gmail.com with ESMTPSA id t24-20020a37ea18000000b006b95f832aebsm15881888qkj.96.2022.09.07.23.53.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Sep 2022 23:53:31 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id b136so4255111yba.2; Wed, 07 Sep 2022 23:53:31 -0700 (PDT) X-Received: by 2002:a25:e64c:0:b0:6a9:89cf:155 with SMTP id d73-20020a25e64c000000b006a989cf0155mr5445388ybh.365.1662620011556; Wed, 07 Sep 2022 23:53:31 -0700 (PDT) MIME-Version: 1.0 References: <20220907234345.96798-1-keescook@chromium.org> In-Reply-To: <20220907234345.96798-1-keescook@chromium.org> From: Geert Uytterhoeven Date: Thu, 8 Sep 2022 08:53:19 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] sh: machvec: Use char[] for section boundaries To: Kees Cook Cc: Yoshinori Sato , Rich Felker , Linux-sh list , Paul Mundt , Linux Kernel Mailing List , linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 8, 2022 at 1:43 AM Kees Cook wrote: > As done for other sections, define the extern as a character array, > which relaxes many of the compiler-time object size checks, which would > otherwise assume it's a single long. Solves the following build error: > > arch/sh/kernel/machvec.c: error: array subscript 'struct sh_machine_vector[0]' is partly outside array bounds of 'long int[1]' [-Werror=array-bounds]: => 105:33 > > Cc: Yoshinori Sato > Cc: Rich Felker > Cc: linux-sh@vger.kernel.org > Reported-by: Geert Uytterhoeven > Link: https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2209050944290.964530@ramsan.of.borg/ > Fixes: 9655ad03af2d ("sh: Fixup machvec support.") > Signed-off-by: Kees Cook Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds