From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F406AC433EF for ; Sun, 17 Jul 2022 20:26:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbiGQU0A (ORCPT ); Sun, 17 Jul 2022 16:26:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbiGQUZ6 (ORCPT ); Sun, 17 Jul 2022 16:25:58 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADE481180D; Sun, 17 Jul 2022 13:25:57 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id 75so17769782ybf.4; Sun, 17 Jul 2022 13:25:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WQJt1app/1+BamRnBVCCSfWXec050wLumfUNaLBnpKk=; b=JVPZrBIWXwyVza1YQ8QkiNAfIvcukmRwqMGFXojnG0BcXqzkervd//1ZTSrsyyNvt1 EBcTmwMj1tnyAZSORZuQz9plll+SUJR2tEK7PxpxhMfETLD/wd6KbVgS6Uh3dGKTx2rH 9vpYT2VeflRtXyAGNrlt1NUbSnNcoFpvMOnNZdGpJ+PnjP9AIBZVjKIMJboBFgO50OtX bYe6O4VG2xs90ySn79Xr/bJhWNd7moGr07CqEsy8XS/+4iTTbWxizNmHdch6HFOrV3Yb JULodIET9iTjZ+jUymOqH+1+6Klo+V6Cwz1Iqd7NIsSi3+dIUba50CBY0eMo07VYKNSS c5OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WQJt1app/1+BamRnBVCCSfWXec050wLumfUNaLBnpKk=; b=3zXKP5janbe1n0xrkurMF4IJeOwn6ercuP1wsh9IMgeGUJrLn52GRL902NNu012JzG urB1i+z5qSQZ/5CWAEAOnVyUFoHbaSKYiPEC7AdUWae99dy59lDD7JWpJhMwBcFFFjH7 9RKptU/uSekjP21wHkqPuFf2DgYGm4BPNK/mSS79YOhUy8LDaqSyyzMjxMhvjNtBafLu SBNgtduUlmuviu8H/GPDuaoHHpEBpzpB1vFcTXyX2dQFiujugOpV2uJkI3VTwfap6REd qUF5R71cMmm5lDjDFnimRINVVnU5ulECLnsUW12JYCv2WiJ/NJLyd8mAvS3U+FQddXA6 t2rw== X-Gm-Message-State: AJIora928iy73DqmIjAcBkLkUjbG60OXkjrcHGLSj162qxWC1WJ9a8MR g+a15fJFRa4jD+R4BnySyWjmZqyaFaEnQOhrLhXnl4QPEdY= X-Google-Smtp-Source: AGRyM1uUaFp4jr9Q7LCoBIhWkwizwk+v22P6cWnEUs23PHHmkHZVztizIgKt9DyWUHUnc1D79SgpJ1/yhCHxHRLym/w= X-Received: by 2002:a25:b0a8:0:b0:66f:eb53:76ca with SMTP id f40-20020a25b0a8000000b0066feb5376camr14168595ybj.617.1658089557008; Sun, 17 Jul 2022 13:25:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sudip Mukherjee Date: Sun, 17 Jul 2022 21:25:20 +0100 Message-ID: Subject: Re: mainline build failure of powerpc allmodconfig for prom_init_check To: Linus Torvalds Cc: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Kees Cook , linuxppc-dev , linux-kernel , linux-hardening@vger.kernel.org, Segher Boessenkool Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 17, 2022 at 3:44 PM Linus Torvalds wrote: > > On Sun, Jul 17, 2022 at 2:13 AM Sudip Mukherjee > wrote: > > > > I was trying to check it. With gcc-11 the assembly code generated is > > not using memset, but using __memset. > > But with gcc-12, I can see the assembly code is using memset. One > > example from the assembly: > > You could try making the 'args' array in 'struct prom_args' be marked > 'volatile'. > > Ie something like this: > > --- a/arch/powerpc/kernel/prom_init.c > +++ b/arch/powerpc/kernel/prom_init.c > @@ -115,6 +115,6 @@ struct prom_args { > __be32 service; > __be32 nargs; > __be32 nret; > - __be32 args[10]; > + volatile __be32 args[10]; > }; > > because I think it's just the compilers turning the small loop over > those fields into a "memset()". That didn't work. "Error: External symbol 'memset' referenced from prom_init.c" is still there with this change. And the generated assembly still has the memset for "struct prom_args". -- Regards Sudip