Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp665647pxa; Tue, 11 Aug 2020 11:54:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwi8XQORBML1zNej2QqOvjk2Qts29Vm719CnVFbqs0WdK7NSdMhk7Atft3IT8dUgZW+5rZM X-Received: by 2002:a50:ba8c:: with SMTP id x12mr28251524ede.319.1597172060161; Tue, 11 Aug 2020 11:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597172060; cv=none; d=google.com; s=arc-20160816; b=DxSgbMlWx4QHsJXOpe5Snk0SSNwHYjBBa1dbeyC9kQs56M0lzIysniYjHWe4yyUfTc revQ2t5bUy3HF0i4PUg1IKDm7nWiqKLEd5nSIqAaR4K/D+/a/npZzhKm18atH1nyehcI OWsQqhX+DpW64MC0QNUxXVIzBARQtkt39OUo+UltO6CoVMhQo/dRwbWGjrgnfrsGkAbj Q4JgJB62NwY6iic6DYIvwSbKlZ/WZ2XFaO74z0vNcncKwwVrR9J04g3l2GHjwU/9J5Jd XpEAK3ae+qGXmWsYJU3WZ+PEmi51azZxYioYSAgYiJZtH/rP+XhgHPZCZkfiY73HWSxN 5XUg== 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=HEwTMhUPzLSi9FAPGLTDgy/zuWlgVDad06Vmntox7No=; b=faJNaoA78UzueecaXStTv9JDl3s0PGsQ0oMbXc5Dkyc7q9YPeM9XLX3bfxDTB6kn4v WAMTIG9H/Gjgjmayc/csyCU1zzgsXZXOeufYWwly994oDjDBjOJ7x/wfaksYaevL0F9g 2MVamsDfSsAyU4yCUVq1LuFHZBPkWwDiviLzkqX5LIpD+kgxyGQPsPbHz3nAACQfFyKg e/ZxfVWHRJJ+369eduRwtHrTYPyY6fa34HWB3XmQthAX/kswwLAo7n4/nXBrPqrqXwtC el6e8MGJQlkj8zWNtcOD3NAzsgvoe/ST5IFXR4JUeQmXR9lkrsu872+//Tg6ZDZAOKAS X/Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eqgXAg3t; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f8si13161321edy.251.2020.08.11.11.53.56; Tue, 11 Aug 2020 11:54:20 -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=@kernel.org header.s=default header.b=eqgXAg3t; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726483AbgHKSui (ORCPT + 99 others); Tue, 11 Aug 2020 14:50:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:60808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbgHKSuh (ORCPT ); Tue, 11 Aug 2020 14:50:37 -0400 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C5C3A20774 for ; Tue, 11 Aug 2020 18:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597171837; bh=bHJDMU0rLbfo8cYDMgt+G2+hN4y5s20JWP641OKcUdI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=eqgXAg3tJSKfnyBd2azKFYti0md97OdpjiDAp6m1SLfpdiNDp4gsaZtNfR4WutaPA UQIibY8ed8CeJtkADBqhr10runJYokKrwP0ysFS4/5dBEePH3tHiiSc+xazgZ7r8qb JLZ8z00DI0Gadljn18O8MIr4Mk/A1N0jlQVAQUN0= Received: by mail-wr1-f43.google.com with SMTP id 88so12441808wrh.3 for ; Tue, 11 Aug 2020 11:50:36 -0700 (PDT) X-Gm-Message-State: AOAM532WNa6vl0+4ExSUJsGSi0/2IV8fWELj2CHBPcdHOt8ktA9Wa4JG 2HXXXv1B7cxbFQTO1zVx8WF9G8Bm5nWDCYYXhAnErg== X-Received: by 2002:a5d:400e:: with SMTP id n14mr7069333wrp.75.1597171835374; Tue, 11 Aug 2020 11:50:35 -0700 (PDT) MIME-Version: 1.0 References: <20200810232636.1415588-1-krisman@collabora.com> <20200810232636.1415588-4-krisman@collabora.com> In-Reply-To: <20200810232636.1415588-4-krisman@collabora.com> From: Andy Lutomirski Date: Tue, 11 Aug 2020 11:50:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 3/9] x86: vdso: Expose sigreturn address on vdso to the kernel To: Gabriel Krisman Bertazi Cc: Andrew Lutomirski , Thomas Gleixner , Kees Cook , X86 ML , LKML , Linux API , Matthew Wilcox , "open list:KERNEL SELFTEST FRAMEWORK" , Shuah Khan , kernel@collabora.com 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 Mon, Aug 10, 2020 at 4:26 PM Gabriel Krisman Bertazi wrote: > > Syscall user redirection requires the signal trampoline code to not be > captured, in order to support returning with a locked selector while > avoiding recursion back into the signal handler. For ia-32, which has > the trampoline in the vDSO, expose the entry points to the kernel, such > that it can avoid dispatching syscalls from that region to userspace. Almost looks good. > +int arch_syscall_is_vdso_sigreturn(struct pt_regs *regs) If you make that bool instead of int, feel free to add: Acked-by: Andy Lutomirski