From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752981AbeDTRVM (ORCPT ); Fri, 20 Apr 2018 13:21:12 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37720 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751159AbeDTRVL (ORCPT ); Fri, 20 Apr 2018 13:21:11 -0400 Date: Fri, 20 Apr 2018 19:21:09 +0200 From: Oleg Nesterov To: Thomas Gleixner Cc: Dan Carpenter , LKML , Peter Zijlstra , "Gustavo A. R. Silva" Subject: Re: Smatch check for Spectre stuff Message-ID: <20180420172108.GA29920@redhat.com> References: <20180419051510.GA21898@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/20, Thomas Gleixner wrote: > > > kernel/signal.c:3457 do_sigaction() warn: potential spectre issue 'p->sighand->action' > > This one is correctly detected Not sure, k = &p->sighand->action[sig-1]; calculates the addr, although we do '*oact = *k' later. I dunno. > > kernel/signal.c:65 sig_handler() warn: potential spectre issue 't->sighand->action' > > It's unclear from a quick look whether it's really possible to speculate > all over the other things there, but we probably err out on the safe side at least not in do_sigaction(). And in fact do_sigaction() doesn't need sig_handler() at all, it could use act->sa.sa_handler instead. Oleg.