Received: by 10.192.165.148 with SMTP id m20csp462993imm; Fri, 20 Apr 2018 09:31:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx49pNtg5j53BQa0tTt97HN+x6tsUuhqLILerlIPkpZqAgjYfsfiWXmHe1n2kx3nFuXOPAFj5 X-Received: by 2002:a17:902:9349:: with SMTP id g9-v6mr10806177plp.73.1524241893628; Fri, 20 Apr 2018 09:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524241893; cv=none; d=google.com; s=arc-20160816; b=K5VOq7s3SEjFjREZ+P0FZ1rFEyHIoxXHgm3OQ/obxi2h+TmZWAMm48HxXB/kxkxFyE 9gmUCGmpcSKskHuSOiDqfcbHsqbfq9AAQ6UNqRh+9e6bPMz0baTCy8kP/NZB8krtPZuG tdhCfTfCA7Xy1AYshBig7E4kq7xKaOuhckP2iv62JV5o2a7808618mRwHBLnslVV9HDL cj6X4nxtTPV8G+rcV+eJB/etlbgrYqzSfBuI3KsAVIxRhKNzSkHc5vP+2vfq2znx4D/1 abgoUFHw/xtavSIKBswy/gdphWFhy95yFuAFKOcQKWnoqHpcdy0t4PmdAxEZ1pDuaWEo shJg== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=8x2iHJTubTmHaC7HfjthakrOjOl3lZOE/gIpiRF+Mfk=; b=EC9D284XdYXfkS7MpbvmZ/ji2tNqrKjAAXzsS8Y52hYrc4J3xhQmuR489fndkAmAkX QgXxlOJZJEDhkeGB5ydh6NwOjxl3uPXfhJ/5hVQFi0pklBkaMVIkfij2LyUwZU9XpMqK LzVHvDEFGWyjfkmCZkP/4OPc4AxQAuRMnrdzKO9xIWjJjbr010Xzlkjjq60ZL9n4e8qo 1BTPPIIMA5I+ZLsBuvQFU+UFLMiczRgk0NvBxHSzYekkJI8VUQujO8qyEdpKSuzvuIei +Xp1XwGWYgq78Et+S6E29kTf9gfGnLNuNCpPAv516B6Ee3vKpI1zsBEC1qNdjKwwhb2f KOWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L8WCInSH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si5040556pgz.412.2018.04.20.09.30.49; Fri, 20 Apr 2018 09:31:33 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L8WCInSH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751258AbeDTQ1h (ORCPT + 99 others); Fri, 20 Apr 2018 12:27:37 -0400 Received: from mail-yb0-f193.google.com ([209.85.213.193]:45952 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbeDTQ1g (ORCPT ); Fri, 20 Apr 2018 12:27:36 -0400 Received: by mail-yb0-f193.google.com with SMTP id r13-v6so2083234ybm.12; Fri, 20 Apr 2018 09:27:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8x2iHJTubTmHaC7HfjthakrOjOl3lZOE/gIpiRF+Mfk=; b=L8WCInSHaBeR4C8go0Ah7NRtmozi0n8Ma9pR6MWikLEnlTv6Z0lL1LcTp6MrYoVxFY 0oDKnVEIgrz/zt3KHjGzk/0GvQTwlG036EF+jdbJa0kov7cgaLI/dDzpAsJOiT3/us55 BVnVjz7VsIQXD6KUR+kav6mp0WjNuTboriC5e49ydwxDGZAc4//xIZ8rT6rWBKp29ze0 b6/JwMX0zamrh8wFUZ5IoT9hGRxg29tWI4ZBZ1RPaJUJVEsxeNueYJoUUToanty3Mtct TR0Jx6Cm3CPAsgOTsbX3OeUtJhpq7JagTuAJtrvjfYyqAZcxtMu6OIiVrIk8PE4whWjN 2J8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8x2iHJTubTmHaC7HfjthakrOjOl3lZOE/gIpiRF+Mfk=; b=fqWqYRIKP1EcjM6CUwYjZgZ6SGCQNjNkMP/0W2BblZNe/TaoA2F8MXbM0wQhE1GVm6 jc3HIW24VPYTi8ezWYzT+QQQiEN1j/ArXvB8ApjIZGoOju6tAmH7IqFa1SymzyshF7Gt Ll9DxndWH61BI/NWGpAgG5JTRYu2ff5tToy7Yc8Gz30QFrN0xPG8hUD9P7Swczvu389P 1KnR4VTJDPG8VaI+qo3lzwG4SHY54gtxok5UdZdwY85Pnhk5kDDLH8PoDe56A757Md76 HvfKKAh2F22EwLc0WkQyQIyHhlppmCQhHKM+l0T7FkFGlQF4KoCBzRsjsTEu8nGu9YI0 a1XQ== X-Gm-Message-State: ALQs6tAFDZ92TqhSaSGzN7j8EWgDNcavnSUheMRwdEZwLaZeB4P6EuNO m2P/5wCgGbGF/TvLnIORJcJXZpXEWJVViWAiM7w= X-Received: by 2002:a25:9c03:: with SMTP id c3-v6mr6560093ybo.523.1524241655396; Fri, 20 Apr 2018 09:27:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:628a:0:0:0:0:0 with HTTP; Fri, 20 Apr 2018 09:27:34 -0700 (PDT) In-Reply-To: <20180420143811.9994-22-ebiederm@xmission.com> References: <87604mhrnb.fsf@xmission.com> <20180420143811.9994-22-ebiederm@xmission.com> From: Max Filippov Date: Fri, 20 Apr 2018 09:27:35 -0700 Message-ID: Subject: Re: [REVIEW][PATCH 22/22] signal/xtensa: Use force_sig_fault where appropriate To: "Eric W. Biederman" Cc: Linux-Arch , LKML , Chris Zankel , linux-xtensa@linux-xtensa.org 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 Fri, Apr 20, 2018 at 7:38 AM, Eric W. Biederman wrote: > Filling in struct siginfo before calling force_sig_info a tedious and > error prone process, where once in a great while the wrong fields > are filled out, and siginfo has been inconsistently cleared. > > Simplify this process by using the helper force_sig_fault. Which > takes as a parameters all of the information it needs, ensures > all of the fiddly bits of filling in struct siginfo are done properly > and then calls force_sig_info. > > In short about a 5 line reduction in code for every time force_sig_info > is called, which makes the calling function clearer. > > Cc: Max Filippov > Cc: Chris Zankel > Cc: linux-xtensa@linux-xtensa.org > Cc: linux-xtensa@linux-xtensa.org > Signed-off-by: "Eric W. Biederman" > --- > arch/xtensa/kernel/traps.c | 10 +--------- > arch/xtensa/mm/fault.c | 19 +++++-------------- > 2 files changed, 6 insertions(+), 23 deletions(-) Acked-by: Max Filippov -- Thanks. -- Max