* [PATCH 08/18] mfd: max14577: Rename state container to maxim_core
From: Lee Jones @ 2014-02-03 9:42 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390911522-28209-9-git-send-email-k.kozlowski@samsung.com>
> This patch continues the preparation for adding support for max77836
> device to existing max14577 driver.
>
> The patch renames the struct "max14577" state container to "maxim_core".
> This is only a rename-like patch, new code is not added.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/extcon/extcon-max14577.c | 22 +++++------
> drivers/mfd/max14577.c | 68 +++++++++++++++++-----------------
> drivers/power/max14577_charger.c | 16 ++++----
> drivers/regulator/max14577.c | 6 +--
> include/linux/mfd/max14577-private.h | 5 ++-
> 5 files changed, 60 insertions(+), 57 deletions(-)
Need some more maintainer Acks here.
> -struct max14577 {
> +/*
> + * State container for max14577-like drivers.
> + */
I don't think this comment is required.
Besides that, the code looks fine:
Acked-by: Lee Jones <lee.jones@linaro.org>
> +struct maxim_core {
> struct device *dev;
> struct i2c_client *i2c; /* Slave addr = 0x4A */
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [PATCH 07/18] mfd: max14577: Rename and add MAX14577 symbols to prepare for max77836
From: Lee Jones @ 2014-02-03 9:38 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390911522-28209-8-git-send-email-k.kozlowski@samsung.com>
> This patch prepares for adding support for max77836 device to existing
> max14577 driver:
> 1. Renames most of symbols and defines prefixed with MAX14577 to MAXIM.
> 2. Adds prefixes (MAXIM or MAX14577) to defines without any MAX* prefix.
>
> This is only a rename-like patch, new code is not added.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/extcon/extcon-max14577.c | 105 ++++-----
> drivers/mfd/max14577.c | 51 ++---
> drivers/power/max14577_charger.c | 81 +++----
> drivers/regulator/max14577.c | 44 ++--
> include/linux/mfd/max14577-private.h | 399 ++++++++++++++++------------------
> include/linux/mfd/max14577.h | 2 +-
> 6 files changed, 333 insertions(+), 349 deletions(-)
I think the name changes instil some clarity here.
I still need the other Acks before applying the patch though.
For now you can have my:
Acked-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [PATCH] arm64: KVM: Add VGIC device control for arm64
From: Marc Zyngier @ 2014-02-03 9:34 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391377262-30188-1-git-send-email-christoffer.dall@linaro.org>
On 2014-02-02 21:41, Christoffer Dall wrote:
> This fixes the build breakage introduced by
> c07a0191ef2de1f9510f12d1f88e3b0b5cd8d66f and adds support for the
> device
> control API and save/restore of the VGIC state for ARMv8.
>
> The defines were simply missing from the arm64 header files and
> uaccess.h must be implicitly imported from somewhere else on arm.
>
> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
M.
> ---
> arch/arm64/include/uapi/asm/kvm.h | 9 +++++++++
> virt/kvm/arm/vgic.c | 1 +
> 2 files changed, 10 insertions(+)
>
> diff --git a/arch/arm64/include/uapi/asm/kvm.h
> b/arch/arm64/include/uapi/asm/kvm.h
> index 495ab6f..eaf54a3 100644
> --- a/arch/arm64/include/uapi/asm/kvm.h
> +++ b/arch/arm64/include/uapi/asm/kvm.h
> @@ -148,6 +148,15 @@ struct kvm_arch_memory_slot {
> #define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2)
> #define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2)
>
> +/* Device Control API: ARM VGIC */
> +#define KVM_DEV_ARM_VGIC_GRP_ADDR 0
> +#define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1
> +#define KVM_DEV_ARM_VGIC_GRP_CPU_REGS 2
> +#define KVM_DEV_ARM_VGIC_CPUID_SHIFT 32
> +#define KVM_DEV_ARM_VGIC_CPUID_MASK (0xffULL <<
> KVM_DEV_ARM_VGIC_CPUID_SHIFT)
> +#define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0
> +#define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL <<
> KVM_DEV_ARM_VGIC_OFFSET_SHIFT)
> +
> /* KVM_IRQ_LINE irq field index values */
> #define KVM_ARM_IRQ_TYPE_SHIFT 24
> #define KVM_ARM_IRQ_TYPE_MASK 0xff
> diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
> index be456ce..8ca405c 100644
> --- a/virt/kvm/arm/vgic.c
> +++ b/virt/kvm/arm/vgic.c
> @@ -24,6 +24,7 @@
> #include <linux/of.h>
> #include <linux/of_address.h>
> #include <linux/of_irq.h>
> +#include <linux/uaccess.h>
>
> #include <linux/irqchip/arm-gic.h>
--
Fast, cheap, reliable. Pick two.
^ permalink raw reply
* [PATCH 05/18] mfd: max14577: Use of_match_ptr() in i2c_driver
From: Lee Jones @ 2014-02-03 9:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390911522-28209-6-git-send-email-k.kozlowski@samsung.com>
> Use of_match_ptr() in assignment of i2c_driver.of_match_table.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/mfd/max14577.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c
> index 2ac2f2d7cea6..75b37082a3fe 100644
> --- a/drivers/mfd/max14577.c
> +++ b/drivers/mfd/max14577.c
> @@ -224,7 +224,7 @@ static struct i2c_driver max14577_i2c_driver = {
> .name = "max14577",
> .owner = THIS_MODULE,
> .pm = &max14577_pm,
> - .of_match_table = max14577_dt_match,
> + .of_match_table = of_match_ptr(max14577_dt_match),
Are you sure this is required?
> },
> .probe = max14577_i2c_probe,
> .remove = max14577_i2c_remove,
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [PATCH 04/18] mfd: max14577: Add of_compatible to extcon mfd_cell
From: Lee Jones @ 2014-02-03 9:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390911522-28209-5-git-send-email-k.kozlowski@samsung.com>
On Tue, 28 Jan 2014, Krzysztof Kozlowski wrote:
> Add of_compatible ("maxim,max14577-muic") to the mfd_cell for extcon
> driver. If entry with such compatible is present in the DTS, the extcon
> driver will have of_node set.
>
> This may be useful for extcon consumers and it is documented in
> bindings documentation.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/mfd/max14577.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [PATCH 03/18] mfd: max14577: Remove not needed header inclusion
From: Lee Jones @ 2014-02-03 9:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390911522-28209-4-git-send-email-k.kozlowski@samsung.com>
> Remove not needed max14577-private.h header inclusion in the main driver
> header. Remove obvious comment.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> include/linux/mfd/max14577.h | 5 -----
> 1 file changed, 5 deletions(-)
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [PATCH 02/18] mfd: max14577: Remove unused enum max14577_irq_source
From: Lee Jones @ 2014-02-03 9:25 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390911522-28209-3-git-send-email-k.kozlowski@samsung.com>
> Remove unused symbol: enum max14577_irq_source.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> include/linux/mfd/max14577-private.h | 8 --------
> 1 file changed, 8 deletions(-)
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [PATCH 5/5 v2] clk: versatile: respect parent rate in ICST clock
From: Linus Walleij @ 2014-02-03 9:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390254865-15488-1-git-send-email-linus.walleij@linaro.org>
On Mon, Jan 20, 2014 at 10:54 PM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> If the ICST clock has a parent, respect the rate of the parent
> when calculating the clock frequency. As this involves modifying
> the ICST parameter struct, make a cloned copy (the divisor
> arrays should be safe) so we can update the .ref field.
>
> Do not define the reference clock on the Integrator as we have
> the reference clock from the device tree. Keep it everywhere
> else.
>
> Cc: Mike Turquette <mturquette@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - As Russell observed: the params are static objects, so if
> we want to alter them, we better make a copy of them.
>
> Hi Mike, looking for an ACK for this one as well.
Hi Mike,
Ping on this!
Yours,
Linus Walleij
^ permalink raw reply
* [PATCH 4/5] clk: versatile: pass a parent to the ICST clock
From: Linus Walleij @ 2014-02-03 9:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390251324-6369-1-git-send-email-linus.walleij@linaro.org>
On Mon, Jan 20, 2014 at 9:55 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> As we want to actually define the parent frequency in the device
> tree for the ICST clocks, modify the clock registration function
> to take a parent argument.
>
> Cc: Mike Turquette <mturquette@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Hi Mike, looking for an ACK to take this through the Integrator
> and ARM SOC tree.
Hi Mike,
Ping on this!
Yours,
Linus Walleij
^ permalink raw reply
* [PATCH 2/5] irqchip: support cascaded VICs
From: Linus Walleij @ 2014-02-03 9:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390397471-6802-3-git-send-email-linus.walleij@linaro.org>
On Wed, Jan 22, 2014 at 2:31 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> This adds support for a VIC to be cascaded off another IRQ.
> On the Integrator/AP logical module IM-PD1 there is a VIC
> cascaded off the central FPGA IRQ controller so this is
> needed for that to work out.
>
> In order for the plug-in board to be able to register all
> the devices with their IRQs relative to the offset of the
> base obtained for the cascaded VIC, the base IRQ number
> is passed back to the caller.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> tglx: if you're happy with this pls ACK it so I can take this
> through the ARM SoC tree.
Ping on this, too.
Yours,
Linus Walleij
^ permalink raw reply
* [PATCH 1/5] irqchip: vic: update the base IRQ member correctly
From: Linus Walleij @ 2014-02-03 9:22 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390397471-6802-2-git-send-email-linus.walleij@linaro.org>
On Wed, Jan 22, 2014 at 2:31 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> When passing 0 as the irq base the VIC driver will dynamically
> allocate a number of consecutive interrupt descriptors at some
> available number range. Make sure this number is recorded in
> the state container rather than the passed-in zero argument
> in this case.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> tglx: if you're happy with this pls ACK it so I can take this
> through the ARM SoC tree.
Ping on this.
Wanna queue up some stuff in ARM SoC.
Yours,
Linus Walleij
^ permalink raw reply
* Why are imprecise external aborts masked on recent kernel while booting ?
From: Fabrice Gasnier @ 2014-02-03 9:12 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140131170827.GH15937@n2100.arm.linux.org.uk>
Hi Russell,
Thank you for your help.
I just tried following patch on both 3.10 and above vanilla 3.13.1.
Unfortunately, these instructions have no effect on the arm cpsr.
I dumped regs right after msr instruction have been executed. It remains
untouched :
Here is assembly from gdb:
0xc064a400 <+128>: mov r3, #256 ; 0x100
0xc064a404 <+132>: mrs r2, CPSR
0xc064a408 <+136>: bic r2, r2, r3
0xc064a40c <+140>: msr CPSR_c, r2
CPSR.A bit is still set after these instructions : 0x600001d3
Although, I see it has been cleared in r2: 0x600000d3
Please advise.
Thanks,
BR,
Fabrice
On 01/31/2014 06:08 PM, Russell King - ARM Linux wrote:
>> Is it possible to unmask imprecise data aborts earlier in the boot
>> >process (e.g. before PCIe bus enumeration, when drivers are being probed)
>> >?
> How about this patch?
>
> diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
> index 172ee18ff124..b0ff06f49cd0 100644
> --- a/arch/arm/kernel/traps.c
> +++ b/arch/arm/kernel/traps.c
> @@ -900,6 +900,15 @@ void __init early_trap_init(void *vectors_base)
>
> flush_icache_range(vectors, vectors + PAGE_SIZE * 2);
> modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
> +
> + /* Enable imprecise aborts */
> + asm volatile(
> + "mrs %0, cpsr\n"
> + " bic %0, %0, %1\n"
> + " msr cpsr_c, %0"
> + : "=&r" (i)
> + : "r" (PSR_A_BIT));
> +
> #else /* ifndef CONFIG_CPU_V7M */
> /*
> * on V7-M there is no need to copy the vector table to a dedicated
^ permalink raw reply
* [PATCH v4] ARM/serial: at91: switch atmel serial to use gpiolib
From: Uwe Kleine-König @ 2014-02-03 9:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CACRpkdbHNo1bLxKaCCuOBiRq+JEpEPXdmQpr4BKAiORcb2snfw@mail.gmail.com>
On Mon, Feb 03, 2014 at 09:34:31AM +0100, Linus Walleij wrote:
> On Sat, Feb 1, 2014 at 12:16 AM, Olof Johansson <olof@lixom.net> wrote:
> > On Fri, Jan 31, 2014 at 04:04:36PM +0100, Richard Genoud wrote:
>
> >> I can't find this patch in linux-next, did I missed something ?
> >
> > Yeah, looks like we dropped the ball on it. We'll queue it up for 3.15 as soon
> > as -rc1 is out.
>
> OK it's out now ;-)
I included it in my drop-<mach/timex.h> series that I wish to go into
3.15, too. The patch is the first in my series, commit 354e57f3a0a2. If
you want to take this patch but not my series, please still take this
one to prevent it going in twice.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply
* [PATCH v4] ARM/serial: at91: switch atmel serial to use gpiolib
From: Linus Walleij @ 2014-02-03 8:34 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140131231618.GC11138@quad.lixom.net>
On Sat, Feb 1, 2014 at 12:16 AM, Olof Johansson <olof@lixom.net> wrote:
> On Fri, Jan 31, 2014 at 04:04:36PM +0100, Richard Genoud wrote:
>> I can't find this patch in linux-next, did I missed something ?
>
> Yeah, looks like we dropped the ball on it. We'll queue it up for 3.15 as soon
> as -rc1 is out.
OK it's out now ;-)
Yours,
Linus Walleij
^ permalink raw reply
* [PATCH 1/4] ARM: STi: add stid127 soc support
From: Alexandre Torgue @ 2014-02-03 8:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <201401312115.33731.arnd@arndb.de>
On 01/31/2014 09:15 PM, Arnd Bergmann wrote:
> On Friday 31 January 2014, srinivas kandagatla wrote:
>
>>> Sorry if I missed the initial review, but can you explain
>>> why this is needed to start with?
>> On ST SoCs the default value for L2 AUX_CTRL register is 0x0, so we set
>> the way-size explicit here.
> Unfortunately, we keep going back and forth on the L2 cache controller
> setup between "it should work automatically" and "we don't want to
> have configuration data in DT", where my personal opinion is that
> the first one is more important here.
>
> Now, there are a couple of properties that are defined in
> Documentation/devicetree/bindings/arm/l2cc.txt to let some of the
> things get set up automatically already. Can you check which bits
> are missing there, if any? Are they better described as "configuration"
> or "hardware" settings?
Hi Arnd,
Thanks for remarks. I will a have a look on it, but unfortunately not
before 2 weeks.
Alex.
>
> Arnd
^ permalink raw reply
* NFS client broken in Linus' tip
From: Christoph Hellwig @ 2014-02-03 8:03 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391201970.6978.1.camel@leira.trondhjem.org>
On Fri, Jan 31, 2014 at 03:59:30PM -0500, Trond Myklebust wrote:
> posix_acl_xattr_get requires get_acl() to return EOPNOTSUPP if the
> filesystem cannot support acls. This is needed for NFS, which can't
> know whether or not the server supports acls until it tries to get/set
> one.
> This patch converts posix_acl_chmod and posix_acl_create to deal with
> EOPNOTSUPP return values from get_acl().
Shouldn't NFS just return a NULL ACL here?
^ permalink raw reply
* [PATCH 07/10] watchdog: xilinx: Fix OF binding
From: Michal Simek @ 2014-02-03 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <52EF4C6F.8040701@monstr.eu>
On 02/03/2014 08:59 AM, Michal Simek wrote:
> On 01/31/2014 06:33 PM, Rob Herring wrote:
>> On Fri, Jan 31, 2014 at 8:18 AM, Michal Simek <michal.simek@xilinx.com> wrote:
>>> Use of_property_read_u32 functions to clean OF probing.
>>
>> The subject is a bit misleading as this doesn't really fix anything.
>
> fair enough. Will change it.
>
>>
>>>
>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>> ---
>>>
>>> drivers/watchdog/of_xilinx_wdt.c | 25 ++++++++++---------------
>>> 1 file changed, 10 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
>>> index c229cc4..475440a6 100644
>>> --- a/drivers/watchdog/of_xilinx_wdt.c
>>> +++ b/drivers/watchdog/of_xilinx_wdt.c
>>> @@ -147,8 +147,7 @@ static u32 xwdt_selftest(struct xwdt_device *xdev)
>>> static int xwdt_probe(struct platform_device *pdev)
>>> {
>>> int rc;
>>> - u32 *tmptr;
>>> - u32 *pfreq;
>>> + u32 pfreq, enable_once;
>>> struct resource *res;
>>> struct xwdt_device *xdev;
>>> bool no_timeout = false;
>>> @@ -168,28 +167,24 @@ static int xwdt_probe(struct platform_device *pdev)
>>> if (IS_ERR(xdev->base))
>>> return PTR_ERR(xdev->base);
>>>
>>> - pfreq = (u32 *)of_get_property(pdev->dev.of_node,
>>> - "clock-frequency", NULL);
>>> -
>>> - if (pfreq == NULL) {
>>> + rc = of_property_read_u32(pdev->dev.of_node, "clock-frequency", &pfreq);
>>> + if (rc) {
>>> dev_warn(&pdev->dev,
>>> "The watchdog clock frequency cannot be obtained\n");
>>> no_timeout = true;
>>
>> You can kill this...
>>
>>> }
>>>
>>> - tmptr = (u32 *)of_get_property(pdev->dev.of_node,
>>> - "xlnx,wdt-interval", NULL);
>>> - if (tmptr == NULL) {
>>> + rc = of_property_read_u32(pdev->dev.of_node, "xlnx,wdt-interval",
>>> + &xdev->wdt_interval);
>>> + if (rc) {
>>> dev_warn(&pdev->dev,
>>> "Parameter \"xlnx,wdt-interval\" not found\n");
>>> no_timeout = true;
>>
>> and this...
>>
>>> - } else {
>>> - xdev->wdt_interval = *tmptr;
>>> }
>>>
>>> - tmptr = (u32 *)of_get_property(pdev->dev.of_node,
>>> - "xlnx,wdt-enable-once", NULL);
>>> - if (tmptr == NULL) {
>>> + rc = of_property_read_u32(pdev->dev.of_node, "xlnx,wdt-enable-once",
>>> + &enable_once);
>>> + if (!rc && enable_once) {
>>> dev_warn(&pdev->dev,
>>> "Parameter \"xlnx,wdt-enable-once\" not found\n");
>>> watchdog_set_nowayout(xilinx_wdt_wdd, true);
>>> @@ -201,7 +196,7 @@ static int xwdt_probe(struct platform_device *pdev)
>>> */
>>> if (!no_timeout)
>>
>> and use "if (pfreq && xdev->wdt_interval)" if you initialize pfreq to 0.
>
>
> I just wanted to to change functions not logic in the driver.
> But it can be changed too.
>
>>> xilinx_wdt_wdd->timeout = 2 * ((1 << xdev->wdt_interval) /
>>> - *pfreq);
>>> + pfreq);
>>
>> Is the wdog really usable if the timeout properties are missing? Seems
>> like you should fail to probe rather than warn.
>
> There are 2 things.
> 1. timeout - you don't need pfreq and wdt_interval to use this driver
> but for that there should be module parameter timeout there.
> It should be added.
>
> 2. about warn - based on 1 I don't think driver should failed
> but I am looking at logic above which I have added there but should be different.
>
> u32 enable_once = 0;
> if (!rc)
> dev_warn
>
if (rc) here sorry.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140203/7ff2a9cb/attachment.sig>
^ permalink raw reply
* [PATCH 07/10] watchdog: xilinx: Fix OF binding
From: Michal Simek @ 2014-02-03 7:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAL_JsqJ+Dc9PFVYcxHvLiG9unKQX-kEc1fsYsieyTjf-AN3j=A@mail.gmail.com>
On 01/31/2014 06:33 PM, Rob Herring wrote:
> On Fri, Jan 31, 2014 at 8:18 AM, Michal Simek <michal.simek@xilinx.com> wrote:
>> Use of_property_read_u32 functions to clean OF probing.
>
> The subject is a bit misleading as this doesn't really fix anything.
fair enough. Will change it.
>
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>> drivers/watchdog/of_xilinx_wdt.c | 25 ++++++++++---------------
>> 1 file changed, 10 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
>> index c229cc4..475440a6 100644
>> --- a/drivers/watchdog/of_xilinx_wdt.c
>> +++ b/drivers/watchdog/of_xilinx_wdt.c
>> @@ -147,8 +147,7 @@ static u32 xwdt_selftest(struct xwdt_device *xdev)
>> static int xwdt_probe(struct platform_device *pdev)
>> {
>> int rc;
>> - u32 *tmptr;
>> - u32 *pfreq;
>> + u32 pfreq, enable_once;
>> struct resource *res;
>> struct xwdt_device *xdev;
>> bool no_timeout = false;
>> @@ -168,28 +167,24 @@ static int xwdt_probe(struct platform_device *pdev)
>> if (IS_ERR(xdev->base))
>> return PTR_ERR(xdev->base);
>>
>> - pfreq = (u32 *)of_get_property(pdev->dev.of_node,
>> - "clock-frequency", NULL);
>> -
>> - if (pfreq == NULL) {
>> + rc = of_property_read_u32(pdev->dev.of_node, "clock-frequency", &pfreq);
>> + if (rc) {
>> dev_warn(&pdev->dev,
>> "The watchdog clock frequency cannot be obtained\n");
>> no_timeout = true;
>
> You can kill this...
>
>> }
>>
>> - tmptr = (u32 *)of_get_property(pdev->dev.of_node,
>> - "xlnx,wdt-interval", NULL);
>> - if (tmptr == NULL) {
>> + rc = of_property_read_u32(pdev->dev.of_node, "xlnx,wdt-interval",
>> + &xdev->wdt_interval);
>> + if (rc) {
>> dev_warn(&pdev->dev,
>> "Parameter \"xlnx,wdt-interval\" not found\n");
>> no_timeout = true;
>
> and this...
>
>> - } else {
>> - xdev->wdt_interval = *tmptr;
>> }
>>
>> - tmptr = (u32 *)of_get_property(pdev->dev.of_node,
>> - "xlnx,wdt-enable-once", NULL);
>> - if (tmptr == NULL) {
>> + rc = of_property_read_u32(pdev->dev.of_node, "xlnx,wdt-enable-once",
>> + &enable_once);
>> + if (!rc && enable_once) {
>> dev_warn(&pdev->dev,
>> "Parameter \"xlnx,wdt-enable-once\" not found\n");
>> watchdog_set_nowayout(xilinx_wdt_wdd, true);
>> @@ -201,7 +196,7 @@ static int xwdt_probe(struct platform_device *pdev)
>> */
>> if (!no_timeout)
>
> and use "if (pfreq && xdev->wdt_interval)" if you initialize pfreq to 0.
I just wanted to to change functions not logic in the driver.
But it can be changed too.
>> xilinx_wdt_wdd->timeout = 2 * ((1 << xdev->wdt_interval) /
>> - *pfreq);
>> + pfreq);
>
> Is the wdog really usable if the timeout properties are missing? Seems
> like you should fail to probe rather than warn.
There are 2 things.
1. timeout - you don't need pfreq and wdt_interval to use this driver
but for that there should be module parameter timeout there.
It should be added.
2. about warn - based on 1 I don't think driver should failed
but I am looking at logic above which I have added there but should be different.
u32 enable_once = 0;
if (!rc)
dev_warn
if (enable_once)
watchdog_set_nowayout(xilinx_wdt_wdd, true);
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140203/78dbb960/attachment.sig>
^ permalink raw reply
* [PATCH v3 3/3] arm64: audit: Add audit hook in ptrace/syscall_trace
From: AKASHI Takahiro @ 2014-02-03 6:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391410590-4884-1-git-send-email-takahiro.akashi@linaro.org>
This patch adds auditing functions on entry to or exit from
every system call invocation.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
arch/arm64/include/asm/thread_info.h | 1 +
arch/arm64/kernel/entry.S | 3 +++
arch/arm64/kernel/ptrace.c | 10 ++++++++++
3 files changed, 14 insertions(+)
diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
index 720e70b..7468388 100644
--- a/arch/arm64/include/asm/thread_info.h
+++ b/arch/arm64/include/asm/thread_info.h
@@ -101,6 +101,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_NEED_RESCHED 1
#define TIF_NOTIFY_RESUME 2 /* callback before returning to user */
#define TIF_SYSCALL_TRACE 8
+#define TIF_SYSCALL_AUDIT 9
#define TIF_POLLING_NRFLAG 16
#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
#define TIF_FREEZE 19
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index 827cbad..83c4b29 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -630,6 +630,9 @@ el0_svc_naked: // compat entry point
get_thread_info tsk
ldr x16, [tsk, #TI_FLAGS] // check for syscall tracing
tbnz x16, #TIF_SYSCALL_TRACE, __sys_trace // are we tracing syscalls?
+#ifdef CONFIG_AUDITSYSCALL
+ tbnz x16, #TIF_SYSCALL_AUDIT, __sys_trace // auditing syscalls?
+#endif
adr lr, ret_fast_syscall // return address
cmp scno, sc_nr // check upper syscall limit
b.hs ni_sys
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
index 6777a21..75a3f23 100644
--- a/arch/arm64/kernel/ptrace.c
+++ b/arch/arm64/kernel/ptrace.c
@@ -19,6 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <linux/audit.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
@@ -38,6 +39,7 @@
#include <asm/compat.h>
#include <asm/debug-monitors.h>
#include <asm/pgtable.h>
+#include <asm/syscall.h>
#include <asm/traps.h>
#include <asm/system_misc.h>
@@ -1064,6 +1066,14 @@ asmlinkage int syscall_trace(int dir, struct pt_regs *regs)
{
unsigned long saved_reg;
+ if (dir)
+ audit_syscall_exit(regs);
+ else
+ audit_syscall_entry(syscall_get_arch(current, regs),
+ (int)regs->syscallno,
+ regs->orig_x0, regs->regs[1],
+ regs->regs[2], regs->regs[3]);
+
if (!test_thread_flag(TIF_SYSCALL_TRACE))
return regs->syscallno;
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 2/3] arm64: Add audit support
From: AKASHI Takahiro @ 2014-02-03 6:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391410590-4884-1-git-send-email-takahiro.akashi@linaro.org>
On AArch64, audit is supported through generic lib/audit.c and
compat_audit.c, and so this patch adds arch specific definitions required.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/syscall.h | 15 +++++++++++++++
include/uapi/linux/audit.h | 1 +
3 files changed, 17 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 6d4dd22..3c21405 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -19,6 +19,7 @@ config ARM64
select GENERIC_SMP_IDLE_THREAD
select GENERIC_TIME_VSYSCALL
select HARDIRQS_SW_RESEND
+ select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_TRACEHOOK
select HAVE_DEBUG_BUGVERBOSE
select HAVE_DEBUG_KMEMLEAK
diff --git a/arch/arm64/include/asm/syscall.h b/arch/arm64/include/asm/syscall.h
index 70ba9d4..6900183 100644
--- a/arch/arm64/include/asm/syscall.h
+++ b/arch/arm64/include/asm/syscall.h
@@ -16,7 +16,9 @@
#ifndef __ASM_SYSCALL_H
#define __ASM_SYSCALL_H
+#include <linux/audit.h>
#include <linux/err.h>
+#include <asm/compat.h>
static inline int syscall_get_nr(struct task_struct *task,
@@ -104,4 +106,17 @@ static inline void syscall_set_arguments(struct task_struct *task,
memcpy(®s->regs[i], args, n * sizeof(args[0]));
}
+/*
+ * We don't care about endianness (__AUDIT_ARCH_LE bit) here because
+ * AArch64 has the same system calls both on little- and big- endian.
+ */
+static inline int syscall_get_arch(struct task_struct *task,
+ struct pt_regs *regs)
+{
+ if (is_compat_thread(task_thread_info(task)))
+ return AUDIT_ARCH_ARM;
+
+ return AUDIT_ARCH_AARCH64;
+}
+
#endif /* __ASM_SYSCALL_H */
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 0a73cf3..cf27cae 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -327,6 +327,7 @@ enum {
/* distinguish syscall tables */
#define __AUDIT_ARCH_64BIT 0x80000000
#define __AUDIT_ARCH_LE 0x40000000
+#define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ARMEB (EM_ARM)
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 1/3] arm64: Add regs_return_value() in syscall.h
From: AKASHI Takahiro @ 2014-02-03 6:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391410590-4884-1-git-send-email-takahiro.akashi@linaro.org>
This macro, regs_return_value, is used mainly for audit to record system
call's results, but may also be used in test_kprobes.c.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
arch/arm64/include/asm/ptrace.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index 0e7fa49..5800ec1 100644
--- a/arch/arm64/include/asm/ptrace.h
+++ b/arch/arm64/include/asm/ptrace.h
@@ -134,6 +134,11 @@ struct pt_regs {
#define user_stack_pointer(regs) \
((regs)->sp)
+static inline unsigned long regs_return_value(struct pt_regs *regs)
+{
+ return regs->regs[0];
+}
+
/*
* Are the current registers suitable for user mode? (used to maintain
* security in signal handlers)
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 0/3] arm64: Add audit support
From: AKASHI Takahiro @ 2014-02-03 6:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389946399-4525-1-git-send-email-takahiro.akashi@linaro.org>
This patchset adds system call audit support on arm64.
Both 32-bit (AUDIT_ARCH_ARM) and 64-bit tasks (AUDIT_ARCH_AARCH64)
are supported. Since arm64 has the exact same set of system calls
on LE and BE, we don't care about endianness (or more specifically
__AUDIT_ARCH_64BIT bit in AUDIT_ARCH_*).
There are some prerequisites for this patch to work correctly:
* "generic compat system call audit support" patch
* "correct a type mismatch in audit_syscall_exit()" patch
(already accepted and queued in 3.14)
* "Modify a set of system calls in audit class" patch
(already accepted and queued in 3.14)
* "__NR_* definitions for compat syscalls" patch from Catalin
* userspace audit tool (v2.3.2 + my patch for arm64)
Please review them as well for better understandings.
This code was tested on both 32-bit and 64-bit LE userland
in the following two ways:
1) basic operations with auditctl/autrace
# auditctl -a exit,always -S openat -F path=/etc/inittab
# auditctl -a exit,always -F dir=/tmp -F perm=rw
# auditctl -a task,always
# autrace /bin/ls
by comparing output from autrace with one from strace
2) audit-test-code (+ my workarounds for arm/arm64)
by running "audit-tool", "filter" and "syscalls" test categories.
Changes v1 -> v2:
* Modified to utilize "generic compat system call audit" [3/6, 4/6, 5/6]
Please note that a required header, unistd_32.h, is automatically
generated from unistd32.h.
* Refer to regs->orig_x0 instead of regs->x0 as the first argument of
system call in audit_syscall_entry() [6/6]
* Include "Add regs_return_value() in syscall.h" patch [2/6],
which was not intentionally included in v1 because it could be added
by "kprobes support".
Changes v2 -> v3:
* Remove asm/audit.h.
See "generic compat syscall audit support" patch v4
* Remove endianness dependency, ie. AUDIT_ARCH_ARMEB/AARCH64EB.
* Remove kernel/syscalls/Makefile which was used to create unistd32.h.
See Catalin's "Add __NR_* definitions for compat syscalls" patch
AKASHI Takahiro (3):
arm64: Add regs_return_value() in syscall.h
arm64: Add audit support
arm64: audit: Add audit hook in ptrace/syscall_trace
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/ptrace.h | 5 +++++
arch/arm64/include/asm/syscall.h | 15 +++++++++++++++
arch/arm64/include/asm/thread_info.h | 1 +
arch/arm64/kernel/entry.S | 3 +++
arch/arm64/kernel/ptrace.c | 10 ++++++++++
include/uapi/linux/audit.h | 1 +
7 files changed, 36 insertions(+)
--
1.7.9.5
^ permalink raw reply
* [PATCH v4 1/1] audit: Add generic compat syscall support
From: AKASHI Takahiro @ 2014-02-03 6:55 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391410528-4844-1-git-send-email-takahiro.akashi@linaro.org>
lib/audit.c provides a generic definition for auditing system calls.
This patch extends it for compat syscall support on bi-architectures
(32/64-bit) by adding lib/compat_audit.c.
What is required to support this feature are:
* add asm/unistd32.h for compat system call names
* enable CONFIG_AUDIT_COMPAT_GENERIC
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
include/linux/audit.h | 8 +++++++
include/uapi/linux/audit.h | 6 ++++++
lib/Kconfig | 5 +++++
lib/Makefile | 1 +
lib/audit.c | 15 ++++++++++++-
lib/compat_audit.c | 50 ++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 84 insertions(+), 1 deletion(-)
create mode 100644 lib/compat_audit.c
diff --git a/include/linux/audit.h b/include/linux/audit.h
index bf1ef22..b5d5cca 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -78,6 +78,14 @@ extern int is_audit_feature_set(int which);
extern int __init audit_register_class(int class, unsigned *list);
extern int audit_classify_syscall(int abi, unsigned syscall);
extern int audit_classify_arch(int arch);
+/* only for compat system calls */
+extern unsigned compat_write_class[];
+extern unsigned compat_read_class[];
+extern unsigned compat_dir_class[];
+extern unsigned compat_chattr_class[];
+extern unsigned compat_signal_class[];
+
+extern int __weak audit_classify_compat_syscall(int abi, unsigned syscall);
/* audit_names->type values */
#define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 44b05a0..0a73cf3 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -355,6 +355,12 @@ enum {
#define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT)
#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
+#ifdef CONFIG_COMPAT
+#define audit_is_compat(arch) (!((arch) & __AUDIT_ARCH_64BIT))
+#else
+#define audit_is_compat(arch) false
+#endif
+
#define AUDIT_PERM_EXEC 1
#define AUDIT_PERM_WRITE 2
#define AUDIT_PERM_READ 4
diff --git a/lib/Kconfig b/lib/Kconfig
index 991c98b..48896db 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -182,6 +182,11 @@ config AUDIT_GENERIC
depends on AUDIT && !AUDIT_ARCH
default y
+config AUDIT_COMPAT_GENERIC
+ bool
+ depends on AUDIT_GENERIC && COMPAT
+ default y
+
config RANDOM32_SELFTEST
bool "PRNG perform self test on init"
default n
diff --git a/lib/Makefile b/lib/Makefile
index a459c31..972552b 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -93,6 +93,7 @@ obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o
obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o
obj-$(CONFIG_SMP) += percpu_counter.o
obj-$(CONFIG_AUDIT_GENERIC) += audit.o
+obj-$(CONFIG_AUDIT_COMPAT_GENERIC) += compat_audit.o
obj-$(CONFIG_SWIOTLB) += swiotlb.o
obj-$(CONFIG_IOMMU_HELPER) += iommu-helper.o
diff --git a/lib/audit.c b/lib/audit.c
index 76bbed4..1d726a2 100644
--- a/lib/audit.c
+++ b/lib/audit.c
@@ -30,11 +30,17 @@ static unsigned signal_class[] = {
int audit_classify_arch(int arch)
{
- return 0;
+ if (audit_is_compat(arch))
+ return 1;
+ else
+ return 0;
}
int audit_classify_syscall(int abi, unsigned syscall)
{
+ if (audit_is_compat(abi))
+ return audit_classify_compat_syscall(abi, syscall);
+
switch(syscall) {
#ifdef __NR_open
case __NR_open:
@@ -57,6 +63,13 @@ int audit_classify_syscall(int abi, unsigned syscall)
static int __init audit_classes_init(void)
{
+#ifdef CONFIG_AUDIT_COMPAT_GENERIC
+ audit_register_class(AUDIT_CLASS_WRITE_32, compat_write_class);
+ audit_register_class(AUDIT_CLASS_READ_32, compat_read_class);
+ audit_register_class(AUDIT_CLASS_DIR_WRITE_32, compat_dir_class);
+ audit_register_class(AUDIT_CLASS_CHATTR_32, compat_chattr_class);
+ audit_register_class(AUDIT_CLASS_SIGNAL_32, compat_signal_class);
+#endif
audit_register_class(AUDIT_CLASS_WRITE, write_class);
audit_register_class(AUDIT_CLASS_READ, read_class);
audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
diff --git a/lib/compat_audit.c b/lib/compat_audit.c
new file mode 100644
index 0000000..873f75b
--- /dev/null
+++ b/lib/compat_audit.c
@@ -0,0 +1,50 @@
+#include <linux/init.h>
+#include <linux/types.h>
+#include <asm/unistd32.h>
+
+unsigned compat_dir_class[] = {
+#include <asm-generic/audit_dir_write.h>
+~0U
+};
+
+unsigned compat_read_class[] = {
+#include <asm-generic/audit_read.h>
+~0U
+};
+
+unsigned compat_write_class[] = {
+#include <asm-generic/audit_write.h>
+~0U
+};
+
+unsigned compat_chattr_class[] = {
+#include <asm-generic/audit_change_attr.h>
+~0U
+};
+
+unsigned compat_signal_class[] = {
+#include <asm-generic/audit_signal.h>
+~0U
+};
+
+int audit_classify_compat_syscall(int abi, unsigned syscall)
+{
+ switch (syscall) {
+#ifdef __NR_open
+ case __NR_open:
+ return 2;
+#endif
+#ifdef __NR_openat
+ case __NR_openat:
+ return 3;
+#endif
+#ifdef __NR_socketcall
+ case __NR_socketcall:
+ return 4;
+#endif
+ case __NR_execve:
+ return 5;
+ default:
+ return 1;
+ }
+}
--
1.7.9.5
^ permalink raw reply related
* [PATCH v4 0/1] audit: generic compat system call support
From: AKASHI Takahiro @ 2014-02-03 6:55 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389945795-4255-1-git-send-email-takahiro.akashi@linaro.org>
Arm64 supports 32-bit mode(AArch32) and 64-bit mode(AArch64).
To enable audit on arm64, we want to use lib/audit.c and re-work it
to support compat system calls as well without copying it under
arch sub-directory.
Since this patch is implemented in much the same way as on existing
bi-architectures (ie. ppc, s390, sparc and x86), it's not difficult
for them to utilize this generic code instead of their own implementation.
The code was tested on armv8 fast model with 64-bit and 32-bit userland
by using modified audit-test-code. As this patch is mandatory for my
"system call audit support for arm64" patch, please review it as well
for better understandings.
Changes v2 -> v3:
* Specify AUDIT_CLASS_XYZ_32 instead of AUDIT_CLASS_XYZ when registering
compat syscalls (bug fix)
Changes v3 -> v4:
* Add CONFIG_AUDIT_COMPAT_GENERIC to compile in compat_audit.c
* Re-define audit_is_compat() in generic way in order to eliminate
necessity of asm/audit.h.
AKASHI Takahiro (1):
audit: Add generic compat syscall support
include/linux/audit.h | 8 +++++++
include/uapi/linux/audit.h | 6 ++++++
lib/Kconfig | 5 +++++
lib/Makefile | 1 +
lib/audit.c | 15 ++++++++++++-
lib/compat_audit.c | 50 ++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 84 insertions(+), 1 deletion(-)
create mode 100644 lib/compat_audit.c
--
1.7.9.5
^ permalink raw reply
* [PATCH 3/3] ARM: fix HAVE_ARM_TWD selection for OMAP and shmobile
From: Simon Horman @ 2014-02-03 6:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391294144-27787-4-git-send-email-robherring2@gmail.com>
Hi,
could you split the shmobile portion out into a separate patch
so that I can take it through my tree?
Thanks
On Sat, Feb 01, 2014 at 04:35:44PM -0600, Rob Herring wrote:
> From: Rob Herring <robh@kernel.org>
>
> The selection of HAVE_ARM_TWD for OMAP and shmobile depend on LOCAL_TIMER
> which no longer exists. They should depend on SMP instead.
>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> arch/arm/mach-omap2/Kconfig | 2 +-
> arch/arm/mach-shmobile/Kconfig | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index 653b489..e2ce4f8 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -54,7 +54,7 @@ config SOC_OMAP5
> select ARM_GIC
> select CPU_V7
> select HAVE_ARM_SCU if SMP
> - select HAVE_ARM_TWD if LOCAL_TIMERS
> + select HAVE_ARM_TWD if SMP
> select HAVE_SMP
> select HAVE_ARM_ARCH_TIMER
> select ARM_ERRATA_798181 if SMP
> diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
> index 3386406..05fa505 100644
> --- a/arch/arm/mach-shmobile/Kconfig
> +++ b/arch/arm/mach-shmobile/Kconfig
> @@ -8,7 +8,7 @@ config ARCH_SHMOBILE_MULTI
> select CPU_V7
> select GENERIC_CLOCKEVENTS
> select HAVE_ARM_SCU if SMP
> - select HAVE_ARM_TWD if LOCAL_TIMERS
> + select HAVE_ARM_TWD if SMP
> select HAVE_SMP
> select ARM_GIC
> select MIGHT_HAVE_CACHE_L2X0
> --
> 1.8.3.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox