Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11351094ybi; Thu, 25 Jul 2019 14:49:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAKm1g9c7S6MXh7fKkEZruQAcjpm1VnjQmzpc0d8yK87Ly2OA9YreK4KgrIwLBZfD4qEo7 X-Received: by 2002:a62:2784:: with SMTP id n126mr19044367pfn.61.1564091397777; Thu, 25 Jul 2019 14:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564091397; cv=none; d=google.com; s=arc-20160816; b=YgnSRFfG5tpM/i6zr9Ee4BOL2lkH+AnsiY+aXkPlzKOYPss508Imdd6rBsem8mfslv 1HUQDQajwBbSa2FXdh23gFjZpZeCE7AAM9J/6c0UMKoxw7nR84uKLGxG+kViQzn0osqp eLZquaioNBG0xYT5A7gcCDWPOjgJTcR2k6bdJV2kxyu03wsIZZEf+me9r+17i5C7xt/K QPoz2DVEYaKwDS7Mtshbz9I/mYqNLg3aZzMkO3tcNaQAKELmJUVtCojKk5t0JaaOrtV4 UG1pytZIrEByjRIT6JLNR5zXgm1sScmITH0TUC5J63aMQd8eevRIyARqE1y6dcmAe7Ml 7OxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=+GMq8KSd8sOpc9c8hA5hD92XakL+EMRm0ezdOCuUhsY=; b=xSpt93Y6rRYGcqJdF5b69ELPqM5JM6hpKgQq9qCjyk4ctwOKsIhNJ/4wnPjujM5pHo ZxczD8aapLB1p4BCAc38/ms88+W/2tJEXT5NuJaMSmC7F6AU8o10OZq7H0cwyvocIc9t MMHBPQdVYMtU38a4hXp5Wgw3yqCmJhykadwxdrz0ddRBvZA1SZtOLS6eGXKp0+yoQLs2 q3+y8GkMwThH7CCBCc4ASQiXXDQn144Tm9qcf6XRR8KVQWrN/lpWDhiLvJhBWMX0kO1R Ls9ZWTGbBHO6ULiSDI4Xv1giBH/kJ1OU6s4/D3YZd5nzqvnnIEB+F4FA0kqfOX7E67jE 8xBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1si9382329pge.227.2019.07.25.14.49.42; Thu, 25 Jul 2019 14:49:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726780AbfGYVsk (ORCPT + 99 others); Thu, 25 Jul 2019 17:48:40 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:47683 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726704AbfGYVsk (ORCPT ); Thu, 25 Jul 2019 17:48:40 -0400 Received: from pd9ef1cb8.dip0.t-ipconnect.de ([217.239.28.184] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hqlbD-0005XK-2i; Thu, 25 Jul 2019 23:48:31 +0200 Date: Thu, 25 Jul 2019 23:48:30 +0200 (CEST) From: Thomas Gleixner To: John Hubbard cc: hpa@zytor.com, john.hubbard@gmail.com, Ingo Molnar , Borislav Petkov , x86@kernel.org, LKML Subject: Re: [PATCH 1/1] x86/boot: clear some fields explicitly In-Reply-To: <345add60-de4a-73b1-0445-127738c268b4@nvidia.com> Message-ID: References: <20190724231528.32381-1-jhubbard@nvidia.com> <20190724231528.32381-2-jhubbard@nvidia.com> <345add60-de4a-73b1-0445-127738c268b4@nvidia.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Jul 2019, John Hubbard wrote: > On 7/25/19 12:22 AM, Thomas Gleixner wrote: > > It removes the clearing of the range between kbd_status and hdr without any > > replacement. It neither clears edid_info. > > > Yes. Somehow I left that chunk out. Not my finest hour. S*** happens > > + char *p = (char *) boot_params; > > + int i; > > + > > + for (i = 0; i < ARRAY_SIZE(toclear); i++) > > + memset(p + toclear[i].start, 0, toclear[i].len); > > } > > } > > Looks nice. I have no idea whether it works and I have no cycles either, so I would appreciate it if you could polish it up so we can handle that new fangled GCC "feature" nicely. Alternatively file a bug report to the GCC folks :) But seriously I think it's not completely insane what they are doing and the table based approach is definitely more readable and maintainable than the existing stuff. Thanks, tglx